-
Notifications
You must be signed in to change notification settings - Fork 5
/
Jenkinsfile
31 lines (28 loc) · 1.01 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
node {
stage('build') {
echo "Building..."
openshiftBuild bldCfg: 'assets', showBuildLogs: 'true'
openshiftTag destStream: 'assets', verbose: 'true', destTag: '$BUILD_ID', srcStream: 'assets', srcTag: 'latest'
openshiftTag destStream: 'assets', verbose: 'true', destTag: 'dev', srcStream: 'assets', srcTag: 'latest'
}
stage('environment') {
node('maven') {
SONARQUBE_PWD = sh (
script: 'oc env dc/sonarqube --list | awk -F "=" \'/SONARQUBE_ADMINPW/{print $2}\'',
returnStdout: true
).trim()
echo "SONARQUBE_PWD: ${SONARQUBE_PWD}"
}
}
stage('test') {
echo "Insert testing here..."
}
stage('deploy-test') {
input "Deploy to test?"
openshiftTag destStream: 'assets', verbose: 'true', destTag: 'test', srcStream: 'assets', srcTag: '$BUILD_ID'
}
stage('deploy-prod') {
input "Deploy to prod?"
openshiftTag destStream: 'assets', verbose: 'true', destTag: 'prod', srcStream: 'assets', srcTag: '$BUILD_ID'
}
}