Skip to content

Commit

Permalink
Correct reference to output of prior job
Browse files Browse the repository at this point in the history
  • Loading branch information
andreev-io committed Jan 23, 2025
1 parent 3daa75b commit e1ee260
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions .github/workflows/kubenetmon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,32 +108,27 @@ jobs:
uses: helm/[email protected]

- name: Run chart-testing (lint)
if: steps.list-changed.outputs.changed == 'true'
run: |
ct lint \
--config ct.yaml \
--target-branch ${{ github.event.repository.default_branch }} \
--chart-dirs deploy/helm --charts deploy/helm/kubenetmon-server,deploy/helm/kubenetmon-agent
- name: Create kind cluster
if: ${{ github.event_name == 'pull_request' || github.ref == 'refs/heads/main' }}
uses: helm/[email protected]
with:
config: ${{ github.workspace }}/test/kind-config.yaml

- name: Set up kubectl
if: ${{ github.event_name == 'pull_request' || github.ref == 'refs/heads/main' }}
uses: azure/setup-kubectl@v4

- name: Create required resources for test
if: ${{ github.event_name == 'pull_request' || github.ref == 'refs/heads/main' }}
run: |
kind load docker-image --name chart-testing ${{ needs.build-and-push-image.outputs.image-tags }}
kind load docker-image --name chart-testing ${{ needs.build-docker-image.outputs.image-tags }}
kubectl create namespace kubenetmon-agent
kubectl create namespace kubenetmon-server
- name: Run chart-testing (install)
if: ${{ github.event_name == 'pull_request' || github.ref == 'refs/heads/main' || github.event.inputs.deploy_to_dev == 'true' || github.event.inputs.build_and_push == 'true' }}
run: |
cd kubenetmon/deploy/helm
ct install \
Expand All @@ -143,8 +138,8 @@ jobs:
--charts kubenetmon-agent \
--namespace kubenetmon-agent \
--helm-extra-set-args "\
--set=image.repository=$(echo ${{ needs.build-and-push-image.outputs.image-tags }} | cut -d':' -f1) \
--set=image.tag=$(echo ${{ needs.build-and-push-image.outputs.image-tags }} | cut -d':' -f2) \
--set=image.repository=$(echo ${{ needs.build-docker-image.outputs.image-tags }} | cut -d':' -f1) \
--set=image.tag=$(echo ${{ needs.build-docker-image.outputs.image-tags }} | cut -d':' -f2) \
--set=configuration.skipConntrackSanityCheck=true \
--set=configuration.uptimeWaitDuration=1s"
ct install \
Expand All @@ -154,8 +149,8 @@ jobs:
--charts kubenetmon-server \
--namespace kubenetmon-server \
--helm-extra-set-args "\
--set=image.repository=$(echo ${{ needs.build-and-push-image.outputs.image-tags }} | cut -d':' -f1) \
--set=image.tag=$(echo ${{ needs.build-and-push-image.outputs.image-tags }} | cut -d':' -f2) \
--set=image.repository=$(echo ${{ needs.build-docker-image.outputs.image-tags }} | cut -d':' -f1) \
--set=image.tag=$(echo ${{ needs.build-docker-image.outputs.image-tags }} | cut -d':' -f2) \
--set=inserter.skipPing=true \
--set=inserter.disableTLS=true \
--set=deployment.replicaCount=1 \
Expand Down Expand Up @@ -190,8 +185,8 @@ jobs:

- name: Push to GitHub Container Registry
run: |
IMAGE_TAG=$(echo ${{ needs.build-and-push-image.outputs.image-tags }} | cut -d':' -f2)
docker tag ${{ needs.build-and-push-image.outputs.image-tags }} ghcr.io/${{ github.repository }}:$IMAGE_TAG
docker tag ${{ needs.build-and-push-image.outputs.image-tags }} ghcr.io/${{ github.repository }}:latest
IMAGE_TAG=$(echo ${{ needs.build-docker-image.outputs.image-tags }} | cut -d':' -f2)
docker tag ${{ needs.build-docker-image.outputs.image-tags }} ghcr.io/${{ github.repository }}:$IMAGE_TAG
docker tag ${{ needs.build-docker-image.outputs.image-tags }} ghcr.io/${{ github.repository }}:latest
docker push ghcr.io/${{ github.repository }}:$IMAGE_TAG
docker push ghcr.io/${{ github.repository }}:latest

0 comments on commit e1ee260

Please sign in to comment.