Skip to content

[release/v1.1] cherry-pick main (#3935) #1

[release/v1.1] cherry-pick main (#3935)

[release/v1.1] cherry-pick main (#3935) #1

Workflow file for this run

name: Release
permissions:
contents: read
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- "v*.*.*"
jobs:
# For push event, we run benchmark test here because we need to
# include benchmark report in the release.
benchmark-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: ./tools/github-actions/setup-deps
# Benchmark
- name: Run Benchmark tests
env:
KIND_NODE_TAG: v1.28.9
IMAGE_PULL_POLICY: IfNotPresent
# Args for benchmark test
BENCHMARK_RPS: 10000
BENCHMARK_CONNECTIONS: 100
BENCHMARK_DURATION: 30
BENCHMARK_CPU_LIMITS: 1000m
BENCHMARK_MEMORY_LIMITS: 2000Mi
BENCHMARK_REPORT_DIR: benchmark_report
run: make benchmark
- name: Package benchmark report
run: cd test/benchmark && zip -r benchmark_report.zip benchmark_report
- name: Upload Benchmark Report
uses: actions/upload-artifact@v4 # version is better be consistent with actions/download-artifact
with:
name: benchmark_report
path: test/benchmark/benchmark_report.zip
release:
runs-on: ubuntu-22.04
needs: [benchmark-test]
permissions:
contents: write
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Extract Release Tag and Commit SHA
id: vars
shell: bash
run: |
echo "release_tag=$(echo ${GITHUB_REF##*/})" >> $GITHUB_ENV
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Login to DockerHub
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Retag and push existing gateway-dev image
run: |
skopeo copy --all docker://docker.io/envoyproxy/gateway-dev:${{ env.sha_short }} docker://docker.io/envoyproxy/gateway:${{ env.release_tag }}
- name: Generate Release Artifacts
run: IMAGE_PULL_POLICY=IfNotPresent make generate-artifacts IMAGE=envoyproxy/gateway TAG=${{ env.release_tag }} OUTPUT_DIR=release-artifacts
- name: Build and Push EG Release Helm Chart
run: IMAGE_PULL_POLICY=IfNotPresent OCI_REGISTRY=oci://docker.io/envoyproxy CHART_VERSION=${{ env.release_tag }} IMAGE=docker.io/envoyproxy/gateway TAG=${{ env.release_tag }} make helm-package helm-push
- name: Download Benchmark Report
uses: actions/download-artifact@v4
with:
name: benchmark_report
path: release-artifacts
- name: Upload Release Manifests
uses: softprops/action-gh-release@a74c6b72af54cfa997e81df42d94703d6313a2d0 # v0.1.15
with:
files: |
release-artifacts/install.yaml
release-artifacts/quickstart.yaml
release-artifacts/release-notes.yaml
release-artifacts/benchmark_report.zip
release-artifacts/egctl_${{ env.release_tag }}_linux_amd64.tar.gz
release-artifacts/egctl_${{ env.release_tag }}_linux_arm64.tar.gz
release-artifacts/egctl_${{ env.release_tag }}_darwin_amd64.tar.gz
release-artifacts/egctl_${{ env.release_tag }}_darwin_arm64.tar.gz