Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

ci(shared): bump vendored ci files #549

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions ci/vendir.lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ apiVersion: vendir.k14s.io/v1alpha1
directories:
- contents:
- git:
commitTitle: 'chore: more generic test-on-docker-host'
sha: 0c17e2d69a71a42b83b8fbd0136abd27b8d97a74
commitTitle: 'ci: new metadata scheme (#36)'
sha: 3edfe7d25e5fe2162fd49b944dd0d512eeabd512
path: .
path: ../.github/workflows/vendor
- contents:
- git:
commitTitle: 'chore: more generic test-on-docker-host'
sha: 0c17e2d69a71a42b83b8fbd0136abd27b8d97a74
commitTitle: 'ci: new metadata scheme (#36)'
sha: 3edfe7d25e5fe2162fd49b944dd0d512eeabd512
path: .
path: ./vendor
kind: LockConfig
4 changes: 2 additions & 2 deletions ci/vendir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ directories:
- path: . # Copy this folder out to ..
git:
url: https://github.com/GaloyMoney/concourse-shared.git
ref: 0c17e2d69a71a42b83b8fbd0136abd27b8d97a74
ref: 3edfe7d25e5fe2162fd49b944dd0d512eeabd512
includePaths:
- shared/actions/*
excludePaths:
Expand All @@ -20,7 +20,7 @@ directories:
- path: .
git:
url: https://github.com/GaloyMoney/concourse-shared.git
ref: 0c17e2d69a71a42b83b8fbd0136abd27b8d97a74
ref: 3edfe7d25e5fe2162fd49b944dd0d512eeabd512
includePaths:
- shared/ci/**/*
excludePaths:
Expand Down
8 changes: 6 additions & 2 deletions ci/vendor/pipeline-fragments.lib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
#@ return "us.gcr.io/galoy-org"
#@ end

#@ def private_docker_registry():
#@ return "gcr.io/galoy-org"
#@ end

#@ def nodejs_concourse_image():
#@ return public_docker_registry() + "/nodejs-concourse"
#@ end
Expand Down Expand Up @@ -402,14 +406,14 @@ source:
private_key: #@ data.values.github_private_key
#@ end

#@ def edge_image_resource():
#@ def edge_image_resource(publicRepo = True):
name: edge-image
type: registry-image
source:
tag: edge
username: #@ data.values.docker_registry_user
password: #@ data.values.docker_registry_password
repository: #@ public_docker_registry() + "/" + data.values.gh_repository
repository: #@ public_docker_registry() if publicRepo else private_docker_registry() + "/" + data.values.gh_repository
#@ end

#@ def nodejs_deps_resource(webhook = False):
Expand Down
7 changes: 5 additions & 2 deletions ci/vendor/tasks/chart-open-charts-pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@
set -eu

export digest=$(cat ./edge-image/digest)
export ref=$(cat ./repo/.git/short_ref)

pushd charts-repo

ref=$(yq e '.image.git_ref' charts/${CHARTS_SUBDIR}/values.yaml)
git checkout ${BRANCH}
old_ref=$(yq e '.image.git_ref' charts/${CHARTS_SUBDIR}/values.yaml)

old_digest=$(yq e '.image.digest' "./charts/${CHARTS_SUBDIR}/values.yaml")
old_ref=$(grep "digest: \"${old_digest}\"" "./charts/${CHARTS_SUBDIR}/values.yaml" \
| sed -n 's/.*commit_ref=\([^;]*\);.*/\1/p' | tr -d ' \n')

cat <<EOF >> ../body.md
# Bump ${CHARTS_SUBDIR} image
Expand Down
4 changes: 3 additions & 1 deletion ci/vendor/tasks/docker-bump-image-digest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ export app_version=$(cat version/version)
pushd charts-repo

yq -i e '.image.digest = strenv(digest)' ./charts/${CHARTS_SUBDIR}/values.yaml
yq -i e '.image.git_ref = strenv(ref)' ./charts/${CHARTS_SUBDIR}/values.yaml

sed -i "s|\(digest: \"${digest}\"\).*$|\1 # METADATA:: repository=https://github.com/GaloyMoney/${CHARTS_SUBDIR};commit_ref=${ref};app=${CHARTS_SUBDIR};|g" "./charts/${CHARTS_SUBDIR}/values.yaml"

yq -i e '.appVersion = strenv(app_version)' ./charts/${CHARTS_SUBDIR}/Chart.yaml

if [[ -z $(git config --global user.email) ]]; then
Expand Down
Loading