Skip to content

Commit c15827a

Browse files
committed
chore: remove all of the workflow args used for cutover
1 parent 78cb016 commit c15827a

File tree

7 files changed

+84
-147
lines changed

7 files changed

+84
-147
lines changed

.github/workflows/build-and-push-dockerhub.yml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,6 @@ on:
2020
type: boolean
2121
default: true
2222
description: "Whether to push the image"
23-
output_directory:
24-
type: string
25-
default: .
26-
make_target_prefix:
27-
type: string
28-
default: ""
2923

3024
env:
3125
DOCKERHUB_REPO: ${{ inputs.repo }}
@@ -50,19 +44,19 @@ jobs:
5044
cache-name: cache-${{ inputs.image_name }}
5145
with:
5246
path: |
53-
${{ inputs.output_directory }}/${{ inputs.image_name }}.tar
47+
${{ inputs.image_name }}.tar
5448
key: ${{ runner.os }}-${{ env.cache-name }}-${{ github.run_id }}
5549

5650
- name: Load built image
5751
if: ${{ inputs.cache && steps.cache-image.outputs.cache-hit == 'true' }}
5852
run: |
59-
make ${{ inputs.make_target_prefix }}load.${{ inputs.image_name }}
53+
make load.${{ inputs.image_name }}
6054
6155
- name: Build image
6256
if: ${{ !inputs.cache || steps.cache-image.outputs.cache-hit != 'true' }}
6357
run: |
64-
make ${{ inputs.make_target_prefix }}build.${{ inputs.image_name }}
65-
make ${{ inputs.make_target_prefix }}save.${{ inputs.image_name }}
58+
make build.${{ inputs.image_name }}
59+
make save.${{ inputs.image_name }}
6660
6761
- name: Log in to Docker Hub
6862
uses: docker/[email protected]
@@ -74,5 +68,5 @@ jobs:
7468
- name: Push image
7569
if: ${{ inputs.push && !github.event.pull_request.head.repo.fork && github.repository_owner == 'codecov' }}
7670
run: |
77-
make ${{ inputs.make_target_prefix }}tag.${{ inputs.image_name }}
78-
make ${{ inputs.make_target_prefix }}push.${{ inputs.image_name }}
71+
make tag.${{ inputs.image_name }}
72+
make push.${{ inputs.image_name }}

.github/workflows/build-app.yml

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,9 @@ on:
99
cache_requirements:
1010
type: boolean
1111
default: true
12-
output_directory:
13-
type: string
14-
default: .
15-
reqs_cache_key:
16-
type: string
17-
required: false
1812
cache_file:
1913
type: string
2014
default: "requirements.txt"
21-
make_target_prefix:
22-
type: string
23-
default: ""
2415

2516
env:
2617
AR_REPO: ${{ inputs.repo }}
@@ -57,8 +48,8 @@ jobs:
5748
cache-name: ${{ inputs.repo }}-requirements
5849
with:
5950
path: |
60-
${{ inputs.output_directory }}/requirements.tar
61-
key: ${{ runner.os }}-${{ env.cache-name }}-${{ inputs.reqs_cache_key || format('{0}-{1}', hashFiles(format('{0}/**/{1}', inputs.output_directory, inputs.cache_file)), hashFiles(format('{0}/**/docker/Dockerfile.requirements', inputs.output_directory))) }}
51+
requirements.tar
52+
key: ${{ runner.os }}-${{ env.cache-name }}-${{ format('{0}-{1}', hashFiles(format('./**/{1}', inputs.cache_file)), hashFiles('./**/docker/Dockerfile.requirements')) }}
6253
restore-keys: |
6354
${{ runner.os }}-${{ env.cache-name }}-
6455
@@ -69,25 +60,25 @@ jobs:
6960
cache-name: ${{ inputs.repo }}-app
7061
with:
7162
path: |
72-
${{ inputs.output_directory }}/app.tar
63+
app.tar
7364
key: ${{ runner.os }}-${{ env.cache-name }}-${{ github.run_id }}
7465

