From 812dd5abc55b0c88266951d1e8621f543c8096c9 Mon Sep 17 00:00:00 2001 From: Jade Carino Date: Tue, 17 Sep 2024 15:46:07 +0100 Subject: [PATCH 1/3] Improvements from 0.37.0 prerelease Signed-off-by: Jade Carino --- .../pipelines/branch-create-galasa.yaml | 24 +++++++++++++++++++ .../pipelines/branch-delete-all.yaml | 20 ++++++++++++++++ .../pipelines/branch-tag-galasa.yaml | 20 ++++++++++++++++ 3 files changed, 64 insertions(+) diff --git a/releasePipeline/argocd-synced/pipelines/branch-create-galasa.yaml b/releasePipeline/argocd-synced/pipelines/branch-create-galasa.yaml index 578c44bb..16e1750b 100644 --- a/releasePipeline/argocd-synced/pipelines/branch-create-galasa.yaml +++ b/releasePipeline/argocd-synced/pipelines/branch-create-galasa.yaml @@ -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 \ No newline at end of file diff --git a/releasePipeline/argocd-synced/pipelines/branch-delete-all.yaml b/releasePipeline/argocd-synced/pipelines/branch-delete-all.yaml index 70622612..220e303a 100644 --- a/releasePipeline/argocd-synced/pipelines/branch-delete-all.yaml +++ b/releasePipeline/argocd-synced/pipelines/branch-delete-all.yaml @@ -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 diff --git a/releasePipeline/argocd-synced/pipelines/branch-tag-galasa.yaml b/releasePipeline/argocd-synced/pipelines/branch-tag-galasa.yaml index 728a59a2..639aef7d 100644 --- a/releasePipeline/argocd-synced/pipelines/branch-tag-galasa.yaml +++ b/releasePipeline/argocd-synced/pipelines/branch-tag-galasa.yaml @@ -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 From acef7f379605f5260a7b5b5b848ef2408ee72dcf Mon Sep 17 00:00:00 2001 From: Jade Carino Date: Thu, 19 Sep 2024 10:30:12 +0100 Subject: [PATCH 2/3] github-enterprise-credentials Secret should inherit annotation from ExternalSecret Signed-off-by: Jade Carino --- .../secret-github-enterprise-credentials.yaml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/infrastructure/cicsk8s/galasa-build/external-secrets/secret-github-enterprise-credentials.yaml b/infrastructure/cicsk8s/galasa-build/external-secrets/secret-github-enterprise-credentials.yaml index be837553..445ba837 100644 --- a/infrastructure/cicsk8s/galasa-build/external-secrets/secret-github-enterprise-credentials.yaml +++ b/infrastructure/cicsk8s/galasa-build/external-secrets/secret-github-enterprise-credentials.yaml @@ -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 }}" @@ -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 \ No newline at end of file From 07b1ce794065c335cb5c1b8ec3cf563f861cc707 Mon Sep 17 00:00:00 2001 From: Jade Carino Date: Thu, 19 Sep 2024 10:51:15 +0100 Subject: [PATCH 3/3] Create and delete simplatform app in pre and release Signed-off-by: Jade Carino --- releasePipeline/02-create-argocd-apps.sh | 17 +++++++++++++++++ releasePipeline/92-delete-argocd-apps.sh | 2 ++ 2 files changed, 19 insertions(+) diff --git a/releasePipeline/02-create-argocd-apps.sh b/releasePipeline/02-create-argocd-apps.sh index d6c14f0e..0d791626 100755 --- a/releasePipeline/02-create-argocd-apps.sh +++ b/releasePipeline/02-create-argocd-apps.sh @@ -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 diff --git a/releasePipeline/92-delete-argocd-apps.sh b/releasePipeline/92-delete-argocd-apps.sh index 40b6ca12..4e383f24 100755 --- a/releasePipeline/92-delete-argocd-apps.sh +++ b/releasePipeline/92-delete-argocd-apps.sh @@ -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" \ No newline at end of file