Skip to content

Commit

Permalink
fix: release chart for pullrequest
Browse files Browse the repository at this point in the history
need to protect .git-credentials from test that is erasing password
  • Loading branch information
msvticket committed Jan 8, 2024
1 parent 06568b7 commit 0150e5b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
23 changes: 23 additions & 0 deletions .lighthouse/jenkins-x/pullrequest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ spec:
- name: jx-variables
- name: build-make-linux
resources: {}
- name: protect-credentials
securityContext:
runAsUser: 0
resources: {}
image: ghcr.io/distroless/busybox
script: |
#!/bin/sh
cp -a /tekton/home/.git-credentials /tekton/home/.git-credentials.bak
- name: build-make-test
resources: {}
- name: build-container-build:webhooks
Expand Down Expand Up @@ -73,6 +81,21 @@ spec:
source .jx/variables.sh
cp /tekton/creds-secrets/tekton-container-registry-auth/.dockerconfigjson /kaniko/.docker/config.json
/kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=docker/gc/Dockerfile --destination=ghcr.io/jenkins-x/lighthouse-gc-jobs:$VERSION --build-arg=VERSION=$VERSION
- image: ghcr.io/jenkins-x/jx-boot:3.10.131
name: release-chart
resources: {}
script: |
#!/usr/bin/env sh
source .jx/variables.sh
if [ -d "charts/$REPO_NAME" ]; then
jx gitops yset -p version -v "$VERSION" -f ./charts/$REPO_NAME/Chart.yaml
jx gitops yset -p appVersion -v "$VERSION" -f ./charts/$REPO_NAME/Chart.yaml
jx gitops yset -p image.tag -v "$VERSION" -f ./charts/$REPO_NAME/values.yaml;
else echo no charts; fi
mv /tekton/home/.git-credentials.bak /tekton/home/.git-credentials
jx gitops helm release
podTemplate: {}
serviceAccountName: tekton-bot
timeout: 240h0m0s
Expand Down
2 changes: 1 addition & 1 deletion .lighthouse/jenkins-x/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ spec:
/kaniko/executor $KANIKO_FLAGS --context=/workspace/source --dockerfile=docker/gc/Dockerfile --destination=ghcr.io/jenkins-x/lighthouse-gc-jobs:$VERSION --destination=ghcr.io/jenkins-x/lighthouse-gc-jobs:latest --build-arg=VERSION=$VERSION
- name: chart-docs
resources: {}
- image: ghcr.io/jenkins-x/jx-boot:3.10.73
- image: ghcr.io/jenkins-x/jx-boot:3.10.126
name: changelog
resources: {}
script: |
Expand Down

0 comments on commit 0150e5b

Please sign in to comment.