blob: c762937065b7578ac3421d97bf65e57a5f96b45e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
def img_name = "${env.PLATFORM}-wayland-${env.ARCH}"
def dir_name = "${img_name}-${STAMP}"
stage("Generating Dockerfile") {
sh(script: "./wayland-images/gen-dockerfile.sh ${env.DOCKER_REGISTRY} ${env.PLATFORM} ${env.ARCH} ${STAMP} ${dir_name}")
}
def img_wl
stage("Building Wayland image") {
docker.withRegistry("${env.DOCKER_REGISTRY_URI_SCHEME}://${env.DOCKER_REGISTRY}", env.DOCKER_REGISTRY_CREDENTIALS) {
/*
* We use --no-cache, as Docker sees steps like 'apt-get update' as being
* idempotent, rather than temporally-bound.
*/
img_wl = docker.build("${img_name}:${STAMP}", "--no-cache ${dir_name}")
}
}
stage("Pushing Wayland image") {
docker.withRegistry("${env.DOCKER_REGISTRY_URI_SCHEME}://${env.DOCKER_REGISTRY}", env.DOCKER_REGISTRY_CREDENTIALS) {
img_wl.push()
}
}
stage("Testing Wayland build in new image") {
build(job: "wayland/build/${env.PLATFORM}-${env.ARCH}", parameters: [string(name: "STAMP", value: STAMP)], propagate: true, wait: true)
}
stage("Promoting to latest") {
docker.withRegistry("${env.DOCKER_REGISTRY_URI_SCHEME}://${env.DOCKER_REGISTRY}", env.DOCKER_REGISTRY_CREDENTIALS) {
img_wl.push("latest")
}
}
|