Compare commits

...

6 Commits

Author SHA1 Message Date
44be22e0e5 import missing file
Some checks failed
perso/syncthing-arm/pipeline/head There was a failure building this commit
2021-01-04 16:27:13 -05:00
754bcecde6 use k3s
Some checks failed
perso/syncthing-arm/pipeline/head There was a failure building this commit
2021-01-04 16:26:11 -05:00
e9cd74051d Import
Some checks reported errors
perso/syncthing-arm/armci Build queued...
perso/syncthing-arm/pipeline/head Something is wrong with the build of this commit
2020-01-08 15:36:51 -05:00
Julien Cabillot
389cfec1ec Update .gitlab-ci.yml 2020-01-08 15:35:41 -05:00
Julien Cabillot
00c1e40e13 Update .gitlab-ci.yml 2020-01-08 15:35:41 -05:00
11909a4d12 import 2020-01-08 15:35:41 -05:00
3 changed files with 107 additions and 0 deletions

41
.gitlab-ci.yml Normal file
View File

@ -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"

44
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,44 @@
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'
}
}
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}'
}
}
}
}
}
}

View File

@ -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