Skip to content

Consolidate AWS CLI install and S3 upload into single conditional CI step#67

Merged
redpanda-f merged 2 commits intofeat/redpanda/s3-uploadsfrom
copilot/sub-pr-66
Feb 27, 2026
Merged

Consolidate AWS CLI install and S3 upload into single conditional CI step#67
redpanda-f merged 2 commits intofeat/redpanda/s3-uploadsfrom
copilot/sub-pr-66

Conversation

Copy link
Contributor

Copilot AI commented Feb 27, 2026

The AWS CLI installation ran unconditionally, wasting CI time even when S3 credentials weren't configured.

Changes

  • Merged two steps into one: "Install AWS CLI if missing" and "Upload state/latest to S3" are now a single step
  • Early credential check: Step exits immediately if AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION, or CI_LOGS_BUCKET are unset — no installation, no upload attempt
  • CI_LOGS_BUCKET via env: Moved from inline ${{ vars.CI_LOGS_BUCKET }} expansion to an env: block alongside the other credentials for consistency
- name: "EXEC: {Install AWS CLI and upload state/latest to S3}, independent"
  if: always()
  env:
    AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
    AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
    AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }}
    CI_LOGS_BUCKET: ${{ vars.CI_LOGS_BUCKET }}
  run: |
    if [ -z "$AWS_ACCESS_KEY_ID" ] || [ -z "$AWS_SECRET_ACCESS_KEY" ] || [ -z "$AWS_DEFAULT_REGION" ] || [ -z "$CI_LOGS_BUCKET" ]; then
      echo "Skipping S3 upload: AWS credentials or CI_LOGS_BUCKET not configured"
      exit 0
    fi
    # install AWS CLI if needed, then sync to S3

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: redpanda-f <181817029+redpanda-f@users.noreply.github.com>
Copilot AI changed the title [WIP] Add feedback resolution for CI logs upload to S3 Consolidate AWS CLI install and S3 upload into single conditional CI step Feb 27, 2026
@redpanda-f redpanda-f marked this pull request as ready for review February 27, 2026 07:42
@redpanda-f redpanda-f merged commit f95cb28 into feat/redpanda/s3-uploads Feb 27, 2026
@redpanda-f redpanda-f deleted the copilot/sub-pr-66 branch February 27, 2026 07:42
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