|
|
|
@ -311,6 +311,95 @@ jobs:
|
|
|
|
|
DD_ENV: ci
|
|
|
|
|
run: datadog-ci junit upload --service "$GITHUB_REPOSITORY" $TEST_RESULTS_DIR/results.xml
|
|
|
|
|
|
|
|
|
|
upgrade-integration-test-deployer:
|
|
|
|
|
runs-on: ${{ fromJSON(needs.setup.outputs.compute-large ) }}
|
|
|
|
|
needs:
|
|
|
|
|
- setup
|
|
|
|
|
- dev-build
|
|
|
|
|
permissions:
|
|
|
|
|
id-token: write # NOTE: this permission is explicitly required for Vault auth.
|
|
|
|
|
contents: read
|
|
|
|
|
strategy:
|
|
|
|
|
fail-fast: false
|
|
|
|
|
matrix:
|
|
|
|
|
consul-version: [ "1.15", "1.16", "1.17"]
|
|
|
|
|
env:
|
|
|
|
|
CONSUL_LATEST_VERSION: ${{ matrix.consul-version }}
|
|
|
|
|
steps:
|
|
|
|
|
- name: Checkout code
|
|
|
|
|
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
|
|
|
|
with:
|
|
|
|
|
ref: ${{ env.BRANCH }}
|
|
|
|
|
# NOTE: This step is specifically needed for ENT. It allows us to access the required private HashiCorp repos.
|
|
|
|
|
- name: Setup Git
|
|
|
|
|
if: ${{ endsWith(github.repository, '-enterprise') }}
|
|
|
|
|
run: git config --global url."https://${{ secrets.ELEVATED_GITHUB_TOKEN }}:@github.com".insteadOf "https://github.com"
|
|
|
|
|
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
|
|
|
|
|
with:
|
|
|
|
|
go-version-file: 'go.mod'
|
|
|
|
|
- run: go env
|
|
|
|
|
- name: Build image
|
|
|
|
|
run: make test-deployer-setup
|
|
|
|
|
- name: Upgrade Integration Tests
|
|
|
|
|
run: |
|
|
|
|
|
mkdir -p "${{ env.TEST_RESULTS_DIR }}"
|
|
|
|
|
export NOLOGBUFFER=1
|
|
|
|
|
cd ./test-integ/upgrade
|
|
|
|
|
docker run --rm ${{ env.CONSUL_LATEST_IMAGE_NAME }}:local consul version
|
|
|
|
|
go run gotest.tools/gotestsum@v${{env.GOTESTSUM_VERSION}} \
|
|
|
|
|
--raw-command \
|
|
|
|
|
--format=standard-verbose \
|
|
|
|
|
--debug \
|
|
|
|
|
--packages="./..." \
|
|
|
|
|
-- \
|
|
|
|
|
go test \
|
|
|
|
|
-tags "${{ env.GOTAGS }}" \
|
|
|
|
|
-timeout=60m \
|
|
|
|
|
-parallel=2 \
|
|
|
|
|
-json \
|
|
|
|
|
./... \
|
|
|
|
|
--target-image ${{ env.CONSUL_LATEST_IMAGE_NAME }} \
|
|
|
|
|
--target-version local \
|
|
|
|
|
--latest-image docker.mirror.hashicorp.services/${{ env.CONSUL_LATEST_IMAGE_NAME }} \
|
|
|
|
|
--latest-version "${{ env.CONSUL_LATEST_VERSION }}"
|
|
|
|
|
env:
|
|
|
|
|
# this is needed because of incompatibility between RYUK container and GHA
|
|
|
|
|
GOTESTSUM_JUNITFILE: ${{ env.TEST_RESULTS_DIR }}/results.xml
|
|
|
|
|
GOTESTSUM_FORMAT: standard-verbose
|
|
|
|
|
COMPOSE_INTERACTIVE_NO_CLI: 1
|
|
|
|
|
# tput complains if this isn't set to something.
|
|
|
|
|
TERM: ansi
|
|
|
|
|
# NOTE: ENT specific step as we store secrets in Vault.
|
|
|
|
|
- name: Authenticate to Vault
|
|
|
|
|
if: ${{ endsWith(github.repository, '-enterprise') }}
|
|
|
|
|
id: vault-auth
|
|
|
|
|
run: vault-auth
|
|
|
|
|
|
|
|
|
|
# NOTE: ENT specific step as we store secrets in Vault.
|
|
|
|
|
- name: Fetch Secrets
|
|
|
|
|
if: ${{ endsWith(github.repository, '-enterprise') }}
|
|
|
|
|
id: secrets
|
|
|
|
|
uses: hashicorp/vault-action@v2.5.0
|
|
|
|
|
with:
|
|
|
|
|
url: ${{ steps.vault-auth.outputs.addr }}
|
|
|
|
|
caCertificate: ${{ steps.vault-auth.outputs.ca_certificate }}
|
|
|
|
|
token: ${{ steps.vault-auth.outputs.token }}
|
|
|
|
|
secrets: |
|
|
|
|
|
kv/data/github/${{ github.repository }}/datadog apikey | DATADOG_API_KEY;
|
|
|
|
|
|
|
|
|
|
- name: prepare datadog-ci
|
|
|
|
|
if: ${{ !endsWith(github.repository, '-enterprise') }}
|
|
|
|
|
run: |
|
|
|
|
|
curl -L --fail "https://github.com/DataDog/datadog-ci/releases/latest/download/datadog-ci_linux-x64" --output "/usr/local/bin/datadog-ci"
|
|
|
|
|
chmod +x /usr/local/bin/datadog-ci
|
|
|
|
|
|
|
|
|
|
- name: upload coverage
|
|
|
|
|
# do not run on forks
|
|
|
|
|
if: github.event.pull_request.head.repo.full_name == github.repository
|
|
|
|
|
env:
|
|
|
|
|
DATADOG_API_KEY: "${{ endsWith(github.repository, '-enterprise') && env.DATADOG_API_KEY || secrets.DATADOG_API_KEY }}"
|
|
|
|
|
DD_ENV: ci
|
|
|
|
|
run: datadog-ci junit upload --service "$GITHUB_REPOSITORY" $TEST_RESULTS_DIR/results.xml
|
|
|
|
|
|
|
|
|
|
test-integrations-success:
|
|
|
|
|
needs:
|
|
|
|
@ -319,6 +408,7 @@ jobs:
|
|
|
|
|
- generate-envoy-job-matrices
|
|
|
|
|
- envoy-integration-test
|
|
|
|
|
- upgrade-integration-test
|
|
|
|
|
- upgrade-integration-test-deployer
|
|
|
|
|
runs-on: ${{ fromJSON(needs.setup.outputs.compute-small) }}
|
|
|
|
|
if: ${{ always() }}
|
|
|
|
|
steps:
|
|
|
|
|