Skip to content

Upload build artifacts write-once to jenkins-artifacts - #5

Merged
joemcbride merged 1 commit into
masterfrom
jenkins-artifacts-write-once
Oct 16, 2026
Merged

joemcbride merged 1 commit into
masterfrom
jenkins-artifacts-write-once

Conversation

@chadmyers

Copy link
Copy Markdown
Member

What changed

  • .github/workflows/build.yml, step "Upload Certbot Lambda Assets to S3": uploads certbot/*.zip to jobs/certbot-lambda/<version>/ in the us-west-2 jenkins-artifacts bucket.

  • Uploads use aws s3 cp --no-overwrite.

  • The step fails before it uploads if the version folder already exists in a jenkins-artifacts bucket.

Why

DovetailSoftware/blue-operations#3173 makes the GitHub Actions AWS role write-once on jenkins-artifacts: S3 rejects an upload that would replace an existing artifact. After that change applies, an upload without --no-overwrite gets a 403.

--no-overwrite sends If-None-Match: *, which the new policy requires. But when the key already exists, the CLI skips the file and does not return an error. The check before the upload makes the step fail in that case.

What to expect

  • Safe to merge now. It works with the current role policy and with the new one.
  • Re-runs: a re-run that uploads a version that already exists now fails with ::error::s3://.../<version>/ already exists. To upload again, make a new version (a new commit).
  • No other behavior changes. Keys, buckets, and build output are the same.

🤖 Generated with Claude Code

https://claude.ai/code/session_01YEpbb7PWaTRuHJfSwZyDV1

Upload with aws s3 cp --no-overwrite and fail the step if the version
folder already exists. The GitHub Actions role will require
If-None-Match on jenkins-artifacts uploads.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YEpbb7PWaTRuHJfSwZyDV1
@chadmyers chadmyers self-assigned this Oct 16, 2026
@joemcbride
joemcbride merged commit 6e97a36 into master Oct 16, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants