diff --git a/Jenkinsfile b/Jenkinsfile index 2171d7f..bc1fbfd 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,14 +1,18 @@ pipeline { agent { label 'jenkins-nodejs-agent' } - - - + environment { + RELEASE = "0.0.1" + } stages { stage('Build static content') { steps { 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 { sh ''' 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 push 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:${RELEASE} ''' } } } -} \ No newline at end of file +}