-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
CRT Onboarding #11564
Merged
Merged
CRT Onboarding #11564
Changes from 24 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
aec1849
Initial crt onboarding attempt
mdeggies adbc009
Adding team to codeowners
mdeggies d1a39ef
Build docker full and light
mdeggies af27b50
Fix build syntax
mdeggies bc03776
Add target for full image
mdeggies 199ad17
Update .github/workflows/acceptance-test.yml
mdeggies 767b38c
Address docker feedback; update full target
mdeggies 2f76d46
Docker fixes
mdeggies 70b4387
Updates
mdeggies 6ae22ac
Removing setup-qemu
mdeggies b49a406
test out nightly build
mdeggies 8e66fcf
Fix syntax for nightlies
mdeggies c749663
Updating path :D
mdeggies b5c414f
Adding checkout
mdeggies ddaa523
Trying this..
mdeggies e0ea77c
Testing
mdeggies 3d6d453
Update tag...
mdeggies f9ca247
This should fail
mdeggies f21de8f
Update plugin test to support XDG_CONFIG_HOME
nywilken 62b8450
Setting token
mdeggies 7575e9e
Trigger a nightly build
mdeggies 1173f20
Trigger a nightly build
mdeggies be17ade
Cleaning up
mdeggies cb5d80b
Merge remote-tracking branch 'origin' into crt-onboarding
mdeggies 7f882d7
Add in claire's suggestion
mdeggies 2b95205
Removing test branch
mdeggies 8afc889
Adding claires other great suggestion
mdeggies 2780249
Add post-publish logic to ci.hcl
mdeggies 5ad3a9e
Update CODEOWNERS
nywilken fe85204
Merge branch 'master' into crt-onboarding
nywilken File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
# | ||
# This GitHub action runs Packer's acceptance tests every night. | ||
# Failures are reported to slack. | ||
# | ||
|
||
name: "Acceptance Test" | ||
|
||
on: | ||
schedule: | ||
# Runs against the default branch every day at midnight | ||
- cron: "0 0 * * *" | ||
|
||
jobs: | ||
get-go-version: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
go-version: ${{ steps.get-go-version.outputs.go-version }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: 'Determine Go version' | ||
id: get-go-version | ||
# We use .go-version as our source of truth for current Go | ||
# version, because "goenv" can react to it automatically. | ||
run: | | ||
echo "Building with Go $(cat .go-version)" | ||
echo "::set-output name=go-version::$(cat .go-version)" | ||
acceptance-test: | ||
runs-on: ubuntu-latest | ||
name: Acceptance Test | ||
needs: get-go-version | ||
env: | ||
# AWS Creds for Assume Role | ||
AWS_ROLE_ARN: ${{ secrets.AWS_ROLE_ARN }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.TESTACC_AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.TESTACC_AWS_SECRET_ACCESS_KEY }} | ||
AWS_REGION: ${{ secrets.TESTACC_AWS_REGION }} | ||
# HCP Creds for Acceptance Tests | ||
HCP_CLIENT_ID: ${{ secrets.HCP_CLIENT_ID }} | ||
HCP_CLIENT_SECRET: ${{ secrets.HCP_CLIENT_SECRET }} | ||
HCP_ORG_ID: ${{ secrets.HCP_ORG_ID }} | ||
HCP_PROJECT_ID: ${{ secrets.HCP_PROJECT_ID }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ needs.get-go-version.outputs.go-version }} | ||
- name: IAM Assume Role | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
role-to-assume: ${{ env.AWS_ROLE_ARN }} | ||
aws-region: ${{ env.AWS_REGION }} | ||
aws-access-key-id: ${{ env.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ env.AWS_SECRET_ACCESS_KEY }} | ||
role-duration-seconds: 3600 | ||
- name: Install gotestsum | ||
run: go install gotest.tools/gotestsum@latest | ||
- name: Run acceptance tests per module | ||
run: | | ||
mkdir -p /tmp/test-results | ||
make dev | ||
PACKER_ACC=1 gotestsum --format=short-verbose --junitfile /tmp/test-results/gotestsum-report.xml -- -timeout=120m -p 2 $(go list ./... | grep -v inspec | grep -v profitbricks | grep -v oneandone) | ||
# Send a slack notification if either job defined above fails | ||
slack-notify: | ||
needs: | ||
- get-go-version | ||
- acceptance-test | ||
if: always() && (needs.get-go-version.result == 'failure' || needs.acceptance-test.result == 'failure') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Send slack notification on failure | ||
uses: slackapi/slack-github-action@v1.18.0 | ||
with: | ||
payload: | | ||
{ | ||
"text": ":alert: Packer Nightly Acceptance Tests *FAILED* :alert:", | ||
"attachments": [ | ||
{ | ||
"color": "#C41E3A", | ||
"blocks": [ | ||
{ | ||
"type": "section", | ||
"text": { | ||
"type": "mrkdwn", | ||
"text": "Branch: `${{ github.ref_name }}`\nRef: ${{ github.event.pull_request.html_url || github.event.head_commit.url }}\nWorkflow: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# | ||
# This GitHub action pushes content to the Algolia Index. | ||
# | ||
|
||
name: "Algolia index" | ||
|
||
on: | ||
push: | ||
branches: | ||
# Runs on push events to the stable-website branch | ||
- 'stable-website' | ||
|
||
jobs: | ||
algolia-index: | ||
runs-on: ubuntu-latest | ||
name: Push content to Algolia Index | ||
if: github.repository == 'hashicorp/packer' && github.ref_name == 'stable-website' | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14' | ||
- run: | | ||
cd website/ | ||
npm install -g npm@latest | ||
npm install | ||
npx ts-node --skip-ignore -P ./scripts/tsconfig.json ./scripts/index_search_content.ts |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 this is going to be awesome.