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

Merge branch 'malowe/main/36' into 'main'

Iss #36 - Update Jenkinsfile + k8s for latest-staging tag + OKD probes

Closes #36

See merge request !23
parents 83b36f0f 666eedcc
No related branches found
No related tags found
1 merge request!23Iss #36 - Update Jenkinsfile + k8s for latest-staging tag + OKD probes
Pipeline #42160 passed
...@@ -95,6 +95,16 @@ pipeline { ...@@ -95,6 +95,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 {
...@@ -123,7 +133,7 @@ pipeline { ...@@ -123,7 +133,7 @@ pipeline {
readTrusted 'src/main/docker/Dockerfile.jvm' readTrusted 'src/main/docker/Dockerfile.jvm'
unstash 'target' unstash '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} .
''' '''
} }
} }
...@@ -142,7 +152,7 @@ pipeline { ...@@ -142,7 +152,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}
''' '''
} }
} }
......
...@@ -41,6 +41,26 @@ spec: ...@@ -41,6 +41,26 @@ spec:
requests: requests:
cpu: 300m cpu: 300m
memory: 384Mi memory: 384Mi
startupProbe:
httpGet:
path: /openvsx/q/health
port: 8090
scheme: HTTP
timeoutSeconds: 1
initialDelaySeconds: 20
periodSeconds: 10
successThreshold: 1
failureThreshold: 3
livenessProbe:
httpGet:
path: /openvsx/q/health
port: 8090
scheme: HTTP
timeoutSeconds: 1
initialDelaySeconds: 60
periodSeconds: 60
successThreshold: 1
failureThreshold: 3
env: env:
- name: CONFIG_SECRET_PATH - name: CONFIG_SECRET_PATH
value: "/run/secrets/openvsx-api/secret.properties" value: "/run/secrets/openvsx-api/secret.properties"
......
...@@ -30,7 +30,7 @@ spec: ...@@ -30,7 +30,7 @@ spec:
weight: 1 weight: 1
containers: containers:
- name: app - name: app
image: eclipsefdn/eclipse-openvsx-api:latest image: eclipsefdn/eclipse-openvsx-api:latest-staging
imagePullPolicy: Always imagePullPolicy: Always
ports: ports:
- containerPort: 8090 - containerPort: 8090
...@@ -41,6 +41,26 @@ spec: ...@@ -41,6 +41,26 @@ spec:
requests: requests:
cpu: 300m cpu: 300m
memory: 384Mi memory: 384Mi
startupProbe:
httpGet:
path: /openvsx/q/health
port: 8090
scheme: HTTP
timeoutSeconds: 1
initialDelaySeconds: 20
periodSeconds: 10
successThreshold: 1
failureThreshold: 3
livenessProbe:
httpGet:
path: /openvsx/q/health
port: 8090
scheme: HTTP
timeoutSeconds: 1
initialDelaySeconds: 60
periodSeconds: 60
successThreshold: 1
failureThreshold: 3
env: env:
- name: CONFIG_SECRET_PATH - name: CONFIG_SECRET_PATH
value: "/run/secrets/openvsx-api/secret.properties" value: "/run/secrets/openvsx-api/secret.properties"
......
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