@@ -45,3 +45,6 @@ nbdist/
!*/build/*.java
!*/build/*.html
!*/build/*.xml
+
+.vscode/
+git
@@ -1,5 +1,8 @@
pipeline {
agent any
+ environment {
+ BRANCH_NAME="${env.BRANCH_NAME}".toLowerCase()
+ }
stages {
stage('pullCode'){
steps{
@@ -12,7 +15,7 @@ pipeline {
echo 'Building..'
sh 'docker-compose down'
sh '~/tools/apache-maven-3.6.3/bin/mvn clean install -Dmaven.test.skip=true'
- sh 'docker build -t red:${BUILD_NUMBER} .'
+ sh 'docker build -t ${BRANCH_NAME}:${BUILD_NUMBER} .'
}
stage('Test') {
@@ -1,6 +1,6 @@
services:
- post-project-api-red:
- image: red:${BUILD_NUMBER}
+ post-project-api:
+ image: ${BRANCH_NAME}:${BUILD_NUMBER}
ports:
- 8182:8080
networks: