Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): Update install.sh workflow to not publish to AWS #21412

Merged
merged 4 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 1 addition & 46 deletions .github/workflows/install-sh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,57 +5,12 @@ on:
workflow_dispatch:

jobs:

sync-install:
runs-on: ubuntu-20.04
timeout-minutes: 10
steps:
- name: (PR comment) Get PR branch
if: ${{ github.event_name == 'issue_comment' }}
uses: xt0rted/pull-request-comment-branch@v2
id: comment-branch

- name: (PR comment) Set latest commit status as pending
if: ${{ github.event_name == 'issue_comment' }}
uses: myrotvorets/[email protected]
with:
sha: ${{ steps.comment-branch.outputs.head_sha }}
token: ${{ secrets.GITHUB_TOKEN }}
context: Update install.sh Suite
status: pending

- name: (PR comment) Checkout PR branch
if: ${{ github.event_name == 'issue_comment' }}
uses: actions/checkout@v3
with:
ref: ${{ steps.comment-branch.outputs.head_ref }}

- name: Checkout branch
if: ${{ github.event_name != 'issue_comment' }}
uses: actions/checkout@v3

- run: pip3 install awscli --upgrade --user
- env:
AWS_ACCESS_KEY_ID: "${{ secrets.CI_AWS_ACCESS_KEY_ID }}"
AWS_SECRET_ACCESS_KEY: "${{ secrets.CI_AWS_SECRET_ACCESS_KEY }}"
run: make sync-install

- name: (PR comment) Set latest commit status as failed
uses: myrotvorets/[email protected]
if: failure() && github.event_name == 'issue_comment'
with:
sha: ${{ steps.comment-branch.outputs.head_sha }}
token: ${{ secrets.GITHUB_TOKEN }}
context: Update install.sh Suite
status: 'failure'

test-install:
needs: sync-install
runs-on: ubuntu-20.04
timeout-minutes: 5
steps:
- run: sudo apt-get install --yes curl bc
- run: curl --proto '=https' --tlsv1.2 -sSfL https://sh.vector.dev | bash -s -- -y
- run: bash distribution/install.sh -- -y
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Purely curiosity- why is the explicit bash call needed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, given the file does have the executable bit (x) it technically isn't needed. I just have a habit of using bash with anything ending in .sh since those frequently aren't executable.

- run: ~/.vector/bin/vector --version

- name: (PR comment) Get PR branch
Expand Down
4 changes: 0 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -645,10 +645,6 @@ release-push: ## Push new Vector version
release-s3: ## Release artifacts to S3
@cargo vdev release s3

.PHONY: sync-install
sync-install: ## Sync the install.sh script for access via sh.vector.dev
@aws s3 cp distribution/install.sh s3://sh.vector.dev --sse --acl public-read

.PHONY: sha256sum
sha256sum: ## Generate SHA256 checksums of CI artifacts
scripts/checksum.sh
Expand Down
Loading