Skip to content

Commit

Permalink
Merge branch 'main' into renovate/defenseunicorns-uds-common-0.x
Browse files Browse the repository at this point in the history
  • Loading branch information
catsby authored Oct 1, 2024
2 parents 07c349f + a37c262 commit 239876e
Show file tree
Hide file tree
Showing 42 changed files with 87 additions and 1,226 deletions.
2 changes: 1 addition & 1 deletion .github/actions/golang/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ runs:
steps:
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: 1.21.x
go-version-file: 'go.mod'
13 changes: 11 additions & 2 deletions .github/actions/k3d/action.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
name: setup-k3d
description: "Install k3d and create a cluster"

inputs:
create-cluster:
description: "Boolean specifying if k3d should create a cluster after installation"
required: false
default: 'true'

runs:
using: composite
steps:
- run: "curl -s https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash"
- name: install k3d
run: "curl -s https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash"
shell: bash

- run: k3d cluster delete && k3d cluster create
- name: create cluster
if: ${{ inputs.create-cluster == 'true' }}
run: k3d cluster delete && k3d cluster create
shell: bash
6 changes: 0 additions & 6 deletions .github/actions/setup-from-previous/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@ description: grabs artifact from a previous job and sets up the env for tests
runs:
using: composite
steps:
# Checkout the repo and setup the tooling for this job
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0

- name: Download build artifacts
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/commitlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
fetch-depth: 0

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Dependency Review
uses: actions/dependency-review-action@5a2ce3f5b92ee19cbb1541a4984c76d921601d7c # v4.3.4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly-ghcr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
packages: write
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- name: Setup golang
uses: ./.github/actions/golang
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
contents: write
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
fetch-tags: 'true'

Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/nightly-uds-core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@ concurrency:
jobs:
uds-core-test:
runs-on: ubuntu-latest
strategy:
matrix:
type: [with-cluster, without-cluster]
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
fetch-depth: 0

Expand All @@ -37,9 +40,10 @@ jobs:
run: |
chmod +x build/uds
- name: Install-k3d
run: "curl -s https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash"
shell: bash
- name: Setup K3d
uses: ./.github/actions/k3d
with:
create-cluster: "${{ matrix.type == 'with-cluster' && 'true' || 'false'}}"

- name: Run UDS Core smoke test
run: build/uds run test:ci-uds-core-smoke-test
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/parallel-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
steps:
# Checkout the repo and setup the tooling for this job
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
fetch-depth: 0

Expand Down Expand Up @@ -38,7 +38,7 @@ jobs:
test: [bundle, deploy-flags, index]
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
fetch-depth: 0

Expand All @@ -55,21 +55,21 @@ jobs:
with:
suffix: ${{ matrix.test }}

test-dev-and-state:
test-dev:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
fetch-depth: 0

- name: setup-using-previous-job
uses: ./.github/actions/setup-from-previous

- name: Run e2e dev and state tests
- name: Run e2e dev
run: |
build/uds run test:dev-and-state
build/uds run test:dev
- name: Save logs
if: always()
Expand All @@ -82,7 +82,7 @@ jobs:
needs: build
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
fetch-depth: 0

Expand All @@ -104,7 +104,7 @@ jobs:
needs: build
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
fetch-depth: 0

Expand All @@ -126,7 +126,7 @@ jobs:
needs: build
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
fetch-depth: 0

Expand Down Expand Up @@ -157,7 +157,7 @@ jobs:
needs: build
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
fetch-depth: 0

Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/release-tests.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: E2E Tests
name: E2E Release Tests
on:
workflow_call: # This is the event that triggers the workflow

Expand All @@ -11,7 +11,7 @@ jobs:
needs: test
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
fetch-depth: 0

Expand Down Expand Up @@ -47,10 +47,13 @@ jobs:
smoke-test:
runs-on: ubuntu-latest
needs: test
strategy:
matrix:
type: [with-cluster, without-cluster]
steps:
# Checkout the repo and setup the tooling for this job
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
fetch-depth: 0

Expand All @@ -69,6 +72,8 @@ jobs:
- name: Setup K3d
uses: ./.github/actions/k3d
with:
create-cluster: "${{ matrix.type == 'with-cluster' && 'true' || 'false'}}"

