add release to pipeline
This commit is contained in:
parent
bdbe4f4b04
commit
e926d4cb4a
|
@ -1,14 +1,18 @@
|
||||||
pipeline {
|
pipeline {
|
||||||
agent { label 'jenkins-nodejs-agent' }
|
agent { label 'jenkins-nodejs-agent' }
|
||||||
|
|
||||||
|
environment {
|
||||||
|
RELEASE = "0.0.1"
|
||||||
|
}
|
||||||
stages {
|
stages {
|
||||||
stage('Build static content') {
|
stage('Build static content') {
|
||||||
steps {
|
steps {
|
||||||
sh '''
|
sh '''
|
||||||
docker build --progress=plain -t bbuddy/bbuddy_ui:latest .
|
npm install
|
||||||
|
npm run build
|
||||||
|
pwd
|
||||||
|
echo
|
||||||
|
docker build --progress=plain -t bbuddy/bbuddy_ui:${RELEASE} .
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,10 +20,10 @@ pipeline {
|
||||||
steps {
|
steps {
|
||||||
sh '''
|
sh '''
|
||||||
sudo docker login https://harbor-wtkp3fsbv6.vertexa.devbay.tech/ -u 'robot$jenkins' -p 'ZrzsVIAeueW1p0alpAnPfM5CDtaRVVKz'
|
sudo docker login https://harbor-wtkp3fsbv6.vertexa.devbay.tech/ -u 'robot$jenkins' -p 'ZrzsVIAeueW1p0alpAnPfM5CDtaRVVKz'
|
||||||
sudo docker tag bbuddy/bbuddy_ui:latest harbor-wtkp3fsbv6.vertexa.devbay.tech/bbuddy/bbuddy_ui:latest
|
sudo docker tag bbuddy/bbuddy_ui:${RELEASE} harbor-wtkp3fsbv6.vertexa.devbay.tech/bbuddy/bbuddy_ui:${RELEASE}
|
||||||
sudo docker push harbor-wtkp3fsbv6.vertexa.devbay.tech/bbuddy/bbuddy_ui:latest
|
sudo docker push harbor-wtkp3fsbv6.vertexa.devbay.tech/bbuddy/bbuddy_ui:${RELEASE}
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue