[15.02.20] Image config mapping with SED

This commit is contained in:
andyjk15 2020-02-15 17:09:06 +00:00
parent dae197fdfe
commit 93de25756c
2 changed files with 3 additions and 34 deletions

View File

@ -23,7 +23,7 @@ spec:
spec: spec:
containers: containers:
- name: db-gateway - name: db-gateway
image: registry.cryptosky.me:4243/ image: REPOSITORY_IMAGE
env: env:
- name: KUBERNETES_NAMESPACE - name: KUBERNETES_NAMESPACE
valueFrom: valueFrom:
@ -85,34 +85,3 @@ spec:
memory: 256Mi memory: 256Mi
restartPolicy: Always restartPolicy: Always
triggers: [] triggers: []
parameters:
- name: RESOURCE_NAME
displayName: Resource Name
description: The name of the deployment configuration resource that also matches other resources.
required: true
- name: APP_LABEL
displayName: Application Label
description: Name of the application label that should be used in all resources.
required: true
- name: IMAGE
displayName: Image Reference
description: Complete reference to an image in external Docker Registry.
required: true
- name: IMAGE_VERSION
displayName: Image Version
description: Version of specific image to pull from external Docker registry.
required: true
- name: LIVENESS_PATH
displayName: Liveness Probe Path
description: Path to use in HTTP Get for the liveness probe.
value: /health
required: false
- name: READINESS_PATH
displayName: Readiness Probe Path
description: Path to use in HTTP Get for the readiness probe.
value: /info
required: false
- name: SPRING_PROFILES_ACTIVE
displayName: Spring Profiles Active
description: The active Spring profile(s)
required: false

View File

@ -83,7 +83,7 @@ try {
stage('Build Image') { stage('Build Image') {
mvn 'clean package -DskipTests' mvn 'clean package -DskipTests'
sh "sed -i 's/BUILD_NUMBER/${env.APPLICATION_VERSION}/g' configuration/kubernetes/deploy-config.yaml" sh "sed -i 's/REPOSITORY_IMAGE/${env.DOCKER_REPOSITORY}/${env.APPLICATION_NAME}:${env.APPLICATION_VERSION}/g' configuration/kubernetes/deploy-config.yaml"
sh "cat configuration/kubernetes/deploy-config.yaml" sh "cat configuration/kubernetes/deploy-config.yaml"
// Update build config for kubernetes // Update build config for kubernetes