|
| 1 | +--- |
| 2 | +name: Build and trigger Antithesis exploration |
| 3 | + |
| 4 | +on: |
| 5 | + # Disabled as discussed in https://github.com/etcd-io/etcd/pull/19750#issuecomment-2809840402 |
| 6 | + # pull_request: |
| 7 | + # branches: [main] |
| 8 | + # schedule: |
| 9 | + # - cron: "0 0 * * *" # run every day at midnight |
| 10 | + workflow_dispatch: |
| 11 | + inputs: |
| 12 | + test: |
| 13 | + description: 'Test name' |
| 14 | + required: false |
| 15 | + default: 'etcd nightly antithesis run' |
| 16 | + type: string |
| 17 | + config_image: |
| 18 | + description: 'Config image' |
| 19 | + required: true |
| 20 | + default: us-central1-docker.pkg.dev/molten-verve-216720/linuxfoundation-repository/etcd-config:latest |
| 21 | + type: string |
| 22 | + images: |
| 23 | + description: 'System images (separate with ;)' |
| 24 | + required: true |
| 25 | + default: us-central1-docker.pkg.dev/molten-verve-216720/linuxfoundation-repository/etcd-client:latest;gcr.io/etcd-development/etcd:v3.5.21 |
| 26 | + type: string |
| 27 | + duration: |
| 28 | + description: 'Duration (exploration hours)' |
| 29 | + required: true |
| 30 | + type: int |
| 31 | + default: 12 |
| 32 | + description: |
| 33 | + description: 'Description (avoid quotes, please!)' |
| 34 | + required: true |
| 35 | + type: string |
| 36 | + default: "etcd nightly antithesis run" |
| 37 | + email: |
| 38 | + description: 'Additional email notification recipient (separate with ;)' |
| 39 | + required: true |
| 40 | + type: string |
| 41 | + default: "" |
| 42 | + |
| 43 | +# Declare default permissions as read only. |
| 44 | +permissions: read-all |
| 45 | + |
| 46 | +env: |
| 47 | + REGISTRY: us-central1-docker.pkg.dev |
| 48 | + REPOSITORY: molten-verve-216720/linuxfoundation-repository |
| 49 | + |
| 50 | +jobs: |
| 51 | + build-and-push: |
| 52 | + runs-on: ubuntu-latest |
| 53 | + environment: Antithesis |
| 54 | + steps: |
| 55 | + - name: Checkout the code |
| 56 | + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 57 | + |
| 58 | + - name: Login to Antithesis Docker Registry |
| 59 | + uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0 |
| 60 | + with: |
| 61 | + registry: ${{ env.REGISTRY }} |
| 62 | + username: _json_key |
| 63 | + password: ${{ secrets.ANTITHESIS_CONTAINER_REGISTRY_TOKEN }} |
| 64 | + |
| 65 | + - name: Build and push config image |
| 66 | + uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0 |
| 67 | + with: |
| 68 | + context: ./tests/antithesis |
| 69 | + file: ./tests/antithesis/Dockerfile.config |
| 70 | + push: true |
| 71 | + tags: | |
| 72 | + ${{ env.REGISTRY }}/${{ env.REPOSITORY }}/etcd-config:latest, |
| 73 | + ${{ env.REGISTRY }}/${{ env.REPOSITORY }}/etcd-config:${{ github.sha }} |
| 74 | +
|
| 75 | + - name: Build and push client image |
| 76 | + uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0 |
| 77 | + with: |
| 78 | + context: ./tests/antithesis/test-template |
| 79 | + file: ./tests/antithesis/test-template/Dockerfile.client |
| 80 | + push: true |
| 81 | + tags: | |
| 82 | + ${{ env.REGISTRY }}/${{ env.REPOSITORY }}/etcd-client:latest, |
| 83 | + ${{ env.REGISTRY }}/${{ env.REPOSITORY }}/etcd-client:${{ github.sha }} |
| 84 | +
|
| 85 | + run-antithesis: |
| 86 | + runs-on: ubuntu-latest |
| 87 | + environment: Antithesis |
| 88 | + needs: build-and-push |
| 89 | + |
| 90 | + permissions: |
| 91 | + contents: read |
| 92 | + packages: write |
| 93 | + |
| 94 | + steps: |
| 95 | + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 96 | + |
| 97 | + - name: Run Antithesis Tests |
| 98 | + uses: antithesishq/antithesis-trigger-action@b7d0c9d1d9316bd4de73a44144c56636ea3a64ba # main commit on Mar 13, 2025 |
| 99 | + with: |
| 100 | + notebook_name: etcd |
| 101 | + tenant: linuxfoundation |
| 102 | + username: ${{ secrets.ANTITHESIS_WEBHOOK_USERNAME }} |
| 103 | + password: ${{ secrets.ANTITHESIS_WEBHOOK_PASSWORD }} |
| 104 | + github_token: ${{ secrets.GH_PAT }} |
| 105 | + config_image: ${{ inputs.config_image }} |
| 106 | + images: ${{ inputs.images }} |
| 107 | + description: ${{ inputs.description }} |
| 108 | + email_recipients: ${{ inputs.email }} |
| 109 | + test_name: ${{ inputs.test }} |
| 110 | + additional_parameters: |- |
| 111 | + custom.duration = ${{ inputs.duration }} |
0 commit comments