Skip to content

Commit

Permalink
Merge pull request #614 from galasa-dev/37-release-improvements
Browse files Browse the repository at this point in the history
0.37.0 release improvements
  • Loading branch information
jadecarino authored Sep 19, 2024
2 parents 2499442 + c7cae92 commit 01ee249
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ spec:
target:
name: github-enterprise-credentials
template:
metadata:
annotations:
tekton.dev/git-1: https://github.ibm.com
type: kubernetes.io/basic-auth
data:
username: "{{ .username }}"
Expand All @@ -33,9 +36,3 @@ spec:
remoteRef:
property: token
key: galasa-secrets/github-enterprise-credentials


# The annotation does not seem to be being inherited by the Secret from the ExternalSecret
# The annotation has been applied manually with kubectl patch
# If the ExternalSecret app on ArgoCD is synced the annotation will disappear, so run:
# kubectl annotate secret github-enterprise-credentials -n galasa-build tekton.dev/git-1=https://github.ibm.com
17 changes: 17 additions & 0 deletions releasePipeline/02-create-argocd-apps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,27 @@ function create_cli {
--helm-set branch=${release_type} \
--helm-set imageTag=${release_type}
}

function create_simplatform {
argocd app create ${release_type}-simplatform \
--project default \
--sync-policy auto \
--sync-option Prune=true \
--self-heal \
--repo https://github.com/galasa-dev/automation \
--revision HEAD \
--path infrastructure/galasa-plan-b-lon02/galasa-development/simplatform \
--dest-server https://kubernetes.default.svc \
--dest-namespace galasa-development \
--helm-set branch=${release_type} \
--helm-set imageTag=main
}

# checks if it's been called by 01-run-pre-release.sh, if it isn't run all functions
if [[ "$CALLED_BY_PRERELEASE" == "" ]]; then
ask_user_for_release_type
set -e
create_maven_repos
create_cli
create_simplatform
fi
2 changes: 2 additions & 0 deletions releasePipeline/92-delete-argocd-apps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@

argocd app delete release-maven-repos
argocd app delete release-cli
argocd app delete release-simplatform
argocd app delete prerelease-maven-repos
argocd app delete prerelease-cli
argocd app delete prerelease-simplatform

echo "Complete"
24 changes: 24 additions & 0 deletions releasePipeline/argocd-synced/pipelines/branch-create-galasa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -312,4 +312,28 @@ spec:
- $(params.overwrite)
- $(params.force)
- --credentials
- /creds/githubcreds.yaml
#
#
#
- name: clone-branch-buildutils
taskRef:
name: galasabld
params:
- name: context
value: $(context.pipelineRun.name)
- name: command
value:
- github
- branch
- copy
- --repository
- buildutils
- --to
- $(params.distBranch)
- --branch
- $(params.fromBranch)
- $(params.overwrite)
- $(params.force)
- --credentials
- /creds/githubcreds.yaml
20 changes: 20 additions & 0 deletions releasePipeline/argocd-synced/pipelines/branch-delete-all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -259,3 +259,23 @@ spec:
- $(params.distBranch)
- --credentials
- /creds/githubcreds.yaml
#
####### Buildutils
#
- name: delete-branch-buildutils
taskRef:
name: galasabld
params:
- name: context
value: $(context.pipelineRun.name)
- name: command
value:
- github
- branch
- delete
- --repository
- buildutils
- --branch
- $(params.distBranch)
- --credentials
- /creds/githubcreds.yaml
20 changes: 20 additions & 0 deletions releasePipeline/argocd-synced/pipelines/branch-tag-galasa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -279,3 +279,23 @@ spec:
- $(params.tag)
- --credentials
- /creds/githubcreds.yaml

- name: tag-branch-buildutils
taskRef:
name: galasabld
params:
- name: context
value: $(context.pipelineRun.name)
- name: command
value:
- github
- branch
- tag
- --repository
- buildutils
- --branch
- $(params.distBranch)
- --tag
- $(params.tag)
- --credentials
- /creds/githubcreds.yaml

0 comments on commit 01ee249

Please sign in to comment.