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

CRT Onboarding #11564

Merged
merged 30 commits into from
Feb 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
aec1849
Initial crt onboarding attempt
mdeggies Feb 10, 2022
adbc009
Adding team to codeowners
mdeggies Feb 12, 2022
d1a39ef
Build docker full and light
mdeggies Feb 12, 2022
af27b50
Fix build syntax
mdeggies Feb 12, 2022
bc03776
Add target for full image
mdeggies Feb 12, 2022
199ad17
Update .github/workflows/acceptance-test.yml
mdeggies Feb 16, 2022
767b38c
Address docker feedback; update full target
mdeggies Feb 16, 2022
2f76d46
Docker fixes
mdeggies Feb 16, 2022
70b4387
Updates
mdeggies Feb 22, 2022
6ae22ac
Removing setup-qemu
mdeggies Feb 22, 2022
b49a406
test out nightly build
mdeggies Feb 22, 2022
8e66fcf
Fix syntax for nightlies
mdeggies Feb 22, 2022
c749663
Updating path :D
mdeggies Feb 22, 2022
b5c414f
Adding checkout
mdeggies Feb 22, 2022
ddaa523
Trying this..
mdeggies Feb 22, 2022
e0ea77c
Testing
mdeggies Feb 22, 2022
3d6d453
Update tag...
mdeggies Feb 22, 2022
f9ca247
This should fail
mdeggies Feb 22, 2022
f21de8f
Update plugin test to support XDG_CONFIG_HOME
nywilken Feb 23, 2022
62b8450
Setting token
mdeggies Feb 23, 2022
7575e9e
Trigger a nightly build
mdeggies Feb 24, 2022
1173f20
Trigger a nightly build
mdeggies Feb 24, 2022
be17ade
Cleaning up
mdeggies Feb 24, 2022
cb5d80b
Merge remote-tracking branch 'origin' into crt-onboarding
mdeggies Feb 24, 2022
7f882d7
Add in claire's suggestion
mdeggies Feb 24, 2022
2b95205
Removing test branch
mdeggies Feb 24, 2022
8afc889
Adding claires other great suggestion
mdeggies Feb 24, 2022
2780249
Add post-publish logic to ci.hcl
mdeggies Feb 25, 2022
5ad3a9e
Update CODEOWNERS
nywilken Feb 25, 2022
fe85204
Merge branch 'master' into crt-onboarding
nywilken Feb 25, 2022
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
236 changes: 0 additions & 236 deletions .circleci/config.yml

This file was deleted.

93 changes: 93 additions & 0 deletions .github/workflows/acceptance-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
#
# This GitHub action runs Packer's acceptance tests every night.
Copy link
Contributor

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.

# 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
27 changes: 27 additions & 0 deletions .github/workflows/algolia-index.yml
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
Loading