Skip to content

Commit

Permalink
build v2
Browse files Browse the repository at this point in the history
  • Loading branch information
havardelnan committed Nov 18, 2024
1 parent 31ec6c8 commit 2733a8d
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
paths-ignore:
- 'v2/**'
- '.github/workflows/agentv2.yml'
- 'charts/ror-cluster-agent-v2/**'
# Publish semver tags as releases.
#tags: [ 'v*.*.*' ]
pull_request:
Expand Down Expand Up @@ -162,6 +163,7 @@ jobs:
runs-on: ubuntu-latest
needs:
- bump-version
- build-container-image
env:
ROR_VERSION: ${{ needs.bump-version.outputs.ror_version }}
steps:
Expand All @@ -182,7 +184,6 @@ jobs:

- name: Build helm chart
run: |
ls -laR
./yq e -i '.version = strenv(ROR_VERSION),.appVersion = strenv(ROR_VERSION)' charts/ror-cluster-agent-v1/Chart.yaml
./yq e -i '.image.tag = strenv(ROR_VERSION)' charts/ror-cluster-agent-v1/values.yaml
./yq e -i '.image.repository = "ncr.sky.nhn.no/ror/cluster-agent"' charts/ror-cluster-agent-v1/values.yaml
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/agentv2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
paths:
- v2/**
- .github/workflows/agentv2.yml
- 'charts/ror-cluster-agent-v2/**'
# Publish semver tags as releases.
#tags: [ 'v*.*.*' ]
pull_request:
Expand Down Expand Up @@ -158,3 +159,34 @@ jobs:
# This step uses the identity token to provision an ephemeral certificate
# against the sigstore community Fulcio instance.
run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}
publish-helm:
runs-on: ubuntu-latest
needs:
- build-container-image
- bump-version
env:
ROR_VERSION: ${{ needs.bump-version.outputs.ror_version }}
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install helm
uses: azure/setup-helm@v1
with:
version: v3.15.0

- name: install-yq
run: |
wget https://github.com/mikefarah/yq/releases/download/${VERSION}/${BINARY}.tar.gz -O - | tar xz && mv ${BINARY} yq && chmod +x yq
env:
VERSION: v4.44.5
BINARY: yq_linux_amd64

- name: Build helm chart
run: |
./yq e -i '.version = strenv(ROR_VERSION),.appVersion = strenv(ROR_VERSION)' charts/ror-cluster-agent-v2/Chart.yaml
./yq e -i '.image.tag = strenv(ROR_VERSION)' charts/ror-cluster-agent-v2/values.yaml
./yq e -i '.image.repository = "ncr.sky.nhn.no/ror/cluster-agent"' charts/ror-cluster-agent-v2/values.yaml
helm package charts/ror-cluster-agent-v2
echo ${{ secrets.GITHUB_TOKEN }} | helm registry login -u ${{ github.actor }} ${{ env.REGISTRY }} --password-stdin
helm push ror-cluster-agent-${ROR_VERSION}.tgz oci://${{ env.REGISTRY }}/norskhelsenett/helm/

0 comments on commit 2733a8d

Please sign in to comment.