Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

Commit

Permalink
Move to uds task runner and away from terratest (#52)
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Kruggel <Michael-Kruggel@users.noreply.github.com>
Co-authored-by: Michael-Kruggel <michael.kruggel@defenseunicorns.com>
  • Loading branch information
3 people authored Nov 28, 2023
1 parent 516fcfd commit 26ca7ce
Show file tree
Hide file tree
Showing 28 changed files with 4,307 additions and 1,014 deletions.
163 changes: 0 additions & 163 deletions .github/actions/e2e/action.yml

This file was deleted.

4 changes: 0 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@ concurrency:
group: build-and-publish

on:
push:
branches: [ "main" ]
workflow_dispatch:
schedule:
- cron: '0 0 * * *'

jobs:
build-and-publish-package:
Expand Down
105 changes: 90 additions & 15 deletions .github/workflows/test-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,20 +77,95 @@ jobs:
if: needs.parse.outputs.run-e2e == 'true'
steps:
- name: Checkout Repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
token: ${{ secrets.PAT }}
repository: ${{ github.event.client_payload.pull_request.head.repo.full_name || github.repository }}
ref: ${{ github.event.client_payload.pull_request.head.ref || github.ref_name }}
- name: Run E2E Tests
uses: ./.github/actions/e2e
fetch-depth: 0

- name: Login to GHCR
uses: docker/login-action@v2
with:
token: ${{ secrets.PAT }}
role-to-assume: ${{ secrets.AWS_COMMERCIAL_ROLE_TO_ASSUME }}
region: ${{ vars.AWS_REGION }}
github-context: "test / e2e (${{github.event_name}})"
aws-availability-zone: ${{ vars.AWS_AVAILABILITY_ZONE }}
ghcr-username: ${{ github.actor }}
ghcr-password: ${{ secrets.GITHUB_TOKEN }}
registry1-username: ${{ secrets.REGISTRY1_USERNAME }}
registry1-password: ${{ secrets.REGISTRY1_PASSWORD }}
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Login to registry1
uses: docker/login-action@v2
with:
registry: registry1.dso.mil
username: ${{ secrets.REGISTRY1_USERNAME }}
password: ${{ secrets.REGISTRY1_PASSWORD }}

- name: Install homebrew
uses: Homebrew/actions/setup-homebrew@master

- name: Install uds-cli via homebrew
run: |
brew tap defenseunicorns/tap
brew install uds
- name: Build bundle and all dependencies
run: |
uds run build-all
- name: Add zarf to bin on path
run: |
sudo cp build/zarf /usr/local/bin/zarf
- name: Create k3s cluster in AWS
id: create-cluster
uses: defenseunicorns/uds-aws-ci-k3d@swf_additions
with:
cluster-action: create
aws-assume-role: ${{ secrets.AWS_COMMERCIAL_ROLE_TO_ASSUME }}
aws-region: us-west-2
instance-size: "m7a.8xlarge"
ami-prefix: "rc-uds-ci-k3d"
k3s: "true"

- name: Install Pepr nlb lb module
run: |
zarf tools kubectl apply -f test/lb-annotation-aws/pepr-module-lb-annotate.yaml
- name: Install Pepr flux resources module
run: |
zarf tools kubectl apply -f test/flux-resources-bump/pepr-module-flux-resources.yaml
- name: Deploy bundle
run: |
uds run deploy-all
- name: Setup LB hostnames
run: |
utils/metallb/dns.sh
sudo utils/metallb/hosts-write.sh
- name: Run tests
run: |
uds run test-all -f test/tasks.yaml
- name: Print cluster info
if: failure()
run: |
kubectl get nodes -o wide
- name: Print pod info
if: failure()
run: |
kubectl get pods -A -o wide
- name: Print service info
if: failure()
run: |
kubectl get svc -A -o wide
- name: Print events
if: failure()
run: |
kubectl get events -A -o wide
- name: Teardown k3s cluster
if: always()
# renovate: datasource=github-tags depName=defenseunicorns/uds-aws-ci-k3d versioning=semver
uses: defenseunicorns/uds-aws-ci-k3d@swf_additions
with:
cluster-action: destroy
Loading

0 comments on commit 26ca7ce

Please sign in to comment.