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

fix: typo in Zarf pkg name and refactor smoke test workflow #644

Merged
merged 2 commits into from
May 29, 2024
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
44 changes: 40 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,22 +75,58 @@ jobs:

- name: Run e2e tests
run: |
build/uds run test:e2e
build/uds run test:e2e --no-progress
env:
GITHUB_TOKEN: secrets.GITHUB_TOKEN

- name: Save logs
if: always()
uses: ./.github/actions/save-logs

smoke-test:
runs-on: ubuntu-latest
needs: build
steps:
# Checkout the repo and setup the tooling for this job
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
fetch-depth: 0

- name: Download build artifacts
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: build-artifacts
path: build/

- name: Setup golang
uses: ./.github/actions/golang

- name: Make UDS-CLI executable
run: |
chmod +x build/uds

- name: Setup K3d
uses: ./.github/actions/k3d

- name: Login to GHCR
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Run UDS Core smoke test
run: build/uds run test:ci-uds-core-smoke-test
run: build/uds run test:ci-uds-core-smoke-test --no-progress
shell: bash

- name: Save logs
if: always()
uses: ./.github/actions/save-logs

push:
runs-on: ubuntu-latest
environment: release
needs: validate
needs: [validate, smoke-test]
permissions:
contents: write
steps:
Expand Down
2 changes: 1 addition & 1 deletion src/test/bundles/14-optional-components/uds-bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ packages:
- upload-image

# deploys podinfo as an optional component and apache as a required component
- name: podinfo-nginx-apache
- name: podinfo-nginx
path: ../../packages/podinfo-nginx
ref: 0.0.1
optionalComponents:
Expand Down
9 changes: 7 additions & 2 deletions src/test/e2e/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,12 @@ func deployZarfInit(t *testing.T) {
}

func zarfInitDeployed() bool {
cmd := strings.Split("zarf tools kubectl get deployments --namespace zarf", " ")
cmd := strings.Split("zarf tools kubectl get deployments zarf-docker-registry --namespace zarf", " ")
_, stderr, _ := e2e.UDS(cmd...)
return !strings.Contains(stderr, "No resources found in zarf namespace")
registryDeployed := !strings.Contains(stderr, "No resources found in zarf namespace") && !strings.Contains(stderr, "not found")

cmd = strings.Split("zarf tools kubectl get deployments agent-hook --namespace zarf", " ")
_, stderr, _ = e2e.UDS(cmd...)
agentDeployed := !strings.Contains(stderr, "No resources found in zarf namespace") && !strings.Contains(stderr, "not found")
return registryDeployed && agentDeployed
}
2 changes: 1 addition & 1 deletion src/test/packages/podinfo-nginx/zarf.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
kind: ZarfPackageConfig
metadata:
name: podinfo-nginx-apache
name: podinfo-nginx
description: used to test bundles with optional components
version: 0.0.1

Expand Down
Loading