Skip to content

Commit

Permalink
Fix "Deploy commit mapping to S3" step. (pantsbuild#19402)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsirois authored Jun 30, 2023
1 parent 3aa92ce commit 3b52f36
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
name: Deploy commit mapping to S3
run: ./pants run src/python/pants_release/deploy_to_s3.py --scope tags/pantsbuild.pants
run: ./pants run src/python/pants_release/deploy_to_s3.py -- --scope tags/pantsbuild.pants
name: Release
'on':
push:
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ jobs:
echo "Uploading test reports to ${S3_DST}"
./src/python/pants_release/copy_to_s3.py --src-prefix=dist/test/reports --dst-prefix=${S3_DST} --path=""
./pants run ./src/python/pants_release/copy_to_s3.py -- --src-prefix=dist/test/reports --dst-prefix=${S3_DST} --path=""
'
- continue-on-error: true
Expand Down Expand Up @@ -766,7 +766,7 @@ jobs:
echo "Uploading test reports to ${S3_DST}"
./src/python/pants_release/copy_to_s3.py --src-prefix=dist/test/reports --dst-prefix=${S3_DST} --path=""
./pants run ./src/python/pants_release/copy_to_s3.py -- --src-prefix=dist/test/reports --dst-prefix=${S3_DST} --path=""
'
- continue-on-error: true
Expand Down Expand Up @@ -856,7 +856,7 @@ jobs:
echo "Uploading test reports to ${S3_DST}"
./src/python/pants_release/copy_to_s3.py --src-prefix=dist/test/reports --dst-prefix=${S3_DST} --path=""
./pants run ./src/python/pants_release/copy_to_s3.py -- --src-prefix=dist/test/reports --dst-prefix=${S3_DST} --path=""
'
- continue-on-error: true
Expand Down Expand Up @@ -946,7 +946,7 @@ jobs:
echo "Uploading test reports to ${S3_DST}"
./src/python/pants_release/copy_to_s3.py --src-prefix=dist/test/reports --dst-prefix=${S3_DST} --path=""
./pants run ./src/python/pants_release/copy_to_s3.py -- --src-prefix=dist/test/reports --dst-prefix=${S3_DST} --path=""
'
- continue-on-error: true
Expand Down Expand Up @@ -1036,7 +1036,7 @@ jobs:
echo "Uploading test reports to ${S3_DST}"
./src/python/pants_release/copy_to_s3.py --src-prefix=dist/test/reports --dst-prefix=${S3_DST} --path=""
./pants run ./src/python/pants_release/copy_to_s3.py -- --src-prefix=dist/test/reports --dst-prefix=${S3_DST} --path=""
'
- continue-on-error: true
Expand Down Expand Up @@ -1126,7 +1126,7 @@ jobs:
echo "Uploading test reports to ${S3_DST}"
./src/python/pants_release/copy_to_s3.py --src-prefix=dist/test/reports --dst-prefix=${S3_DST} --path=""
./pants run ./src/python/pants_release/copy_to_s3.py -- --src-prefix=dist/test/reports --dst-prefix=${S3_DST} --path=""
'
- continue-on-error: true
Expand Down Expand Up @@ -1216,7 +1216,7 @@ jobs:
echo "Uploading test reports to ${S3_DST}"
./src/python/pants_release/copy_to_s3.py --src-prefix=dist/test/reports --dst-prefix=${S3_DST} --path=""
./pants run ./src/python/pants_release/copy_to_s3.py -- --src-prefix=dist/test/reports --dst-prefix=${S3_DST} --path=""
'
- continue-on-error: true
Expand Down Expand Up @@ -1306,7 +1306,7 @@ jobs:
echo "Uploading test reports to ${S3_DST}"
./src/python/pants_release/copy_to_s3.py --src-prefix=dist/test/reports --dst-prefix=${S3_DST} --path=""
./pants run ./src/python/pants_release/copy_to_s3.py -- --src-prefix=dist/test/reports --dst-prefix=${S3_DST} --path=""
'
- continue-on-error: true
Expand Down Expand Up @@ -1396,7 +1396,7 @@ jobs:
echo "Uploading test reports to ${S3_DST}"
./src/python/pants_release/copy_to_s3.py --src-prefix=dist/test/reports --dst-prefix=${S3_DST} --path=""
./pants run ./src/python/pants_release/copy_to_s3.py -- --src-prefix=dist/test/reports --dst-prefix=${S3_DST} --path=""
'
- continue-on-error: true
Expand Down Expand Up @@ -1486,7 +1486,7 @@ jobs:
echo "Uploading test reports to ${S3_DST}"
./src/python/pants_release/copy_to_s3.py --src-prefix=dist/test/reports --dst-prefix=${S3_DST} --path=""
./pants run ./src/python/pants_release/copy_to_s3.py -- --src-prefix=dist/test/reports --dst-prefix=${S3_DST} --path=""
'
- continue-on-error: true
Expand Down Expand Up @@ -1576,7 +1576,7 @@ jobs:
echo "Uploading test reports to ${S3_DST}"
./src/python/pants_release/copy_to_s3.py --src-prefix=dist/test/reports --dst-prefix=${S3_DST} --path=""
./pants run ./src/python/pants_release/copy_to_s3.py -- --src-prefix=dist/test/reports --dst-prefix=${S3_DST} --path=""
'
- continue-on-error: true
Expand Down Expand Up @@ -1634,7 +1634,7 @@ jobs:
echo "Uploading test reports to ${S3_DST}"
./src/python/pants_release/copy_to_s3.py --src-prefix=dist/test/reports --dst-prefix=${S3_DST} --path=""
./pants run ./src/python/pants_release/copy_to_s3.py -- --src-prefix=dist/test/reports --dst-prefix=${S3_DST} --path=""
'
- continue-on-error: true
Expand Down
18 changes: 9 additions & 9 deletions src/python/pants_release/generate_github_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def deploy_to_s3(
) -> Step:
run = "./pants run src/python/pants_release/deploy_to_s3.py"
if scope:
run = f"{run} --scope {scope}"
run = f"{run} -- --scope {scope}"
return {
"name": name,
"run": run,
Expand Down Expand Up @@ -569,7 +569,8 @@ def upload_test_reports(self) -> Step:
f"""\
export S3_DST={s3_dst}
echo "Uploading test reports to ${{S3_DST}}"
./src/python/pants_release/copy_to_s3.py \
./pants run ./src/python/pants_release/copy_to_s3.py \
-- \
--src-prefix=dist/test/reports \
--dst-prefix=${{S3_DST}} \
--path=""
Expand Down Expand Up @@ -1275,13 +1276,12 @@ def main() -> None:
for path, content in generated_yaml.items():
if path.read_text() != content:
die(
dedent(
f"""\
Error: Generated path mismatched: {path}
To re-generate, run: `./pants run build-support/bin/{
os.path.basename(__file__)
}`
"""
os.linesep.join(
(
f"Error: Generated path mismatched: {path}",
"To re-generate, run: `./pants run src/python/pants_release/"
"generate_github_workflows.py`",
)
)
)
else:
Expand Down

0 comments on commit 3b52f36

Please sign in to comment.