Skip to content

Commit

Permalink
Merge branch 'master' into native-sidecar-status
Browse files Browse the repository at this point in the history
  • Loading branch information
martynd authored Jul 25, 2024
2 parents b4c79af + e638c88 commit 1cea807
Show file tree
Hide file tree
Showing 30 changed files with 1,137 additions and 740 deletions.
98 changes: 0 additions & 98 deletions .github/workflows/e2e.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/gh-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
with:
python-version: 3.x
- name: Set up Go
uses: actions/[email protected].1
uses: actions/[email protected].2
with:
go-version: '1.22'
- name: build
Expand Down
40 changes: 3 additions & 37 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,6 @@ permissions:
contents: read

jobs:
event_file:
name: 'Event File'
runs-on: ubuntu-latest
steps:
- name: Upload
uses: actions/upload-artifact@v4
with:
name: Event File
path: ${{ github.event_path }}
lint-go:
permissions:
contents: read # for actions/checkout to fetch code
Expand All @@ -36,7 +27,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/[email protected].1
uses: actions/[email protected].2
with:
go-version: ${{ env.GOLANG_VERSION }}
- name: Checkout code
Expand All @@ -51,7 +42,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/[email protected].1
uses: actions/[email protected].2
with:
go-version: ${{ env.GOLANG_VERSION }}
id: go
Expand All @@ -72,31 +63,6 @@ jobs:
- name: Compile all packages
run: make controller plugin

- name: Test
run: make test-unit

- name: Upload Unit Test Results
if: always()
uses: actions/upload-artifact@v4
with:
name: Unit Test Results
path: |
junit.xml
- name: Generate code coverage artifacts
uses: actions/upload-artifact@v4
with:
name: code-coverage
path: coverage.out

- name: Upload code coverage information to codecov.io
uses: codecov/[email protected]
with:
file: coverage.out
fail_ci_if_error: false
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

codegen:
name: Verify Codegen
runs-on: ubuntu-latest
Expand All @@ -106,7 +72,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Golang
uses: actions/[email protected].1
uses: actions/[email protected].2
with:
go-version: ${{ env.GOLANG_VERSION }}
# k8s codegen generates files into GOPATH location instead of the GitHub git checkout location
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/image-reuse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
if: ${{ github.ref_type != 'tag'}}

- name: Setup Golang
uses: actions/[email protected].1 # v3.5.0
uses: actions/[email protected].2 # v3.5.0
with:
go-version: ${{ inputs.go-version }}

Expand All @@ -78,8 +78,8 @@ jobs:
with:
cosign-release: 'v2.2.0'

- uses: docker/setup-qemu-action@5927c834f5b4fdf503fca6f4c7eccda82949e1ee # v3.1.0
- uses: docker/setup-buildx-action@4fd812986e6c8c2a69e18311145f9371337f27d4 # v3.4.0
- uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0
- uses: docker/setup-buildx-action@aa33708b10e362ff993539393ff100fa93ed6a27 # v3.5.0

- name: Setup tags for container image as a CSV type
run: |
Expand All @@ -106,31 +106,31 @@ jobs:
echo 'EOF' >> $GITHUB_ENV
- name: Login to Quay.io
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: quay.io
username: ${{ secrets.quay_username }}
password: ${{ secrets.quay_password }}
if: ${{ inputs.quay_image_name && inputs.push }}

- name: Login to GitHub Container Registry
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: ghcr.io
username: ${{ secrets.ghcr_username }}
password: ${{ secrets.ghcr_password }}
if: ${{ inputs.ghcr_image_name && inputs.push }}

- name: Login to dockerhub Container Registry
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
username: ${{ secrets.docker_username }}
password: ${{ secrets.docker_password }}
if: ${{ inputs.docker_image_name && inputs.push }}

- name: Build and push container image
id: image
uses: docker/build-push-action@1a162644f9a7e87d8f4b053101d1d9a712edc18c #v6.3.0
uses: docker/build-push-action@5176d81f87c23d6fc96624dfdbcd9f3830bbe445 #v6.5.0
with:
context: .
platforms: ${{ inputs.platforms }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Golang
uses: actions/[email protected].1 # v4.0.1
uses: actions/[email protected].2 # v4.0.1
with:
go-version: ${{ env.GOLANG_VERSION }}

- name: Set up QEMU
uses: docker/setup-qemu-action@5927c834f5b4fdf503fca6f4c7eccda82949e1ee # v3.1.0
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4fd812986e6c8c2a69e18311145f9371337f27d4 # v3.4.0
uses: docker/setup-buildx-action@aa33708b10e362ff993539393ff100fa93ed6a27 # v3.5.0

- name: Generate release artifacts
run: |
Expand All @@ -107,7 +107,7 @@ jobs:
make manifests IMAGE_TAG=${{ github.ref_name }}
- name: Draft release
uses: softprops/action-gh-release@a74c6b72af54cfa997e81df42d94703d6313a2d0 # v0.1.15
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v0.1.15
with:
tag_name: ${{ github.event.inputs.tag }}
draft: true
Expand Down Expand Up @@ -163,7 +163,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Golang
uses: actions/[email protected].1 # v4.0.0
uses: actions/[email protected].2 # v4.0.0
with:
go-version: ${{ env.GOLANG_VERSION }}

Expand Down Expand Up @@ -212,7 +212,7 @@ jobs:
/tmp/sbom.tar.gz
- name: Upload SBOM and signature assets
uses: softprops/action-gh-release@a74c6b72af54cfa997e81df42d94703d6313a2d0 # v0.1.15
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v0.1.15
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# use separate workflow to support fork repositories and dependabot branches when publishing test results: see https://github.com/EnricoMi/publish-unit-test-result-action#support-fork-repositories-and-dependabot-branches
name: Test Results
name: Testing Results

on:
workflow_run:
workflows: ["E2E Tests", "Go"]
workflows: ["Testing"]
types:
- completed
permissions: {}
Expand All @@ -19,27 +19,31 @@ jobs:
actions: read
steps:
- name: Download and Extract Artifacts
# TODO repace with native actions/download-artifact once it supports downloading from another workflow: https://github.com/actions/download-artifact/issues/3
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: |
mkdir -p artifacts && cd artifacts
artifacts_url=${{ github.event.workflow_run.artifacts_url }}
gh api "$artifacts_url" -q '.artifacts[] | [.name, .archive_download_url] | @tsv' | while read artifact
do
IFS=$'\t' read name url <<< "$artifact"
gh api $url > "$name.zip"
unzip -d "$name" "$name.zip"
done
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
run-id: ${{ github.event.workflow_run.id }}
path: artifacts
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Publish Test Results
- name: Publish E2E Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
check_name: "${{ github.event.workflow.name }} Published Test Results"
check_name: "Published E2E Test Results"
compare_to_earlier_commit: false
test_changes_limit: 0
fail_on: "errors"
commit: ${{ github.event.workflow_run.head_sha }}
event_file: artifacts/Event File/event.json
event_name: ${{ github.event.workflow_run.event }}
junit_files: "artifacts/**/junit.xml"
files: "artifacts/**/junit-e2e-test.xml"
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
check_name: "Published Unit Test Results"
compare_to_earlier_commit: false
test_changes_limit: 0
fail_on: "errors"
commit: ${{ github.event.workflow_run.head_sha }}
event_file: artifacts/Event File/event.json
event_name: ${{ github.event.workflow_run.event }}
files: "artifacts/**/junit-unit-test.xml"
Loading

0 comments on commit 1cea807

Please sign in to comment.