7566
- name: Load requirements from cache
7667
if: ${{ steps.cache-requirements.outputs.cache-hit == 'true' && inputs.cache_requirements }}
7768
run: |
78-
make ${{ inputs.make_target_prefix }}load.requirements
69+
make load.requirements
7970
8071
- name: Build/pull requirements
8172
if: ${{ steps.cache-requirements.outputs.cache-hit != 'true' && inputs.cache_requirements }}
8273
run: |
83-
make ${{ inputs.make_target_prefix }}build.requirements
84-
make ${{ inputs.make_target_prefix }}save.requirements
74+
make build.requirements
75+
make save.requirements
8576
8677
- name: Push Requirements
8778
if: ${{ steps.cache-requirements.outputs.cache-hit != 'true' && !github.event.pull_request.head.repo.fork && github.repository_owner == 'codecov' && inputs.cache_requirements }}
8879
run: |
89-
make ${{ inputs.make_target_prefix }}push.requirements
80+
make push.requirements
9081
- name: Build app
9182
run: |
92-
make ${{ inputs.make_target_prefix }}build.app
93-
make ${{ inputs.make_target_prefix }}save.app
83+
make build.app
84+
make save.app

.github/workflows/lint.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ name: Run Lint
33

44
on:
55
workflow_call:
6-
inputs:
7-
make_target_prefix:
8-
type: string
9-
default: ""
106

117
jobs:
128
lint:
@@ -17,6 +13,6 @@ jobs:
1713
with:
1814
submodules: 'recursive'
1915
- name: Install dependencies
20-
run: make ${{ inputs.make_target_prefix }}lint.install
16+
run: make lint.install
2117
- name: Check
22-
run: make ${{ inputs.make_target_prefix }}lint.check
18+
run: make lint.check

.github/workflows/push-env.yml

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,6 @@ on:
2121
type: boolean
2222
default: false
2323
description: "Whether to push the release image"
24-
output_directory:
25-
type: string
26-
default: .
27-
make_target_prefix:
28-
type: string
29-
default: ""
3024
sentry_project:
3125
type: string
3226
required: false
@@ -58,11 +52,11 @@ jobs:
5852
cache-name: ${{ inputs.repo }}-app
5953
with:
6054
path: |
61-
${{ inputs.output_directory }}/app.tar
55+
app.tar
6256
key: ${{ runner.os }}-${{ env.cache-name }}-${{ github.run_id }}
6357
- name: Load built image
6458
run: |
65-
docker load --input ${{ inputs.output_directory }}/app.tar
59+
docker load --input app.tar
6660
- id: "auth"
6761
name: "Authenticate to Google Cloud"
6862
uses: "google-github-actions/[email protected]"
@@ -77,13 +71,13 @@ jobs:
7771
7872
- name: Push ${{ inputs.environment }}
7973
run: |
80-
make ${{ inputs.make_target_prefix }}tag.${{ inputs.environment }}
81-
make ${{ inputs.make_target_prefix }}push.${{ inputs.environment }}
74+
make tag.${{ inputs.environment }}
75+
make push.${{ inputs.environment }}
8276
- name: Push latest
8377
if: inputs.environment == 'production'
8478
run: |
85-
make ${{ inputs.make_target_prefix }}tag.latest
86-
make ${{ inputs.make_target_prefix }}push.latest
79+
make tag.latest
80+
make push.latest
8781
8882
- name: Create Sentry release
8983
if: inputs.create_sentry_release
@@ -96,7 +90,6 @@ jobs:
9690
environment: ${{ inputs.environment }}
9791
version: ${{ inputs.environment }}-release-${{ steps.sha.outputs.short_sha }}
9892
ignore_missing: true
99-
output_directory: ${{ inputs.output_directory }}
10093
rolling:
10194
name: Push Rolling Image
10295
if: inputs.push_rolling == true && github.repository_owner == 'codecov' && !github.event.pull_request.head.repo.fork
@@ -114,20 +107,20 @@ jobs:
114107
cache-name: ${{ inputs.repo }}-app
115108
with:
116109
path: |
117-
${{ inputs.output_directory }}/app.tar
110+
app.tar
118111
key: ${{ runner.os }}-${{ env.cache-name }}-${{ github.run_id }}
119112
- name: Load built image
120113
run: |
121-
docker load --input ${{ inputs.output_directory }}/app.tar
114+
docker load --input app.tar
122115
- name: Log in to Docker Hub
123116
uses: docker/[email protected]
124117
with:
125118
username: ${{ secrets.CODECOV_DEVOPS_DOCKER_USERNAME }}
126119
password: ${{ secrets.CODECOV_DEVOPS_DOCKER_PASSWORD }}
127120
- name: Push Rolling
128121
run: |
129-
make ${{ inputs.make_target_prefix }}tag.rolling
130-
make ${{ inputs.make_target_prefix }}push.rolling
122+
make tag.rolling
123+
make push.rolling
131124
release:
132125
name: Push Release Image
133126
if: inputs.push_release == true && github.repository_owner == 'codecov' && !github.event.pull_request.head.repo.fork
@@ -145,17 +138,17 @@ jobs:
145138
cache-name: ${{ inputs.repo }}-app
146139
with:
147140
path: |
148-
${{ inputs.output_directory }}/app.tar
141+
app.tar
149142
key: ${{ runner.os }}-${{ env.cache-name }}-${{ github.run_id }}
150143
- name: Load built image
151144
run: |
152-
docker load --input ${{ inputs.output_directory }}/app.tar
145+
docker load --input app.tar
153146
- name: Log in to Docker Hub
154147
uses: docker/[email protected]
155148
with:
156149
username: ${{ secrets.CODECOV_DEVOPS_DOCKER_USERNAME }}
157150
password: ${{ secrets.CODECOV_DEVOPS_DOCKER_PASSWORD }}
158151
- name: Push release
159152
run: |
160-
make ${{ inputs.make_target_prefix }}tag.release
161-
make ${{ inputs.make_target_prefix }}push.release
153+
make tag.release
154+
make push.release

