File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,11 +21,18 @@ NS=argocd
2121argocd login --core
2222kubectl config set-context --current --namespace=" $NS "
2323
24+ # Add support for Github PR, which do not have a branch name in the git repository
25+ if [ " ${GITHUB_EVENT_NAME:- } " = " pull_request" ]; then
26+ revision=" $GITHUB_HEAD_REF "
27+ else
28+ revision=" $SPARKMEASURE_WORKBRANCH "
29+ fi
30+
2431argocd app create $app_name --dest-server https://kubernetes.default.svc \
2532 --dest-namespace " $app_name " \
2633 --repo https://github.com/k8s-school/$app_name \
27- --path e2e/charts/apps --revision " $SPARKMEASURE_WORKBRANCH " \
28- -p spec.source.targetRevision.default=" $SPARKMEASURE_WORKBRANCH "
34+ --path e2e/charts/apps --revision " $revision " \
35+ -p spec.source.targetRevision.default=" $revision "
2936
3037argocd app sync $app_name
3138
You can’t perform that action at this time.
0 commit comments