try this way of substituting in branch
This commit is contained in:
parent
90ea59f048
commit
4aaf7dfb08
|
|
@ -139,6 +139,14 @@ pipelines:
|
||||||
- step:
|
- step:
|
||||||
name: Deploy K8s apps (staging)
|
name: Deploy K8s apps (staging)
|
||||||
script:
|
script:
|
||||||
|
# Set a default branch for local testing or safety if BITBUCKET_BRANCH is not always present
|
||||||
|
- export BITBUCKET_BRANCH=${BITBUCKET_BRANCH:-notarealbranch}
|
||||||
|
|
||||||
|
# Template argocd/base/applications.yaml in place for the current pipeline run
|
||||||
|
- envsubst < k8s/argocd/base/applications.yaml > k8s/argocd/base/applications.yaml.tmp
|
||||||
|
- mv k8s/argocd/base/applications.yaml.tmp k8s/argocd/base/applications.yaml
|
||||||
|
|
||||||
|
# Now run kubectl apply -k. Kustomize will pick up the modified base file.
|
||||||
- pipe: atlassian/kubectl-run:3.1.2
|
- pipe: atlassian/kubectl-run:3.1.2
|
||||||
variables:
|
variables:
|
||||||
KUBE_CONFIG: $KUBE_CONFIG_STG
|
KUBE_CONFIG: $KUBE_CONFIG_STG
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ spec:
|
||||||
source:
|
source:
|
||||||
path: k8s/argocd/overlays/{{ .Values.environment }}
|
path: k8s/argocd/overlays/{{ .Values.environment }}
|
||||||
repoURL: 'git@bitbucket.org:jamkazam/video-iac.git'
|
repoURL: 'git@bitbucket.org:jamkazam/video-iac.git'
|
||||||
targetRevision: {{ .Values.gitBranch }}
|
targetRevision: ${CI_BUILD_BRANCH}
|
||||||
project: default
|
project: default
|
||||||
# syncPolicy:
|
# syncPolicy:
|
||||||
# automated:
|
# automated:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue