Skip to content

Commit 9af113e

Browse files
cpanatoalexsomesan
authored andcommitted
tests/ci: add jenkins job to build tectonic-smoke-env docker image (#1887)
1 parent 56d20bc commit 9af113e

File tree

2 files changed

+66
-2
lines changed

2 files changed

+66
-2
lines changed

tests/jenkins-jobs/tectonic_builder_docker_image.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ folder("builders")
44

55
job("builders/tectonic-builder-docker-image") {
66
logRotator(-1, 10)
7-
description('Build quay.io/coreos/tectonic-builder Docker image. Changes here will be reverted automaticaly.')
7+
description('Build quay.io/coreos/tectonic-builder Docker image. Changes here will be reverted automatically.')
88

99
label 'worker&&ec2'
1010

@@ -61,7 +61,7 @@ job("builders/tectonic-builder-docker-image") {
6161
wsCleanup()
6262
slackNotifier {
6363
authTokenCredentialId('tectonic-slack-token')
64-
customMessage("Jenkins Builder: tectonic-builder")
64+
customMessage("Jenkins Builder: tectonic-builder - tag: ${TECTONIC_BUILDER_TAG}")
6565
includeCustomMessage(true)
6666
notifyBackToNormal(true)
6767
notifyFailure(true)
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
#!/bin/env groovy​
2+
3+
folder("builders")
4+
5+
job("builders/tectonic-smoke-env-docker-image") {
6+
logRotator(-1, 10)
7+
description('Build quay.io/coreos/tectonic-smoke-test-env Docker image. Changes here will be reverted automatically.')
8+
9+
label 'worker&&ec2'
10+
11+
parameters {
12+
stringParam('TECTONIC_SMOKE_TAG', '', 'Tectonic Smoke Docker tag')
13+
booleanParam('DRY_RUN', true, 'Just build the docker image')
14+
}
15+
16+
wrappers {
17+
colorizeOutput()
18+
timestamps()
19+
credentialsBinding {
20+
usernamePassword("QUAY_USERNAME", "QUAY_PASSWD", "quay-robot")
21+
}
22+
}
23+
24+
scm {
25+
git {
26+
remote {
27+
url('https://github.com/coreos/tectonic-installer')
28+
}
29+
branch('origin/master')
30+
}
31+
}
32+
33+
34+
steps {
35+
def cmd = """#!/bin/bash -e
36+
export TECTONIC_SMOKE_IMAGE=quay.io/coreos/tectonic-smoke-test-env:\${TECTONIC_SMOKE_TAG}
37+
docker build -t \${TECTONIC_SMOKE_IMAGE} -f images/tectonic-smoke-test-env/Dockerfile .
38+
39+
if \${DRY_RUN};
40+
then
41+
echo "Just build the image"
42+
else
43+
echo "Pushing the Image to quay"
44+
docker login quay.io -u \${QUAY_USERNAME} -p \${QUAY_PASSWD}
45+
docker push \${TECTONIC_SMOKE_IMAGE}
46+
fi
47+
""".stripIndent()
48+
shell(cmd)
49+
}
50+
51+
publishers {
52+
wsCleanup()
53+
slackNotifier {
54+
authTokenCredentialId('tectonic-slack-token')
55+
customMessage("Jenkins Builder: tectonic-smoke-test-env - tag: ${TECTONIC_SMOKE_TAG}")
56+
includeCustomMessage(true)
57+
notifyBackToNormal(true)
58+
notifyFailure(true)
59+
notifyRepeatedFailure(true)
60+
room('#tectonic-installer-ci')
61+
teamDomain('coreos')
62+
}
63+
}
64+
}

0 commit comments

Comments
 (0)