Skip to content
Snippets Groups Projects
Commit 6f2917fc authored by Martin Lowe's avatar Martin Lowe :flag_ca:
Browse files

Merge branch 'malowe/main/216' into 'main'

Iss #216 - Update Jenkinsfile + staging k8s for new latest-staging tag

Closes #216

See merge request eclipsefdn/it/api/eclipsefdn-project-adopters!256
parents bca15892 2e10589a
No related branches found
No related tags found
No related merge requests found
...@@ -106,6 +106,16 @@ pipeline { ...@@ -106,6 +106,16 @@ pipeline {
""", """,
returnStdout: true returnStdout: true
) )
LATEST_TAG_NAME = sh(
script: """
if [ "${env.ENVIRONMENT}" = "staging" ]; then
printf latest-staging
else
printf latest
fi
""",
returnStdout: true
)
} }
options { options {
...@@ -139,7 +149,7 @@ pipeline { ...@@ -139,7 +149,7 @@ pipeline {
steps { steps {
unstash name: "target" unstash name: "target"
sh ''' sh '''
docker build -f src/main/docker/Dockerfile.jvm --no-cache -t ${IMAGE_NAME}:${TAG_NAME} -t ${IMAGE_NAME}:latest . docker build -f src/main/docker/Dockerfile.jvm --no-cache -t ${IMAGE_NAME}:${TAG_NAME} -t ${IMAGE_NAME}:${LATEST_TAG_NAME} .
''' '''
} }
} }
...@@ -158,7 +168,7 @@ pipeline { ...@@ -158,7 +168,7 @@ pipeline {
withDockerRegistry([credentialsId: '04264967-fea0-40c2-bf60-09af5aeba60f', url: 'https://index.docker.io/v1/']) { withDockerRegistry([credentialsId: '04264967-fea0-40c2-bf60-09af5aeba60f', url: 'https://index.docker.io/v1/']) {
sh ''' sh '''
docker push ${IMAGE_NAME}:${TAG_NAME} docker push ${IMAGE_NAME}:${TAG_NAME}
docker push ${IMAGE_NAME}:latest docker push ${IMAGE_NAME}:${LATEST_TAG_NAME}
''' '''
} }
} }
......
...@@ -30,7 +30,7 @@ spec: ...@@ -30,7 +30,7 @@ spec:
weight: 1 weight: 1
containers: containers:
- name: app - name: app
image: eclipsefdn/eclipsefdn-project-adopters:latest image: eclipsefdn/eclipsefdn-project-adopters:latest-staging
imagePullPolicy: Always imagePullPolicy: Always
ports: ports:
- containerPort: 8090 - containerPort: 8090
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment