Build and trigger Antithesis exploration #115
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Build and trigger Antithesis exploration | |
on: | |
# Disabled as discussed in https://github.com/etcd-io/etcd/pull/19750#issuecomment-2809840402 | |
# pull_request: | |
# branches: [main] | |
# schedule: | |
# - cron: "0 0 * * *" # run every day at midnight | |
workflow_dispatch: | |
inputs: | |
test: | |
description: 'Test name' | |
required: false | |
default: 'etcd nightly antithesis run' | |
type: string | |
duration: | |
description: 'Duration (exploration hours)' | |
required: true | |
type: int | |
default: 12 | |
description: | |
description: 'Description (avoid quotes, please!)' | |
required: true | |
type: string | |
default: "etcd nightly antithesis run" | |
etcd_ref: | |
description: 'etcd version to build etcd-server from' | |
required: false | |
type: string | |
default: 'release-3.5' | |
email: | |
description: 'Additional email notification recipient (separate with ;)' | |
required: true | |
type: string | |
default: "" | |
# Declare default permissions as read only. | |
permissions: read-all | |
env: | |
REGISTRY: us-central1-docker.pkg.dev | |
REPOSITORY: molten-verve-216720/linuxfoundation-repository | |
jobs: | |
build-and-push-and-test: | |
runs-on: ubuntu-latest | |
environment: Antithesis | |
steps: | |
- name: Checkout the code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Login to Antithesis Docker Registry | |
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: _json_key | |
password: ${{ secrets.ANTITHESIS_CONTAINER_REGISTRY_TOKEN }} | |
- name: Build and push config image | |
working-directory: ./tests/antithesis | |
run: | | |
make antithesis-build-config-image IMAGE_TAG=${{ inputs.etcd_ref }}_${{ github.sha }} | |
export IMAGE="${{ env.REGISTRY }}/${{ env.REPOSITORY }}/etcd-config:${{ inputs.etcd_ref }}_${{ github.sha }}" | |
docker tag etcd-config:latest $IMAGE | |
docker push $IMAGE | |
- name: Build and push client image | |
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0 | |
with: | |
context: . | |
file: ./tests/antithesis/test-template/Dockerfile | |
push: true | |
tags: | | |
${{ env.REGISTRY }}/${{ env.REPOSITORY }}/etcd-client:${{ inputs.etcd_ref }}_${{ github.sha }} | |
- name: Build and push etcd image | |
working-directory: ./tests/antithesis | |
run: | | |
make antithesis-build-etcd-image REF=${{ inputs.etcd_ref }} | |
export IMAGE="${{ env.REGISTRY }}/${{ env.REPOSITORY }}/etcd-server:${{ inputs.etcd_ref }}_${{ github.sha }}" | |
docker tag etcd-server:latest $IMAGE | |
docker push $IMAGE | |
- name: Run Antithesis Tests | |
uses: antithesishq/antithesis-trigger-action@b7d0c9d1d9316bd4de73a44144c56636ea3a64ba # main commit on Mar 13, 2025 | |
with: | |
notebook_name: etcd | |
tenant: linuxfoundation | |
username: ${{ secrets.ANTITHESIS_WEBHOOK_USERNAME }} | |
password: ${{ secrets.ANTITHESIS_WEBHOOK_PASSWORD }} | |
github_token: ${{ secrets.GH_PAT }} | |
config_image: us-central1-docker.pkg.dev/molten-verve-216720/linuxfoundation-repository/etcd-config:${{ inputs.etcd_ref }}_${{ github.sha }} | |
images: us-central1-docker.pkg.dev/molten-verve-216720/linuxfoundation-repository/etcd-client:${{ inputs.etcd_ref }}_${{ github.sha }};us-central1-docker.pkg.dev/molten-verve-216720/linuxfoundation-repository/etcd-server:${{ inputs.etcd_ref }}_${{ github.sha }};docker.io/library/ubuntu:latest;us-central1-docker.pkg.dev/molten-verve-216720/linuxfoundation-repository/etcd-config:${{ inputs.etcd_ref }}_${{ github.sha }} | |
description: ${{ inputs.description }} | |
email_recipients: ${{ inputs.email }} | |
test_name: ${{ inputs.test }} | |
additional_parameters: |- | |
custom.duration = ${{ inputs.duration }} | |
antithesis.source = ${{ inputs.etcd_ref }} |