Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
ittacco authored Oct 18, 2024
2 parents b7c8c9b + f60a70a commit 6987549
Show file tree
Hide file tree
Showing 54 changed files with 796 additions and 302 deletions.
1 change: 0 additions & 1 deletion .github/actions/cleanup-files/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ runs:
echo "removing zarf sboms, packages, cache"
sudo rm -rf zarf-sbom /tmp/zarf-*
sudo env "PATH=$PATH" CI=true make delete-packages
sudo build/zarf tools clear-cache
lsblk -f
Expand Down
10 changes: 0 additions & 10 deletions .github/actions/golang/action.yaml

This file was deleted.

4 changes: 3 additions & 1 deletion .github/workflows/check-go-mod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ jobs:
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod

- name: Test go mod
run: |
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/nightly-ecr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ jobs:
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod

- name: Build the Zarf binary
run: make build-cli-linux-amd
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/nightly-eks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ jobs:
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod

- name: Build binary and zarf packages
uses: ./.github/actions/packages
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ jobs:
fetch-depth: 0

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod

- name: Install tools
uses: ./.github/actions/install-tools
Expand Down Expand Up @@ -107,7 +109,9 @@ jobs:
path: build/

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod

- name: Make Zarf executable
run: |
Expand Down Expand Up @@ -140,7 +144,9 @@ jobs:
fetch-depth: 0

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod

- name: Install tools
uses: ./.github/actions/install-tools
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/scan-codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,13 @@ jobs:
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12
uses: github/codeql-action/init@f779452ac5af1c261dce0346a8f964149f49322b # v3.26.13
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql.yaml
Expand All @@ -52,6 +54,6 @@ jobs:
run: make build-cli-linux-amd

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12
uses: github/codeql-action/analyze@f779452ac5af1c261dce0346a8f964149f49322b # v3.26.13
with:
category: "/language:${{matrix.language}}"
4 changes: 3 additions & 1 deletion .github/workflows/scan-docs-and-schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ jobs:
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod

- name: Docs and schemas
run: "make test-docs-and-schema"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scorecard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12
uses: github/codeql-action/upload-sarif@f779452ac5af1c261dce0346a8f964149f49322b # v3.26.13
with:
sarif_file: results.sarif
24 changes: 18 additions & 6 deletions .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ jobs:
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod

- name: Build binary and zarf packages
uses: ./.github/actions/packages
Expand Down Expand Up @@ -67,7 +69,9 @@ jobs:
path: build/

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod

- name: Make Zarf executable
run: |
Expand Down Expand Up @@ -102,7 +106,9 @@ jobs:
path: build/

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod

- name: Setup K3d
uses: ./.github/actions/k3d
Expand Down Expand Up @@ -144,7 +150,9 @@ jobs:
path: build/

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod

- name: Make Zarf executable
run: |
Expand Down Expand Up @@ -182,7 +190,9 @@ jobs:
path: build/

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod

- name: Setup Kind
run: |
Expand Down Expand Up @@ -226,7 +236,9 @@ jobs:
path: build/

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod

- name: Setup Minikube
run: minikube start --driver=docker
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test-external.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ jobs:
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod

- name: Build binary and zarf packages
uses: ./.github/actions/packages
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/test-import.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: 'go.mod'
cache: true
go-version-file: go.mod

- name: Run test Go program that imports Zarf
run: |
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/test-package-create.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Test Package Create Checksums

on:
pull_request:
merge_group:

permissions:
contents: read

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

jobs:
test-checksums:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod

- name: Build Zarf
run: make build

- name: Build examples
run: make build-examples ARCH=amd64

- name: Compare checksums
run: |
set -e
for f in hack/examples-checksums/*.txt
do
NAME=$(basename $f .txt)
CHECKSUM=$(tar Oxf build/$NAME.tar.zst checksums.txt | grep -v sboms.tar)
EXPECTED_CHECKSUM=$(cat $f | grep -v sboms.tar)
if [[ "$CHECKSUM" != "$EXPECTED_CHECKSUM" ]]
then
echo "Package $f does not have expected checksum."
echo "$CHECKSUM"
echo "-----"
echo "$EXPECTED_CHECKSUM"
exit 1
fi
done
4 changes: 3 additions & 1 deletion .github/workflows/test-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ jobs:
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod

- name: Run unit tests
run: make test-unit
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/test-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ jobs:
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod

- name: Build PR binary and zarf init package
uses: ./.github/actions/packages
Expand Down Expand Up @@ -66,7 +68,9 @@ jobs:
path: build/

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod

- name: Make Zarf executable
run: |
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ jobs:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Setup golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod

- name: Run Windows unit tests
run: make test-unit
shell: pwsh
Expand All @@ -46,6 +51,11 @@ jobs:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Setup golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod

- name: Build Windows binary and zarf packages
uses: ./.github/actions/packages
with:
Expand Down
3 changes: 0 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@ destroy: ## Run `zarf destroy` on the current cluster
$(ZARF_BIN) destroy --confirm --remove-components
rm -fr build

delete-packages: ## Delete all Zarf package tarballs in the project recursively
find . -type f -name 'zarf-package-*' -not -path '*/testdata/*' -print -delete

# Note: the path to the main.go file is not used due to https://github.com/golang/go/issues/51831#issuecomment-1074188363
.PHONY: build
build: ## Build the Zarf CLI for the machines OS and architecture
Expand Down
9 changes: 0 additions & 9 deletions examples/dos-games/zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,6 @@ components:
- manifests/service.yaml
images:
- ghcr.io/zarf-dev/doom-game:0.0.1
actions:
onDeploy:
after:
- wait:
cluster:
kind: deployment
name: game
namespace: dos-games
condition: available

# YAML keys starting with `x-` are custom keys that are ignored by the Zarf CLI
# The `x-mdx` key is used to render the markdown content for https://docs.zarf.dev/ref/examples
Expand Down
27 changes: 0 additions & 27 deletions examples/helm-charts/zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,33 +56,6 @@ components:
- ghcr.io/stefanprodan/podinfo:6.4.0
# This is the cosign signature for the podinfo image for image signature verification
- ghcr.io/stefanprodan/podinfo:sha256-57a654ace69ec02ba8973093b6a786faa15640575fbf0dbb603db55aca2ccec8.sig
actions:
onDeploy:
after:
- wait:
cluster:
kind: deployment
name: podinfo-local
namespace: podinfo-from-local-chart
condition: available
- wait:
cluster:
kind: deployment
name: podinfo-oci
namespace: podinfo-from-oci
condition: available
- wait:
cluster:
kind: deployment
name: podinfo-git
namespace: podinfo-from-git
condition: available
- wait:
cluster:
kind: deployment
name: cool-release-name-podinfo
namespace: podinfo-from-repo
condition: available

# YAML keys starting with `x-` are custom keys that are ignored by the Zarf CLI
# The `x-mdx` key is used to render the markdown content for https://docs.zarf.dev/ref/examples
Expand Down
Loading

0 comments on commit 6987549

Please sign in to comment.