Skip to content

Commit

Permalink
Convert acceptance to use github actions (#2046)
Browse files Browse the repository at this point in the history
* Terraform: increase node sizes
* update GKE to use already created subnets
* Dispatch: dispatch to consul-k8s-workflows
  • Loading branch information
curtbushko authored and absolutelightning committed Aug 4, 2023
1 parent bf669c7 commit d7ce40c
Show file tree
Hide file tree
Showing 28 changed files with 209 additions and 704 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/nightly-acceptance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Dispatch to the consul-k8s-workflows with a nightly cron
name: nightly-acceptance
on:
schedule:
# * is a special character in YAML so you have to quote this string
# Run nightly at 12AM UTC/8PM EST/5PM PST
- cron: '0 0 * * *'

# these should be the only settings that you will ever need to change
env:
CONSUL_IMAGE: hashicorppreview/consul-enterprise:1.16-dev # Consul's enterprise version to use in tests
BRANCH: ${{ github.ref_name }}
CONTEXT: "nightly"

jobs:
cloud:
name: cloud
runs-on: ubuntu-latest
steps:
- uses: benc-uk/[email protected]
name: cloud
with:
workflow: cloud.yml
repo: hashicorp/consul-k8s-workflows
ref: main
token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
inputs: '{ "context":"${{ env.CONTEXT }}", "repository":"${{ github.repository }}", "branch":"${{ env.BRANCH }}", "sha":"${{ github.sha }}", "token":"${{ secrets.ELEVATED_GITHUB_TOKEN }}", "consul-image":"${{ env.CONSUL_IMAGE }}" }'
31 changes: 31 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Dispatch to the consul-k8s-workflows when a PR is created and on merges to main/release*
name: pr
on:
pull_request:
push:
# Sequence of patterns matched against refs/heads
branches:
# Push events on main branch
- main
# Push events to branches matching refs/heads/release/**
- "release/**"

# these should be the only settings that you will ever need to change
env:
CONSUL_IMAGE: hashicorppreview/consul-enterprise:1.16-dev # Consul's enterprise version to use in tests. We use this consul image on release branches too
BRANCH: ${{ github.head_ref || github.ref_name }}
CONTEXT: "${{ github.actor }}"

jobs:
test:
name: test
runs-on: ubuntu-latest
steps:
- uses: benc-uk/[email protected]
name: test
with:
workflow: test.yml
repo: hashicorp/consul-k8s-workflows
ref: main
token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
inputs: '{ "context":"${{ env.CONTEXT }}", "repository":"${{ github.repository }}", "branch":"${{ env.BRANCH }}", "sha":"${{ github.sha }}", "token":"${{ secrets.ELEVATED_GITHUB_TOKEN }}", "consul-image":"${{ env.CONSUL_IMAGE }}" }'
159 changes: 0 additions & 159 deletions .github/workflows/reusable-acceptance.yml

This file was deleted.

36 changes: 0 additions & 36 deletions .github/workflows/reusable-golangci-lint.yml

This file was deleted.

59 changes: 0 additions & 59 deletions .github/workflows/reusable-unit.yml

This file was deleted.

Loading

0 comments on commit d7ce40c

Please sign in to comment.