mirror of
https://github.com/waku-org/nwaku.git
synced 2025-02-04 11:05:38 +00:00
Add Jenkinsfile to produce the builder images
This commit is contained in:
parent
18a57eb11d
commit
c84ae74866
34
ci/Jenkinsfile.builders
Normal file
34
ci/Jenkinsfile.builders
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
pipeline {
|
||||||
|
agent { label 'linux' }
|
||||||
|
|
||||||
|
options {
|
||||||
|
timestamps()
|
||||||
|
timeout(time: 20, unit: 'MINUTES')
|
||||||
|
buildDiscarder(logRotator(
|
||||||
|
numToKeepStr: '10',
|
||||||
|
daysToKeepStr: '30',
|
||||||
|
))
|
||||||
|
}
|
||||||
|
|
||||||
|
parameters {
|
||||||
|
string(
|
||||||
|
name: 'REPOSITORY',
|
||||||
|
description: 'Name of container registry repository',
|
||||||
|
defaultValue: params.REPOSITORY ?: 'wakuorg',
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('Build & Push') {
|
||||||
|
steps {
|
||||||
|
withDockerRegistry([credentialsId: "dockerhub-vacorgbot-api-token", url: ""]) {
|
||||||
|
dir("docker/base") {
|
||||||
|
sh "./build.sh --registry docker.io --repository ${params.REPOSITORY} --latest --push all"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} // stages
|
||||||
|
|
||||||
|
} // pipeline
|
||||||
|
|
@ -8,6 +8,7 @@ BUILDER=
|
|||||||
PUSH=
|
PUSH=
|
||||||
LOAD=
|
LOAD=
|
||||||
LATEST=
|
LATEST=
|
||||||
|
NO_CACHE="--no-cache"
|
||||||
IMAGE_NAME="nwaku-builder"
|
IMAGE_NAME="nwaku-builder"
|
||||||
|
|
||||||
for i in `seq 1 $#`;do
|
for i in `seq 1 $#`;do
|
||||||
@ -39,6 +40,10 @@ for i in `seq 1 $#`;do
|
|||||||
shift
|
shift
|
||||||
LATEST="1"
|
LATEST="1"
|
||||||
;;
|
;;
|
||||||
|
"--use-cache")
|
||||||
|
shift
|
||||||
|
NO_CACHE=""
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
@ -66,6 +71,7 @@ for arch in $(echo ${ARCH}); do
|
|||||||
${BUILDER}\
|
${BUILDER}\
|
||||||
${PUSH}\
|
${PUSH}\
|
||||||
${LOAD}\
|
${LOAD}\
|
||||||
|
${NO_CACHE}\
|
||||||
-t ${IMAGE_NAME}:${TAG}_${arch}\
|
-t ${IMAGE_NAME}:${TAG}_${arch}\
|
||||||
--build-arg USER_ID=$(id -u)\
|
--build-arg USER_ID=$(id -u)\
|
||||||
--build-arg GROUP_ID=$(id -g)\
|
--build-arg GROUP_ID=$(id -g)\
|
||||||
|
Loading…
x
Reference in New Issue
Block a user