Skip to content

Commit

Permalink
Merge branch 'main' into 1411-add-style-guide-to-contributor-guide
Browse files Browse the repository at this point in the history
  • Loading branch information
Racer159 authored Apr 12, 2023
2 parents 3d1f79d + 5ada1e3 commit dfe13d4
Show file tree
Hide file tree
Showing 52 changed files with 1,408 additions and 272 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
jobs:
push-resources:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,9 @@ test-upgrade: ## Run the Zarf CLI E2E tests for an external registry and cluster
cd src/test/upgrade-test && go test -failfast -v -timeout 30m

.PHONY: test-unit
test-unit: ensure-ui-build-dir ## Run unit tests within the src/pkg directory
test-unit: ensure-ui-build-dir ## Run unit tests within the src/pkg and the bigbang extension directory
cd src/pkg && go test ./... -failfast -v -timeout 30m
cd src/extensions/bigbang && go test ./. -failfast -v timeout 30m

.PHONY: test-built-ui
test-built-ui: ## Run the Zarf UI E2E tests (requires `make build-ui` first)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ To try Zarf out for yourself, visit the ["Try It Now"](https://zarf.dev/install)

From the docs you can learn more about [installation](https://docs.zarf.dev/docs/operator-manual/set-up-and-install), [using the CLI](https://docs.zarf.dev/docs/user-guide/the-zarf-cli/), [making packages](https://docs.zarf.dev/docs/user-guide/zarf-packages/), and the [Zarf package schema](https://docs.zarf.dev/docs/user-guide/zarf-schema).

Using Zarf in Github workflows? Check out the [setup-zarf](https://github.com/defenseunicorns/setup-zarf)](https://github.com/defenseunicorns/setup-zarf) action. Install any version of Zarf and its `init` package with zero added dependencies.
Using Zarf in Github workflows? Check out the [setup-zarf](https://github.com/defenseunicorns/setup-zarf) action. Install any version of Zarf and its `init` package with zero added dependencies.

## Developing

Expand Down
24 changes: 24 additions & 0 deletions adr/0015-artifact-server-support.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# 15. Artifact Server Support

Date: 2023-04-05

## Status

Accepted

## Context

Zarf currently supports git servers and container registries within the airgap to host dependencies for applications, and while this works well for most production deployments, it doesn't cater as well to airgap development where you may need artifacts and libraries for various coding languages to compile and develop software. Zarf's support of `git` is also somewhat lacking in that it only supports flux `GitRepository` objects and does not support more generic use cases where clients try to reach out to upstream `git` hosts in a more native way.

## Decision

Since we already had an artifact registry available to us in Gitea, it was decided to utilize that as the default provider for this functionality in addition to matching the external support for `git` and `registry` servers with a new `artifact` server specification on `init`. From here, to access the configured server we had two main options:

1. Transform any artifact references statically (i.e. swap upstream URLs in build scripts before bringing them into the environment)
2. Transform any artifact references dynamically (i.e. swap upstream URLs in an active proxy that any build scripts could pickup through DNS)

It was decided to go with #2 since this would allow us to support a wider array of build technologies (including those that wrap existing commands like Buck/Bazel/Make) as well as support builds that may be coming from resources not brought in by Zarf. This allows for more flexibility in how Zarf could transform URLs while allowing these commands to run as they would on the internet side without any modification.

## Consequences

For now this should be an internal-only feature while we work through issues and continue to experiment with this functionality given that it may be confusing to use or have rough edges for a while. This also ties us to building specific http request matching logic for various artifact technologies which currently is done first via User Agent, then by parsing the URL to look for the artifact protocol specific path information. While this works, it must be created per artifact technology and right now only supports git (http), pip, npm, and generic repositories and registries in Gitea and Gitlab.
10 changes: 5 additions & 5 deletions docs/0-zarf-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Zarf can pull from various places like Docker Hub, Iron Bank, GitHub, and local

### (1) Create a Package

This part of the process requires access to the internet. The `zarf` binary is presented with a `zarf.yaml`, it then begins downloading, packing, and compressing the software that you requested. It then outputs a single, ready-to-move distributable called "a package".
This part of the process requires access to the internet. The `zarf` binary is presented with a `zarf.yaml`, it then begins downloading, packing, and compressing the software that you requested. It then outputs a single, ready-to-move distributable called "a package".

For additional information, see the [Building a package](./13-walkthroughs/0-using-zarf-package-create.md) section.

Expand Down Expand Up @@ -162,7 +162,7 @@ This quick start requires you to already have:

- [Homebrew](https://brew.sh/) package manager installed on your machine.
- [Docker](https://www.docker.com/) installed and running on your machine.

For more install options please visit our [Getting Started page](3-getting-started.md).

</Admonition>
Expand All @@ -171,7 +171,7 @@ For more install options please visit our [Getting Started page](3-getting-start

```bash
# To install Zarf
brew tap defenseunicorns/tap brew install zarf
brew tap defenseunicorns/tap && brew install zarf

# Next, you will need a Kubernetes cluster. This example uses KIND.
brew install kind && kind delete cluster && kind create cluster
Expand Down Expand Up @@ -200,7 +200,7 @@ This quick start requires you to already have:

- [Homebrew](https://brew.sh/) package manager installed on your machine.
- [Docker](https://www.docker.com/) installed and running on your machine.

For more install options please visit our [Getting Started page](3-getting-started.md).

</Admonition>
Expand All @@ -209,7 +209,7 @@ For more install options please visit our [Getting Started page](3-getting-start

```bash
# To install Zarf
brew tap defenseunicorns/tap brew install zarf
brew tap defenseunicorns/tap && brew install zarf

# Next, you will need a Kubernetes cluster. This example uses KIND.
brew install kind && kind delete cluster && kind create cluster
Expand Down
2 changes: 1 addition & 1 deletion docs/13-walkthroughs/5-big-bang.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ The `valuesFiles` are applied from top to bottom and will apply the last value t

:::note

This extension works best with Big Bang version `1.54.0` or later. Version `1.53.0` requires manual patches to images to function correctly.
This extension requires Big Bang version `1.54.0` or later.

:::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ zarf init --git-push-password={PASSWORD} --git-push-username={USERNAME} --git-ur
## Options

```
--artifact-push-token string API Token for the push-user to access the artifact registry
--artifact-push-username string Username to access to the artifact registry Zarf is configured to use. User must be able to upload package artifacts.
--artifact-url string External artifact registry url to use for this Zarf cluster
--components string Specify which optional components to install. E.g. --components=git-server,logging
--confirm Confirm the install without prompting
--git-pull-password string Password for the pull-only user to access the git server
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ zarf tools clear-cache [flags]

```
-h, --help help for clear-cache
--zarf-cache string Specify the location of the Zarf artifact cache (images and git repositories) (default "~/.zarf-cache")
--zarf-cache string Specify the location of the Zarf artifact cache (images and git repositories) (default "~/.zarf-cache")
```

## Options inherited from parent commands
Expand Down
Loading

0 comments on commit dfe13d4

Please sign in to comment.