Skip to content

Commit

Permalink
Iterate
Browse files Browse the repository at this point in the history
  • Loading branch information
andreev-io committed Jan 23, 2025
1 parent 0a8c186 commit b60acb9
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 31 deletions.
64 changes: 33 additions & 31 deletions .github/workflows/kubenetmon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ jobs:
- name: Run chart-testing (install)
run: |
cd kubenetmon/deploy/helm
cd deploy/helm
ct install \
--config ../../../.github/workflows/configs/ct.yaml \
--target-branch ${{ github.event.repository.default_branch }} \
Expand Down Expand Up @@ -160,33 +160,35 @@ jobs:
--set=cloud=gcp"
docker-publish:
name: Publish Docker image
needs: [golangci, test, build-docker-image, helm-test]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
permissions:
contents: read
packages: write
steps:
- name: Download Docker image
uses: actions/download-artifact@v4
with:
name: docker-image

- name: Load Docker image
run: docker load -i image.tar

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push to GitHub Container Registry
run: |
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
name: Publish Docker image
needs: [golangci, test, build-docker-image, helm-test]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
permissions:
contents: read
packages: write
steps:
- name: Download Docker image
uses: actions/download-artifact@v4
with:
name: docker-image

- name: Load Docker image
run: docker load -i image.tar

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push to GitHub Container Registry
run: |
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
gh pkg meta ghcr.io/${{ github.repository }}:$IMAGE_TAG --visibility public
gh pkg meta ghcr.io/${{ github.repository }}:latest --visibility public
1 change: 1 addition & 0 deletions test/test-kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ clickhouse_pod=$(kubectl get pods -l app=clickhouse -o jsonpath="{.items[0].meta
# Execute the SQL command
kubectl exec -i "$clickhouse_pod" -- clickhouse-client --query="$(cat test/network_flows_0.sql)"
# Port forwarding for integration tests
sleep 15
kubectl port-forward svc/clickhouse 9000:9000 &

# 3. Build kubenetmon docker image
Expand Down

0 comments on commit b60acb9

Please sign in to comment.