Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9c4e2e500b | |||
| c706f2422c | |||
| 329ced4316 | |||
| 44be22e0e5 | |||
| 754bcecde6 | |||
| e9cd74051d | |||
| 389cfec1ec | |||
| 00c1e40e13 | |||
| 11909a4d12 |
@@ -0,0 +1,41 @@
|
|||||||
|
image: "docker:latest"
|
||||||
|
|
||||||
|
services:
|
||||||
|
- "docker:dind"
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
- "docker login -u \"$CI_REGISTRY_USER\" -p \"$CI_REGISTRY_PASSWORD\" $CI_REGISTRY"
|
||||||
|
|
||||||
|
build-master:
|
||||||
|
stage: "build"
|
||||||
|
script:
|
||||||
|
- "docker build --pull -t \"$CI_REGISTRY_IMAGE\" ."
|
||||||
|
- "docker push \"$CI_REGISTRY_IMAGE\""
|
||||||
|
only:
|
||||||
|
- "master"
|
||||||
|
tags:
|
||||||
|
- "arm64"
|
||||||
|
|
||||||
|
build:
|
||||||
|
stage: "build"
|
||||||
|
script:
|
||||||
|
- "docker build --pull -t \"$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG\" ."
|
||||||
|
- "docker push \"$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG\""
|
||||||
|
except:
|
||||||
|
- "master"
|
||||||
|
tags:
|
||||||
|
- "arm64"
|
||||||
|
|
||||||
|
deploy-dockerhub:
|
||||||
|
stage: "deploy"
|
||||||
|
before_script:
|
||||||
|
- "docker login -u \"$DOCKERHUB_USER\" -p \"$DOCKERHUB_PASSWORD\""
|
||||||
|
- "docker login -u \"$CI_REGISTRY_USER\" -p \"$CI_REGISTRY_PASSWORD\" $CI_REGISTRY"
|
||||||
|
script:
|
||||||
|
- "docker pull \"$CI_REGISTRY_IMAGE\""
|
||||||
|
- "docker tag \"$CI_REGISTRY_IMAGE\" \"$DOCKERHUB_USER/$DOCKERHUB_PROJECT\""
|
||||||
|
- "docker push \"$DOCKERHUB_USER/$DOCKERHUB_PROJECT\""
|
||||||
|
only:
|
||||||
|
- "master"
|
||||||
|
tags:
|
||||||
|
- "arm64"
|
||||||
Vendored
+45
@@ -0,0 +1,45 @@
|
|||||||
|
pipeline {
|
||||||
|
environment {
|
||||||
|
registry = 'https://registry.hub.docker.com'
|
||||||
|
registryCredential = 'dockerhub_jcabillot'
|
||||||
|
dockerImage = 'jcabillot/syncthing-arm64'
|
||||||
|
}
|
||||||
|
|
||||||
|
//agent { label 'arm64' }
|
||||||
|
agent {
|
||||||
|
kubernetes {
|
||||||
|
defaultContainer 'docker' // All `steps` instructions will be executed by this container
|
||||||
|
yamlFile 'Jenkinsfile-pod-template.yml'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Archive
|
||||||
|
//triggers {
|
||||||
|
// cron('@midnight')
|
||||||
|
//}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('Clone repository') {
|
||||||
|
steps{
|
||||||
|
checkout scm
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Build image') {
|
||||||
|
steps{
|
||||||
|
sh 'docker build --force-rm=true --no-cache=true --pull -t ${dockerImage} .'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Deploy Image') {
|
||||||
|
steps{
|
||||||
|
script {
|
||||||
|
withCredentials([usernamePassword(credentialsId: 'dockerhub_jcabillot', usernameVariable: 'DOCKER_USER', passwordVariable: 'DOCKER_PASS')]) {
|
||||||
|
sh 'docker login --username ${DOCKER_USER} --password ${DOCKER_PASS}'
|
||||||
|
sh 'docker push ${dockerImage}'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Pod
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
jenkins: 'true'
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: jnlp
|
||||||
|
image: 'jcabillot/docker-inbound-agent-arm64'
|
||||||
|
- name: docker
|
||||||
|
image: docker:20.10-dind
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
|
#volumeMounts:
|
||||||
|
#- mountPath: '/var/run/docker.sock'
|
||||||
|
# name: docker-socket
|
||||||
|
#volumes:
|
||||||
|
#- name: docker-socket
|
||||||
|
# hostPath:
|
||||||
|
# path: '/var/run/docker.sock'
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 0
|
||||||
@@ -36,7 +36,7 @@ require (
|
|||||||
github.com/rcrowley/go-metrics v0.0.0-20190826022208-cac0b30c2563
|
github.com/rcrowley/go-metrics v0.0.0-20190826022208-cac0b30c2563
|
||||||
github.com/sasha-s/go-deadlock v0.2.0
|
github.com/sasha-s/go-deadlock v0.2.0
|
||||||
github.com/shirou/gopsutil v0.0.0-20190714054239-47ef3260b6bf
|
github.com/shirou/gopsutil v0.0.0-20190714054239-47ef3260b6bf
|
||||||
github.com/syncthing/notify v0.0.0-20190709140112-69c7a957d3e2
|
github.com/syncthing/notify v0.0.0-20250528144937-c7027d4f7465
|
||||||
github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d
|
github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d
|
||||||
github.com/thejerf/suture v3.0.2+incompatible
|
github.com/thejerf/suture v3.0.2+incompatible
|
||||||
github.com/urfave/cli v1.22.2
|
github.com/urfave/cli v1.22.2
|
||||||
|
|||||||
@@ -183,6 +183,8 @@ github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0
|
|||||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||||
github.com/syncthing/notify v0.0.0-20190709140112-69c7a957d3e2 h1:6tuEEEpg+mxM82E0YingzoXzXXISYR/o/7I9n573LWI=
|
github.com/syncthing/notify v0.0.0-20190709140112-69c7a957d3e2 h1:6tuEEEpg+mxM82E0YingzoXzXXISYR/o/7I9n573LWI=
|
||||||
github.com/syncthing/notify v0.0.0-20190709140112-69c7a957d3e2/go.mod h1:Sn4ChoS7e4FxjCN1XHPVBT43AgnRLbuaB8pEc1Zcdjg=
|
github.com/syncthing/notify v0.0.0-20190709140112-69c7a957d3e2/go.mod h1:Sn4ChoS7e4FxjCN1XHPVBT43AgnRLbuaB8pEc1Zcdjg=
|
||||||
|
github.com/syncthing/notify v0.0.0-20250528144937-c7027d4f7465 h1:yhxdTGmFkAM2TFA65c3NgGwpnIkUM8oVqPX2e9S7IVg=
|
||||||
|
github.com/syncthing/notify v0.0.0-20250528144937-c7027d4f7465/go.mod h1:J0q59IWjLtpRIJulohwqEZvjzwOfTEPp8SVhDJl+y0Y=
|
||||||
github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d h1:gZZadD8H+fF+n9CmNhYL1Y0dJB+kLOmKd7FbPJLeGHs=
|
github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d h1:gZZadD8H+fF+n9CmNhYL1Y0dJB+kLOmKd7FbPJLeGHs=
|
||||||
github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA=
|
github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA=
|
||||||
github.com/thejerf/suture v3.0.2+incompatible h1:GtMydYcnK4zBJ0KL6Lx9vLzl6Oozb65wh252FTBxrvM=
|
github.com/thejerf/suture v3.0.2+incompatible h1:GtMydYcnK4zBJ0KL6Lx9vLzl6Oozb65wh252FTBxrvM=
|
||||||
|
|||||||
Reference in New Issue
Block a user