This repository has been archived by the owner on Jan 31, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[skip ci] Add rendered and modified Helm chart
- Loading branch information
1 parent
aad3721
commit 22bb43c
Showing
1 changed file
with
94 additions
and
0 deletions.
There are no files selected for viewing
94 changes: 94 additions & 0 deletions
94
stakater-pr-cleaner/rendered/stakater-pr-cleaner-0.0.6.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
--- | ||
# Source: stakater-pr-cleaner/templates/clustertask.yaml | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: Task | ||
metadata: | ||
name: stakater-pr-cleaner-0.0.6 | ||
spec: | ||
params: | ||
- name: PR_NUMBER | ||
description: In case of PR, PR number that is to be used in image tag. If this field is empty it means that it's a commit on main branch | ||
default: "NA" | ||
- name: REPO_PATH | ||
description: Path of repository with group name | ||
default: "NA" | ||
- name: GIT_ORGANIZATION | ||
description: Git organization URL | ||
default: "" | ||
- name: GIT_CD_REPO | ||
description: The Directory to update CD manifests | ||
default: "" | ||
- name: TEAM | ||
description: The git revision | ||
default: "NA" | ||
- name: NAMESPACE | ||
description: Build namespace | ||
stepTemplate: | ||
resources: | ||
requests: | ||
cpu: 250m | ||
memory: 1Gi | ||
steps: | ||
- name: update-cd-repo-on-merge | ||
image: stakater/pipeline-toolbox:v0.0.31 | ||
command: ["/bin/bash"] | ||
env: | ||
- name: GIT_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: github-stakater-tekton-bot | ||
key: password | ||
- name: GIT_USERNAME | ||
valueFrom: | ||
secretKeyRef: | ||
name: github-stakater-tekton-bot | ||
key: username | ||
- name: GIT_EMAIL | ||
valueFrom: | ||
secretKeyRef: | ||
name: github-stakater-tekton-bot | ||
key: email | ||
args: | ||
- -c | ||
- | | ||
git clone https://$(params.GIT_ORGANIZATION)/$(params.GIT_CD_REPO) | ||
cd $(inputs.params.GIT_CD_REPO) | ||
if [ $(params.TEAM) == "NA" ]; then | ||
TEAM=$(echo $(params.NAMESPACE) | cut -d'-' -f 1) | ||
else | ||
TEAM=$(params.TEAM) | ||
fi | ||
echo "TEAM is ${TEAM}" | ||
REPO=$(echo $(inputs.params.REPO_PATH) | rev | cut -d'/' -f 1 | rev ) | ||
echo "Repo is ${REPO}" | ||
cd *$TEAM | ||
cd apps | ||
cd *$REPO | ||
git config --global user.name $GIT_USERNAME | ||
git config --global user.email $GIT_EMAIL | ||
rm *preview/pr-$(inputs.params.PR_NUMBER).yaml | ||
git add . | ||
git commit -m "remove manifest for ${REPO} pr - | ||
$(inputs.params.PR_NUMBER)" | ||
git push | ||
while [ $? -ne 0 ]; do | ||
echo "Error on Push" | ||
echo "Pulling via Rebase" | ||
git pull --rebase | ||
echo "Pushing" | ||
git push | ||
done |