Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
7 changes: 0 additions & 7 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,6 @@ updates:
- dependency-name: "mcr.microsoft.com/vscode/devcontainers/typescript-node"
update-types: ["version-update:semver-major"]

- package-ecosystem: "docker-compose"
directory: "/"
schedule:
interval: "weekly"
allow:
- dependency-name: "ghcr.io/ministackorg/ministack"

- package-ecosystem: "pip"
directory: "/.github/workflows/mkdocs"
schedule:
Expand Down
86 changes: 3 additions & 83 deletions .github/workflows/ministack.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,8 @@
name: "MiniStack Terraform lifecycle"
name: "Terraform lifecycle"

on:
push:
branches:
- main
paths:
- ".github/workflows/ministack.yml"
- "tests/ministack/**"
- "*.tf"
- "policies/**"
- "examples/**"
- "modules/**"
- "lambdas/**"
pull_request:
paths:
- ".github/workflows/ministack.yml"
- "tests/ministack/**"
- "*.tf"
- "policies/**"
- "examples/**"
- "modules/**"
- "lambdas/**"
workflow_dispatch:
paths: ["**/*.tf", "**/*.hcl", ".github/workflows/ministack.yml"]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -76,7 +57,7 @@ jobs:
- termination-watcher
services:
ministack:
image: ghcr.io/ministackorg/ministack:1.5.11@sha256:ce3c906f2866ff953ce4c56f06b1fa3e453bc32e41c00de17b5f5a8672c5a42c
image: ghcr.io/ministackorg/ministack:1.5.13@sha256:ce3c906f2866ff953ce4c56f06b1fa3e453bc32e41c00de17b5f5a8672c5a42c
ports:
- 4566:4566
env:
Expand Down Expand Up @@ -134,64 +115,3 @@ jobs:
IAC_BINARY: ${{ matrix.iac.binary }}
IAC_LOCK_FILE: ${{ matrix.iac.lockfile }}
run: tests/ministack/run-example.sh destroy "$EXAMPLE"

integration_smoke:
name: Run webhook and pool lifecycle smoke test against MiniStack
runs-on: ubuntu-latest
timeout-minutes: 30
services:
ministack:
image: ghcr.io/ministackorg/ministack:1.5.10@sha256:706b2b83c6be7e4f4dbb6a0dc28ffdebb500c6c80b64cf7938f45040fb2158e8
ports:
- 4566:4566
options: --add-host=host.docker.internal:host-gateway
env:
MINISTACK_ACCOUNT_ID: "000000000000"
MINISTACK_REGION: eu-west-1
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1
with:
egress-policy: audit

- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: lambdas/.nvmrc
package-manager-cache: false

- name: Setup Terraform
uses: hashicorp/setup-terraform@dfe3c3f87815947d99a8997f908cb6525fc44e9e # v4.0.1
with:
terraform_version: latest
terraform_wrapper: false

- name: Install Lambda dependencies
working-directory: lambdas
run: yarn install --frozen-lockfile

- name: Build smoke-test Lambda distributions
working-directory: lambdas
run: |
yarn workspace @aws-github-runner/webhook dist
yarn workspace @aws-github-runner/control-plane dist

- name: Start MockServer
id: mockserver
uses: mock-server/setup-mockserver@24612c2ccef1f83d587f331ed77cc5cef441e0b1 # v1.0.0
with:
version: '7.6.0@sha256:80b3b1a26f3553d0c81a3f3896b5b7274c17b2a2e52f0fd2b28e246bc9efa290'
port: '1080'
startup-timeout: '60'

- name: Run webhook and pool lifecycle smoke test
env:
MINISTACK_GITHUB_MOCK_HOST: host.docker.internal
MINISTACK_GITHUB_MOCK_PORT: "1080"
MINISTACK_GITHUB_MOCK_URL: ${{ steps.mockserver.outputs.url }}
run: sh tests/ministack/run-smoke.sh
85 changes: 85 additions & 0 deletions .github/workflows/smoke-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: "Smoke Tests"

on:
pull_request:
paths: ["**/*.tf", "**/*.hcl", ".github/workflows/smoke-tests.yml"]
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

env:
AWS_ACCESS_KEY_ID: "000000000000"
AWS_DEFAULT_REGION: eu-west-1
AWS_EC2_METADATA_DISABLED: "true"
AWS_ENDPOINT_URL: http://localhost:4566
AWS_REGION: eu-west-1
AWS_SECRET_ACCESS_KEY: test-only
TF_IN_AUTOMATION: "true"
TF_INPUT: "false"

jobs:
control_plane_smoke:
name: Run webhook and pool lifecycle smoke test against MiniStack
runs-on: ubuntu-latest
timeout-minutes: 30
services:
ministack:
image: ghcr.io/ministackorg/ministack:1.5.13@sha256:ce3c906f2866ff953ce4c56f06b1fa3e453bc32e41c00de17b5f5a8672c5a42c
ports:
- 4566:4566
options: --add-host=host.docker.internal:host-gateway
env:
MINISTACK_ACCOUNT_ID: "000000000000"
MINISTACK_REGION: eu-west-1
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1
with:
egress-policy: audit

- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: lambdas/.nvmrc
package-manager-cache: false

- name: Setup Terraform
uses: hashicorp/setup-terraform@dfe3c3f87815947d99a8997f908cb6525fc44e9e # v4.0.1
with:
terraform_version: latest
terraform_wrapper: false

- name: Install Lambda dependencies
working-directory: lambdas
run: yarn install --frozen-lockfile

- name: Build smoke-test Lambda distributions
working-directory: lambdas
run: |
yarn workspace @aws-github-runner/webhook dist
yarn workspace @aws-github-runner/control-plane dist

- name: Start MockServer
id: mockserver
uses: mock-server/setup-mockserver@24612c2ccef1f83d587f331ed77cc5cef441e0b1 # v1.0.0
with:
version: '7.6.0@sha256:80b3b1a26f3553d0c81a3f3896b5b7274c17b2a2e52f0fd2b28e246bc9efa290'
port: '1080'
startup-timeout: '60'

- name: Run webhook and pool lifecycle smoke test
env:
MINISTACK_GITHUB_MOCK_HOST: host.docker.internal
MINISTACK_GITHUB_MOCK_PORT: "1080"
MINISTACK_GITHUB_MOCK_URL: ${{ steps.mockserver.outputs.url }}
run: sh tests/ministack/run-smoke.sh
Loading