try this way of substituting in branch

This commit is contained in:
Seth Call 2025-07-19 21:18:44 -05:00
parent 90ea59f048
commit 4aaf7dfb08
2 changed files with 9 additions and 1 deletions

View File

@ -139,6 +139,14 @@ pipelines:
- step:
name: Deploy K8s apps (staging)
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
variables:
KUBE_CONFIG: $KUBE_CONFIG_STG

View File

@ -10,7 +10,7 @@ spec:
source:
path: k8s/argocd/overlays/{{ .Values.environment }}
repoURL: 'git@bitbucket.org:jamkazam/video-iac.git'
targetRevision: {{ .Values.gitBranch }}
targetRevision: ${CI_BUILD_BRANCH}
project: default
# syncPolicy:
# automated: