-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathJenkinsfile
58 lines (58 loc) · 2.81 KB
/
Jenkinsfile
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
pipeline {
agent { label 'implementation-slaves' }
stages {
stage('build') {
environment {
DOCKER = credentials('dockerPublisher')
}
steps {
// sh 'printenv | sort'
script {
currentBuild.displayName = '#' + currentBuild.number + ' - ' + env.GIT_BRANCH
}
ansiColor('xterm') {
sh '''docker info
export DOCKER_BUILDKIT=1
echo "${DOCKER_PSW}" | docker login --username "${DOCKER_USR}" --password-stdin nexus-dev.softwaregroup.com:5001
docker build -f node.Dockerfile -t nexus-dev.softwaregroup.com:5001/softwaregroup/node-gallium:latest .
docker build -f ut.Dockerfile -t nexus-dev.softwaregroup.com:5001/softwaregroup/ut-gallium:latest .
docker build -f impl.Dockerfile -t nexus-dev.softwaregroup.com:5001/softwaregroup/impl-gallium:latest .
docker build -f deploy.Dockerfile -t nexus-dev.softwaregroup.com:5001/softwaregroup/deploy-gallium:latest .
docker build -f dockeragent.Dockerfile -t nexus-dev.softwaregroup.com:5001/azure/dockeragent:latest .
docker push nexus-dev.softwaregroup.com:5001/softwaregroup/node-gallium:latest
docker push nexus-dev.softwaregroup.com:5001/softwaregroup/ut-gallium:latest
docker push nexus-dev.softwaregroup.com:5001/softwaregroup/impl-gallium:latest
docker push nexus-dev.softwaregroup.com:5001/softwaregroup/deploy-gallium:latest
docker push nexus-dev.softwaregroup.com:5001/azure/dockeragent:latest
# docker build -f capture.Dockerfile -t nexus-dev.softwaregroup.com:5001/softwaregroup/capture-website:latest .
# docker push nexus-dev.softwaregroup.com:5001/softwaregroup/capture-website:latest
# docker build -f localtunnel.Dockerfile -t nexus-dev.softwaregroup.com:5001/softwaregroup/localtunnel:latest .
# docker push nexus-dev.softwaregroup.com:5001/softwaregroup/localtunnel:latest
'''
}
}
post {
always {
emailext(
mimeType: 'text/html',
body: '''<h1>Jenkins build ut-docker ${BUILD_DISPLAY_NAME}</h1>
<h2><b>Status</b>: ${BUILD_STATUS}</h2>
<b>Trigger</b>: ${CAUSE}<br>
<b>Job</b>: ${JOB_URL}<br>
<b>Branch</b>: http://github.com/softwaregroup-bg/ut-docker/tree/''' + env.GIT_BRANCH + '''<br>
<b>MR/PR</b>: ${CHANGE_URL}<br>
<b>Summary</b>: ${BUILD_URL}<br>
<b>Console</b>: ${BUILD_URL}console<br>
<b>Workspace</b>: ${BUILD_URL}/execution/node/4/ws<br>
<b>Changes</b>:<pre>
${CHANGES}
</pre>
''',
recipientProviders: [[$class: 'CulpritsRecipientProvider'],[$class: 'RequesterRecipientProvider']],
subject: 'Build ${BUILD_STATUS} in Jenkins: ut-docker ${BUILD_DISPLAY_NAME} (' + currentBuild.durationString +')'
)
}
}
}
}
}