add release to pipeline

This commit is contained in:
Witalij Poljatchek 2024-07-17 21:48:15 +02:00
parent bdbe4f4b04
commit e926d4cb4a
1 changed files with 11 additions and 7 deletions

16
Jenkinsfile vendored
View File

@ -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,8 +20,8 @@ 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}
''' '''
} }
} }