-
Notifications
You must be signed in to change notification settings - Fork 25
[VC-45081] Automate the release process for cyberark-disco-agent #725
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,10 +10,11 @@ The release process is semi-automated. | |
| > [!NOTE] | ||
| > | ||
| > Upon pushing the tag, a GitHub Action will do the following: | ||
| > - Build and publish the container image at `quay.io/jetstack/venafi-agent`, | ||
| > - Build and publish the Helm chart at `oci://quay.io/jetstack/charts/venafi-kubernetes-agent`, | ||
| > - Build and publish the container image: `quay.io/jetstack/venafi-agent`, | ||
| > - Build and publish the Helm chart: `oci://quay.io/jetstack/charts/venafi-kubernetes-agent`, | ||
| > - Build and publish the container image: `quay.io/jetstack/cyberark-disco-agent`, | ||
| > - Build and publish the Helm chart: `oci://quay.io/jetstack/charts/cyberark-disco-agent`, | ||
| > - Create a draft GitHub release, | ||
| > - Upload the Helm chart tarball to the GitHub release. | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was changed some time after the 1.4.0 release. Newer releases push the helm chart directly to quay.io |
||
|
|
||
| 1. Upgrade the Go dependencies. | ||
|
|
||
|
|
@@ -71,18 +72,20 @@ The release process is semi-automated. | |
|
|
||
| For context, the new tag will create the following images: | ||
|
|
||
| | Image | Automation | | ||
| | --------------------------------------------------------- | -------------------------------------------------------------------------------------------- | | ||
| | Image | Automation | | ||
| |-----------------------------------------------------------|----------------------------------------------------------------------------------------------| | ||
| | `quay.io/jetstack/venafi-agent` | Automatically built by the [release action](.github/workflows/release.yml) on Git tag pushes | | ||
| | `quay.io/jetstack/cyberark-disco-agent` | Automatically built by the [release action](.github/workflows/release.yml) on Git tag pushes | | ||
| | `registry.venafi.cloud/venafi-agent/venafi-agent` | Automatically mirrored by Harbor Replication rule | | ||
| | `private-registry.venafi.cloud/venafi-agent/venafi-agent` | Automatically mirrored by Harbor Replication rule | | ||
| | `private-registry.venafi.eu/venafi-agent/venafi-agent` | Automatically mirrored by Harbor Replication rule | | ||
|
|
||
| and the following OCI Helm charts: | ||
|
|
||
| | Helm Chart | Automation | | ||
| | -------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | | ||
| |----------------------------------------------------------------------|----------------------------------------------------------------------------------------------| | ||
| | `oci://quay.io/jetstack/charts/venafi-kubernetes-agent` | Automatically built by the [release action](.github/workflows/release.yml) on Git tag pushes | | ||
| | `oci://quay.io/jetstack/charts/cyberark-disco-agent` | Automatically built by the [release action](.github/workflows/release.yml) on Git tag pushes | | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why do we push to quay.io? Eventually, customers will be pulling from so why not push to Harbor directly?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't have permission, do I?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And also for consistency with the existing agent release process. I can change the release process in future to push all artifacts direct to harbor, if that is possible. |
||
| | `oci://registry.venafi.cloud/charts/venafi-kubernetes-agent` | Automatically mirrored by Harbor Replication rule | | ||
| | `oci://private-registry.venafi.cloud/charts/venafi-kubernetes-agent` | Automatically mirrored by Harbor Replication rule | | ||
| | `oci://private-registry.venafi.eu/charts/venafi-kubernetes-agent` | Automatically mirrored by Harbor Replication rule | | ||
|
|
@@ -118,3 +121,7 @@ v1.1.0 (Git tag in the jetstack-secure repo) | |
| ### Step 2: Test the Helm chart "venafi-kubernetes-agent" with venctl connect | ||
|
|
||
| NOTE(mael): TBD | ||
|
|
||
| ### Step 3: Test the Helm chart "cyberark-disco-agent" | ||
|
|
||
| NOTE(wallrj): TBD | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,8 +6,6 @@ repo_name := github.com/jetstack/jetstack-secure | |
| # third-party modules. | ||
| generate-golangci-lint-config: repo_name := github.com/jetstack/preflight | ||
|
|
||
| OCI_BASE ?= # default to an empty value to avoid warnings | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was only used by the |
||
|
|
||
| license_ignore := gitlab.com/venafi,github.com/jetstack | ||
|
|
||
| kind_cluster_name := preflight | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,31 +1,38 @@ | ||
| # Makefile targets for CyberArk Discovery and Context | ||
|
|
||
| # The base OCI repository for all CyberArk Discovery and Context artifacts | ||
| ARK_OCI_BASE ?= quay.io/jetstack | ||
|
|
||
| # The OCI repository (without tag) for the CyberArk Discovery and Context Agent Docker image | ||
| # Can be overridden when calling `make ark-release` to push to a different repository. | ||
| ARK_IMAGE ?= $(ARK_OCI_BASE)/cyberark-disco-agent | ||
|
|
||
| # The OCI repository (without tag) for the CyberArk Discovery and Context Helm chart | ||
| # Can be overridden when calling `make ark-release` to push to a different repository. | ||
| ARK_CHART ?= $(ARK_OCI_BASE)/charts/cyberark-disco-agent | ||
|
|
||
| # Used to output variables when running in GitHub Actions | ||
| GITHUB_OUTPUT ?= /dev/stderr | ||
|
|
||
| .PHONY: ark-release | ||
| ## Publish all release artifacts (image + helm chart) | ||
| ## @category CyberArk Discovery and Context | ||
| ark-release: oci_ark_image_name := $(OCI_BASE)/images/cyberark-disco-agent | ||
| ark-release: OCI_SIGN_ON_PUSH := false | ||
| ark-release: oci_platforms := linux/amd64 | ||
| ark-release: helm_chart_source_dir := deploy/charts/cyberark-disco-agent | ||
| ark-release: helm_chart_image_name := $(OCI_BASE)/charts/cyberark-disco-agent | ||
| ark-release: helm_chart_version := $(helm_chart_version) | ||
| ark-release: oci_ark_image_digest_path := $(bin_dir)/scratch/image/oci-layout-ark.digests | ||
| ark-release: helm_digest_path := $(bin_dir)/scratch/helm/cyberark-disco-agent-$(helm_chart_version).digests | ||
| ark-release: | ||
| $(MAKE) oci-push-ark helm-chart-oci-push \ | ||
| oci_ark_image_name="$(oci_ark_image_name)" \ | ||
| OCI_SIGN_ON_PUSH="$(OCI_SIGN_ON_PUSH)" \ | ||
| oci_platforms="$(oci_platforms)" \ | ||
| helm_image_name="$(oci_ark_image_name)" \ | ||
| oci_ark_image_name="$(ARK_IMAGE)" \ | ||
| helm_image_name="$(ARK_IMAGE)" \ | ||
| helm_image_tag="$(oci_ark_image_tag)" \ | ||
| helm_chart_source_dir="$(helm_chart_source_dir)" \ | ||
| helm_chart_image_name="$(helm_chart_image_name)" | ||
| helm_chart_source_dir=deploy/charts/cyberark-disco-agent \ | ||
| helm_chart_image_name="$(ARK_CHART)" | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TBH I don't know whether these variables should be set as target specific variables or as sub-make variables in the rule or both....these |
||
|
|
||
| @echo "RELEASE_OCI_IMAGE=$(oci_ark_image_name)" >> "$(GITHUB_OUTPUT)" | ||
| @echo "RELEASE_OCI_IMAGE_TAG=$(oci_ark_image_tag)" >> "$(GITHUB_OUTPUT)" | ||
| @echo "RELEASE_OCI_IMAGE_DIGEST=$$(head -1 $(oci_ark_image_digest_path))" >> "$(GITHUB_OUTPUT)" | ||
| @echo "RELEASE_OCI_CHART=$(helm_chart_image_name)" >> "$(GITHUB_OUTPUT)" | ||
| @echo "RELEASE_OCI_CHART_TAG=$(helm_chart_version)" >> "$(GITHUB_OUTPUT)" | ||
| @echo "RELEASE_OCI_CHART_DIGEST=$$(head -1 $(helm_digest_path))" >> "$(GITHUB_OUTPUT)" | ||
| @echo "ARK_IMAGE=$(ARK_IMAGE)" >> "$(GITHUB_OUTPUT)" | ||
| @echo "ARK_IMAGE_TAG=$(oci_ark_image_tag)" >> "$(GITHUB_OUTPUT)" | ||
| @echo "ARK_IMAGE_DIGEST=$$(head -1 $(oci_ark_image_digest_path))" >> "$(GITHUB_OUTPUT)" | ||
| @echo "ARK_CHART=$(ARK_CHART)" >> "$(GITHUB_OUTPUT)" | ||
| @echo "ARK_CHART_TAG=$(helm_chart_version)" >> "$(GITHUB_OUTPUT)" | ||
| @echo "ARK_CHART_DIGEST=$$(head -1 $(helm_digest_path))" >> "$(GITHUB_OUTPUT)" | ||
|
|
||
| @echo "Release complete!" | ||
|
|
||
|
|
@@ -40,11 +47,11 @@ ark-test-e2e: $(NEEDS_KIND) $(NEEDS_KUBECTL) $(NEEDS_HELM) | |
| ## Verify the Helm chart | ||
| ## @category CyberArk Discovery and Context | ||
| ark-verify: | ||
| $(MAKE) verify-helm-lint verify-helm-values verify-pod-security-standards verify-helm-kubeconform\ | ||
| $(MAKE) verify-helm-lint verify-helm-values verify-pod-security-standards verify-helm-kubeconform \ | ||
| helm_chart_source_dir=deploy/charts/cyberark-disco-agent \ | ||
| helm_chart_image_name=$(OCI_BASE)/charts/cyberark-disco-agent | ||
| helm_chart_image_name=$(ARK_CHART) | ||
|
|
||
| shared_verify_targets_dirty += ark-verify | ||
| shared_verify_targets += ark-verify | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tim explained what |
||
|
|
||
| .PHONY: ark-generate | ||
| ## Generate Helm chart documentation and schema | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test release: