Skip to content

Commit e00c3c4

Browse files
committed
fixup! Bump GitHub Actions
1 parent 82f76e0 commit e00c3c4

File tree

2 files changed

+23
-130
lines changed

2 files changed

+23
-130
lines changed

.action_templates/e2e-fork-template.yaml

+15-15
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,23 @@ jobs:
55
# dependabot gets a read only github token, and so must use pull_request_target instead of pull_request.
66
if: contains(github.event.pull_request.labels.*.name, 'dependencies') || contains(github.event.pull_request.labels.*.name, 'safe-to-test')
77
steps:
8-
# - template: cancel-previous
9-
- template: checkout-fork
10-
- template: setup-and-install-python
11-
- template: quay-login
12-
- template: set-up-qemu
13-
- template: build-and-push-development-images
8+
- template: cancel-previous
9+
# - template: checkout-fork
10+
# - template: setup-and-install-python
11+
# - template: quay-login
12+
# - template: set-up-qemu
13+
# - template: build-and-push-development-images
1414
- template: tests
1515
steps:
16-
# - template: cancel-previous
17-
- template: checkout-fork
18-
- template: set-run-status
19-
- template: setup-and-install-python
20-
- template: setup-kind-cluster
21-
if: steps.last_run_status.outputs.last_run_status != 'success'
22-
- template: run-test-matrix
23-
- template: save-run-status
24-
- template: dump-and-upload-diagnostics
16+
- template: cancel-previous
17+
# - template: checkout-fork
18+
# - template: set-run-status
19+
# - template: setup-and-install-python
20+
# - template: setup-kind-cluster
21+
# if: steps.last_run_status.outputs.last_run_status != 'success'
22+
# - template: run-test-matrix
23+
# - template: save-run-status
24+
# - template: dump-and-upload-diagnostics
2525

2626
events:
2727
- template: pull-request-target

.github/workflows/e2e-fork.yml

+8-115
Original file line numberDiff line numberDiff line change
@@ -41,42 +41,11 @@ jobs:
4141
if: contains(github.event.pull_request.labels.*.name, 'dependencies') || contains(github.event.pull_request.labels.*.name,
4242
'safe-to-test')
4343
steps:
44-
# template: .action_templates/steps/checkout-fork.yaml
45-
- name: Checkout Code
46-
uses: actions/checkout@v4
44+
# template: .action_templates/steps/cancel-previous.yaml
45+
- name: Cancel Previous Runs
46+
uses: styfle/[email protected]
4747
with:
48-
ref: ${{github.event.pull_request.head.sha}}
49-
repository: ${{github.event.pull_request.head.repo.full_name}}
50-
submodules: true
51-
# template: .action_templates/steps/setup-and-install-python.yaml
52-
- name: Setup Python
53-
uses: actions/setup-python@v5
54-
with:
55-
python-version: 3.10.4
56-
- name: Cache Dependencies
57-
uses: actions/cache@v4
58-
with:
59-
path: ~/.cache/pip
60-
key: ${{ hashFiles('requirements.txt') }}
61-
- name: Install Python Dependencies
62-
run: pip install -r requirements.txt
63-
# template: .action_templates/steps/quay-login.yaml
64-
- name: Login to Quay.io
65-
uses: docker/login-action@v3
66-
with:
67-
registry: quay.io
68-
username: ${{ secrets.QUAY_USERNAME }}
69-
password: ${{ secrets.QUAY_ROBOT_TOKEN }}
70-
# template: .action_templates/steps/set-up-qemu.yaml
71-
- name: Set up QEMU
72-
uses: docker/setup-qemu-action@v3
73-
# template: .action_templates/steps/build-and-push-development-images.yaml
74-
- name: Build and Push Images
75-
run: |
76-
python pipeline.py --image-name ${{ matrix.pipeline-argument }} --tag ${{ github.run_id }}
77-
env:
78-
MONGODB_COMMUNITY_CONFIG: ${{ github.workspace }}/scripts/ci/config.json
79-
version_id: ${{ github.run_id }}
48+
access_token: ${{ github.token }}
8049
# template: .action_templates/jobs/tests.yaml
8150
tests:
8251
runs-on: ubuntu-latest
@@ -147,84 +116,8 @@ jobs:
147116
- test-name: replica_set_remove_user
148117
distro: ubi
149118
steps:
150-
# template: .action_templates/steps/checkout-fork.yaml
151-
- name: Checkout Code
152-
uses: actions/checkout@v4
153-
with:
154-
ref: ${{github.event.pull_request.head.sha}}
155-
repository: ${{github.event.pull_request.head.repo.full_name}}
156-
submodules: true
157-
# template: .action_templates/steps/set-run-status.yaml
158-
- name: Set default run status
159-
run: echo "::set-output name=last_run_status::pending" > last_run_status
160-
161-
# Tracking of the state of the previous test run is a workaround to the fact that it is not
162-
# possible to re-run a single failed job, only re-running the entire workflow is currently possible.
163-
# This workaround skips jobs if they have already passed.
164-
# see https://github.com/actions/runner/issues/432
165-
- name: Restore last run status
166-
id: last_run
167-
uses: actions/cache@v4
168-
with:
169-
path: last_run_status
170-
key: ${{ github.run_id }}-${{ matrix.test-name }}-${{ matrix.distro }}
171-
172-
- name: Set last run status
173-
id: last_run_status
174-
run: cat last_run_status
175-
# template: .action_templates/steps/setup-and-install-python.yaml
176-
- name: Setup Python
177-
uses: actions/setup-python@v5
178-
with:
179-
python-version: 3.10.4
180-
- name: Cache Dependencies
181-
uses: actions/cache@v4
182-
with:
183-
path: ~/.cache/pip
184-
key: ${{ hashFiles('requirements.txt') }}
185-
- name: Install Python Dependencies
186-
run: pip install -r requirements.txt
187-
# template: .action_templates/steps/setup-kind-cluster.yaml
188-
- name: Setup Kind Cluster
189-
run: |
190-
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.11.1/kind-linux-amd64
191-
chmod +x ./kind
192-
./kind create cluster
193-
if: steps.last_run_status.outputs.last_run_status != 'success'
194-
- name: Create Directories
195-
run: |
196-
docker exec kind-control-plane mkdir -p /opt/data/mongo-data-0 /opt/data/mongo-data-1 /opt/data/mongo-data-2 /opt/data/mongo-logs-0 /opt/data/mongo-logs-1 /opt/data/mongo-logs-2
197-
198-
if: steps.last_run_status.outputs.last_run_status != 'success'
199-
- name: Install CRD
200-
run: kubectl apply -f config/crd/bases/mongodbcommunity.mongodb.com_mongodbcommunity.yaml
201-
if: steps.last_run_status.outputs.last_run_status != 'success'
202-
# template: .action_templates/steps/run-test-matrix.yaml
203-
- name: Run Test
204-
id: e2e_test
205-
if: steps.last_run_status.outputs.last_run_status != 'success'
206-
run: |
207-
cluster_wide=${{ matrix.cluster-wide }}
208-
if [ -z "$cluster_wide" ]; then
209-
cluster_wide="false"
210-
fi
211-
python3 ./scripts/dev/e2e.py --test ${{ matrix.test-name }} --tag ${{ github.run_id }} --config_file ./scripts/ci/config.json --distro ${{ matrix.distro }} --cluster-wide ${cluster_wide}
212-
# template: .action_templates/steps/save-run-status.yaml
213-
- name: Save run status
214-
if: always()
215-
run: echo "::set-output name=last_run_status::${{ steps.e2e_test.outcome }}"
216-
> last_run_status
217-
# template: .action_templates/steps/dump-and-upload-diagnostics.yaml
218-
- name: Dump Diagnostics
219-
id: dump_diagnostics
220-
if: always() && steps.e2e_test.outcome == 'failure'
221-
continue-on-error: true
222-
run: scripts/ci/dump_diagnostics.sh default # default since kind is running in the default namespace
223-
224-
- name: Upload Diagnostics
225-
if: always() && steps.dump_diagnostics.outcome == 'success'
226-
uses: actions/upload-artifact@v4
227-
continue-on-error: true
119+
# template: .action_templates/steps/cancel-previous.yaml
120+
- name: Cancel Previous Runs
121+
uses: styfle/[email protected]
228122
with:
229-
name: ${{ matrix.test-name }}-${{ matrix.distro }}-diagnostics
230-
path: ${{ github.workspace }}/diagnostics
123+
access_token: ${{ github.token }}

0 commit comments

Comments
 (0)