|
| 1 | +name: "FIPS Release" |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + # Sequence of patterns matched against refs/tags |
| 6 | + tags: |
| 7 | + - "v*.*.*" |
| 8 | + |
| 9 | +permissions: |
| 10 | + contents: read |
| 11 | + |
| 12 | +env: |
| 13 | + PLATFORMS: "linux_amd64" |
| 14 | + IMAGE_PLATFORMS: "linux/amd64" |
| 15 | + |
| 16 | +jobs: |
| 17 | + lint: |
| 18 | + runs-on: [self-hosted, linux, x64] |
| 19 | + steps: |
| 20 | + - uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 |
| 21 | + - uses: ./tools/github-actions/setup-deps |
| 22 | + - uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0 |
| 23 | + with: |
| 24 | + version: v3.5.0 |
| 25 | + # Generate the install manifests first so it can checked |
| 26 | + # for errors while running `make -k lint` |
| 27 | + - run: make generate-manifests |
| 28 | + - run: make lint-deps |
| 29 | + - run: make -k lint |
| 30 | + |
| 31 | + gen-check: |
| 32 | + runs-on: [self-hosted, linux, x64] |
| 33 | + steps: |
| 34 | + - uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 |
| 35 | + - uses: ./tools/github-actions/setup-deps |
| 36 | + - uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0 |
| 37 | + with: |
| 38 | + version: v3.5.0 |
| 39 | + - run: make -k gen-check |
| 40 | + |
| 41 | + license-check: |
| 42 | + runs-on: [self-hosted, linux, x64] |
| 43 | + steps: |
| 44 | + - uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 |
| 45 | + - uses: ./tools/github-actions/setup-deps |
| 46 | + - run: make -k licensecheck |
| 47 | + |
| 48 | + coverage-test: |
| 49 | + runs-on: [self-hosted, linux, x64] |
| 50 | + steps: |
| 51 | + - uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 |
| 52 | + - uses: ./tools/github-actions/setup-deps |
| 53 | + |
| 54 | + # test |
| 55 | + - name: Run Coverage Tests |
| 56 | + run: make go.test.coverage |
| 57 | + - name: Upload coverage to Codecov |
| 58 | + uses: codecov/codecov-action@4fe8c5f003fae66aa5ebb77cfd3e7bfbbda0b6b0 # v3.1.5 |
| 59 | + with: |
| 60 | + fail_ci_if_error: false |
| 61 | + files: ./coverage.xml |
| 62 | + name: codecov-envoy-gateway |
| 63 | + verbose: true |
| 64 | + |
| 65 | + build: |
| 66 | + runs-on: [self-hosted, linux, x64] |
| 67 | + needs: [lint, gen-check, license-check, coverage-test] |
| 68 | + steps: |
| 69 | + - uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 |
| 70 | + - uses: ./tools/github-actions/setup-deps |
| 71 | + |
| 72 | + - name: Build EG Multiarch Binaries |
| 73 | + run: make build-multiarch PLATFORMS=${{ env.PLATFORMS }} |
| 74 | + |
| 75 | + - name: Upload EG Binaries |
| 76 | + uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba # v4.3.2 |
| 77 | + with: |
| 78 | + name: envoy-gateway |
| 79 | + path: bin/ |
| 80 | + |
| 81 | + # Enable once https://github.com/tetrateio/gateway/issues/15 is completed |
| 82 | + conformance-test: |
| 83 | + runs-on: [self-hosted, linux, x64] |
| 84 | + needs: [build] |
| 85 | + strategy: |
| 86 | + matrix: |
| 87 | + version: [ v1.26.14, v1.27.11, v1.28.7, v1.29.2 ] |
| 88 | + steps: |
| 89 | + - uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 |
| 90 | + - uses: ./tools/github-actions/setup-deps |
| 91 | + - uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0 |
| 92 | + with: |
| 93 | + version: v3.5.0 |
| 94 | + - name: Download EG Binaries |
| 95 | + uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5 |
| 96 | + with: |
| 97 | + name: envoy-gateway |
| 98 | + path: bin/ |
| 99 | + - name: Give Privileges To EG Binaries |
| 100 | + run: chmod +x bin/linux/amd64/envoy-gateway |
| 101 | + |
| 102 | + # conformance |
| 103 | + # - name: Run Standard Conformance Tests |
| 104 | + # env: |
| 105 | + # KIND_NODE_TAG: ${{ matrix.version }} |
| 106 | + # IMAGE_PULL_POLICY: IfNotPresent |
| 107 | + # run: make conformance |
| 108 | + |
| 109 | + e2e-test: |
| 110 | + runs-on: [self-hosted, linux, x64] |
| 111 | + needs: [build] |
| 112 | + strategy: |
| 113 | + matrix: |
| 114 | + version: [ v1.26.14, v1.27.11, v1.28.7, v1.29.2 ] |
| 115 | + steps: |
| 116 | + - uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 |
| 117 | + - uses: ./tools/github-actions/setup-deps |
| 118 | + - uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0 |
| 119 | + with: |
| 120 | + version: v3.5.0 |
| 121 | + - name: Download EG Binaries |
| 122 | + uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5 |
| 123 | + with: |
| 124 | + name: envoy-gateway |
| 125 | + path: bin/ |
| 126 | + - name: Give Privileges To EG Binaries |
| 127 | + run: chmod +x bin/linux/amd64/envoy-gateway |
| 128 | + |
| 129 | + # E2E |
| 130 | + # - name: Run E2E Tests |
| 131 | + # env: |
| 132 | + # KIND_NODE_TAG: ${{ matrix.version }} |
| 133 | + # IMAGE_PULL_POLICY: IfNotPresent |
| 134 | + # run: make e2e |
| 135 | + |
| 136 | + publish: |
| 137 | + runs-on: [self-hosted, linux, x64] |
| 138 | + needs: [conformance-test, e2e-test] |
| 139 | + steps: |
| 140 | + - uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 |
| 141 | + - uses: ./tools/github-actions/setup-deps |
| 142 | + |
| 143 | + - name: Download EG Binaries |
| 144 | + uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5 |
| 145 | + with: |
| 146 | + name: envoy-gateway |
| 147 | + path: bin/ |
| 148 | + |
| 149 | + - name: Give Privileges To EG Binaries |
| 150 | + run: chmod +x bin/linux/amd64/envoy-gateway |
| 151 | + |
| 152 | + - name: Setup Multiarch Environment |
| 153 | + if: github.event_name == 'push' |
| 154 | + run: make image.multiarch.setup |
| 155 | + |
| 156 | + - name: Extract Release Tag |
| 157 | + id: vars |
| 158 | + shell: bash |
| 159 | + run: echo "release_tag=$(echo ${GITHUB_REF##*/})" >> $GITHUB_ENV |
| 160 | + |
| 161 | + # build and push image |
| 162 | + - name: Login to Cloudsmith Registry |
| 163 | + if: github.event_name == 'push' |
| 164 | + uses: docker/login-action@v2 |
| 165 | + with: |
| 166 | + registry: docker.cloudsmith.io |
| 167 | + username: ${{ secrets.CLOUDSMITH_USERNAME }} |
| 168 | + password: ${{ secrets.CLOUDSMITH_SECRET }} |
| 169 | + |
| 170 | + - name: Build and Push TEG Commit Image to Cloudsmith Registry |
| 171 | + if: github.event_name == 'push' |
| 172 | + # tag is set to the short SHA of the commit |
| 173 | + run: make image.push.multiarch TAG=${{ env.release_tag }} PLATFORMS=${{ env.PLATFORMS }} IMAGE_PLATFORMS=${{ env.IMAGE_PLATFORMS }} IMAGE=fips-containers.teg.tetratelabs.com/gateway |
0 commit comments