- name: Login to GHCR
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
Expand All @@ -85,4 +90,4 @@ jobs:
if: always()
uses: defenseunicorns/uds-common/.github/actions/save-logs@e3008473beab00b12a94f9fcc7340124338d5c08 # v0.13.1
with:
suffix: smoke-test
suffix: smoke-test-${{ matrix.type }}
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
contents: write
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
fetch-depth: 0

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scan-codeql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- name: Setup golang
uses: ./.github/actions/golang
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scan-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- name: Setup golang
uses: ./.github/actions/golang
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scorecard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

steps:
- name: "Checkout code"
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
persist-credentials: false

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-e2e-pr.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: E2E Tests
name: E2E PR Tests
on:
pull_request:
paths-ignore:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-schema-and-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- name: Setup golang
uses: ./.github/actions/golang
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-unit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- name: Setup golang
uses: ./.github/actions/golang
Expand Down
8 changes: 8 additions & 0 deletions design-docs/0001-bundle-state.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Bundle State

### Update September 24th, 2024

After initial rollout we decided to remove state due to unforeseen issues. For
posterity this document is left intact, but the state feature described has been
removed. We will very likely revisit the idea in the future.

------

## Context

The following 2 issues provide context driving the need for a UDS state tracking mechanism:
Expand Down
1 change: 0 additions & 1 deletion docs/command-reference/uds_deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ uds deploy [BUNDLE_TARBALL|OCI_REF] [flags]
-c, --confirm Confirms bundle deployment without prompting. ONLY use with bundles you trust
-h, --help help for deploy
-p, --packages stringArray Specify which zarf packages you would like to deploy from the bundle. By default all zarf packages in the bundle are deployed.
-P, --prune Forces the removal of packages that are no longer in the bundle
-r, --resume Only deploys packages from the bundle which haven't already been deployed
--retries int Specify the number of retries for package deployments (applies to all pkgs in a bundle) (default 3)
--set stringToString Specify deployment variables to set on the command line (KEY=value) (default [])
Expand Down
1 change: 0 additions & 1 deletion docs/command-reference/uds_dev_deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ uds dev deploy [BUNDLE_DIR|OCI_REF] [flags]
--force-create [beta] For local bundles with local packages, specify whether to create a zarf package even if it already exists.
-h, --help help for deploy
-p, --packages stringArray Specify which zarf packages you would like to deploy from the bundle. By default all zarf packages in the bundle are deployed.
-P, --prune Forces the removal of packages that are no longer in the bundle
-r, --ref stringToString Specify which zarf package ref you want to deploy. By default the ref set in the bundle yaml is used. (default [])
--set stringToString Specify deployment variables to set on the command line (KEY=value) (default [])
```
Expand Down
10 changes: 0 additions & 10 deletions docs/quickstart-and-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,6 @@ As an example: `uds deploy uds-bundle-<name>.tar.zst --resume`

In the process of upgrading bundles, it's common to swap or remove packages from a `uds-bundle.yaml`. These packages can become `unreferenced`, meaning that they are still deployed to the cluster, but are no longer referenced by a bundle. To remove these packages from the cluster, you can use the `--prune` flag when deploying a bundle.

```bash
uds deploy <bundle> --prune
```

This command will prompt and inform the user of any packages that are unreferenced and will be pruned from the cluster. To skip the prompt, you can add the `--confirm` flag to the command.

{{% alert-note %}}
Currently, pruning will occur _after_ the bundle has been deployed.
{{% /alert-note %}}

#### Pre-Deploy View

When `uds deploy` is executed, the bundle's metadata, along with a list of its packages and each package's overrides and Zarf variables, will be outputted to the terminal. Unlike [`inspect --list-variables`](#viewing-variables), this output will show the value set for each override or Zarf variable. Overrides and variables that have not been set will not be shown in the output.
Expand Down
50 changes: 0 additions & 50 deletions hack/validate-uds-core-state.sh

This file was deleted.

1 change: 0 additions & 1 deletion src/cmd/dev.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,5 +150,4 @@ func init() {
devDeployCmd.Flags().StringVarP(&bundleCfg.DevDeployOpts.FlavorInput, "flavor", "f", "", lang.CmdBundleCreateFlagFlavor)
devDeployCmd.Flags().BoolVar(&bundleCfg.DevDeployOpts.ForceCreate, "force-create", false, lang.CmdBundleCreateForceCreate)
devDeployCmd.Flags().StringToStringVar(&bundleCfg.DeployOpts.SetVariables, "set", nil, lang.CmdBundleDeployFlagSet)
devDeployCmd.Flags().BoolVarP(&bundleCfg.DeployOpts.Prune, "prune", "P", false, lang.CmdBundleDeployFlagPrune)
}
Loading

0 comments on commit 239876e

Please sign in to comment.