.github/workflows/run-tests-split.yml

Lines changed: 17 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,6 @@ on:
1414
type: number
1515
required: false
1616
default: 5
17-
flag_prefix:
18-
type: string
19-
default: ''
20-
output_directory:
21-
type: string
22-
default: .
23-
make_target_prefix:
24-
type: string
25-
default: ""
26-
pytest_rootdir:
27-
type: string
28-
default: .
2917
outputs:
3018
tests_passed:
3119
# Silly issue with returning job results as workflow outputs
@@ -73,41 +61,41 @@ jobs:
7361
cache-name: ${{ inputs.repo }}-app
7462
with:
7563
path: |
76-
${{ inputs.output_directory }}/app.tar
64+
app.tar
7765
key: ${{ runner.os }}-${{ env.cache-name }}-${{ github.run_id }}
7866
- name: Load built image
7967
run: |
80-
docker load --input ${{ inputs.output_directory }}/app.tar
68+
docker load --input app.tar
8169
- name: Install docker compose
8270
run: |
8371
sudo curl -SL https://github.com/docker/compose/releases/download/v2.20.0/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
8472
sudo chmod +x /usr/local/bin/docker-compose
8573
- name: Bring test env up
8674
run: |
87-
make ${{ inputs.make_target_prefix }}test_env.up
75+
make test_env.up
8876
- name: Prepare for tests
8977
run: |
90-
make ${{ inputs.make_target_prefix }}test_env.prepare
91-
make ${{ inputs.make_target_prefix }}test_env.check_db
78+
make test_env.prepare
79+
make test_env.check_db
9280
- name: Run unit tests
9381
run: |
94-
make ${{ inputs.make_target_prefix }}test_env.run_unit GROUP=${{ matrix.group }} SPLIT=${{ inputs.split }} PYTEST_ROOTDIR=${{ inputs.pytest_rootdir }}
82+
make test_env.run_unit GROUP=${{ matrix.group }} SPLIT=${{ inputs.split }}
9583
- name: Run integration tests
9684
if: inputs.run_integration == true
9785
run: |
98-
make ${{ inputs.make_target_prefix }}test_env.run_integration GROUP=${{ matrix.group }} SPLIT=${{ inputs.split }} PYTEST_ROOTDIR=${{ inputs.pytest_rootdir }}
86+
make test_env.run_integration GROUP=${{ matrix.group }} SPLIT=${{ inputs.split }}
9987
10088
- uses: actions/upload-artifact@v4
10189
if: ${{ !cancelled() }}
10290
with:
103-
name: ${{ inputs.flag_prefix }}-coveragefiles-${{ matrix.group }}
104-
path: ${{ inputs.output_directory }}/*.coverage.xml
91+
name: coveragefiles-${{ matrix.group }}
92+
path: *.coverage.xml
10593

10694
- uses: actions/upload-artifact@v4
10795
if: ${{ !cancelled() }}
10896
with:
109-
name: ${{ inputs.flag_prefix }}-junitfiles-${{ matrix.group }}
110-
path: ${{ inputs.output_directory }}/*junit*.xml
97+
name: junitfiles-${{ matrix.group }}
98+
path: *junit*.xml
11199

112100
upload:
113101
name: Upload to Codecov
@@ -140,21 +128,21 @@ jobs:
140128
id: download_coverage
141129
uses: actions/download-artifact@v4
142130
with:
143-
pattern: ${{ inputs.flag_prefix }}-coveragefiles-*
131+
pattern: coveragefiles-*
144132
merge-multiple: true
145133

146134
- name: Download test results
147135
id: download_test_results
148136
uses: actions/download-artifact@v4
149137
with:
150-
pattern: ${{ inputs.flag_prefix }}-junitfiles-*
138+
pattern: junitfiles-*
151139
merge-multiple: true
152140

153141
- name: Uploading unit test coverage (${{ matrix.name }})
154142
uses: codecov/codecov-action@v5
155143
with:
156144
files: ${{ steps.download_coverage.outputs.download-path }}/unit.*.coverage.xml
157-
flags: ${{ format('{0}unit', inputs.flag_prefix) }}
145+
flags: unit
158146
disable_search: true
159147
# Strange workaround: API has a `codecov` directory in the repo root
160148
# which conflicts with the action's `codecov` binary
@@ -168,7 +156,7 @@ jobs:
168156
uses: codecov/codecov-action@v5
169157
with:
170158
files: ${{ steps.download_coverage.outputs.download-path }}/integration.*.coverage.xml
171-
flags: ${{ format('{0}integration', inputs.flag_prefix) }}
159+
flags: integration
172160
disable_search: true
173161
# Strange workaround: API has a `codecov` directory in the repo root
174162
# which conflicts with the action's `codecov` binary
@@ -195,25 +183,23 @@ jobs:
195183
uses: codecov/test-results-action@v1
196184
with:
197185
files: ${{ steps.junit_files.outputs.unit_junit_files }}
198-
flags: ${{ format('{0}unit', inputs.flag_prefix) }}
186+
flags: unit
199187
disable_search: true
200188
token: ${{ secrets[matrix.codecov_token_secret] }}
201189
url: ${{ secrets[matrix.codecov_url_secret] }}
202190
# The coverage action will have installed codecovcli with pip. The
203191
# actual binary will be found in $PATH.
204192
binary: codecovcli
205-
working-directory: ${{ inputs.output_directory }}
206193

207194
- name: Uploading integration test results (${{ matrix.name }})
208195
if: ${{ inputs.run_integration == true }}
209196
uses: codecov/test-results-action@v1
210197
with:
211198
files: ${{ steps.junit_files.outputs.integration_junit_files }}
212-
flags: ${{ format('{0}integration', inputs.flag_prefix) }}
199+
flags: integration
213200
disable_search: true
214201
token: ${{ secrets[matrix.codecov_token_secret] }}
215202
url: ${{ secrets[matrix.codecov_url_secret] }}
216203
# The coverage action will have installed codecovcli with pip. The
217204
# actual binary will be found in $PATH.
218205
binary: codecovcli
219-
working-directory: ${{ inputs.output_directory }}

0 commit comments

Comments
 (0)