Skip to content

Commit

Permalink
Remove unused release-crd target
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-innis committed Feb 24, 2024
1 parent 3c4b0bf commit 47dd4bf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 27 deletions.
5 changes: 1 addition & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,6 @@ snapshot: ## Builds and publishes snapshot release
release: ## Builds and publishes stable release
$(WITH_GOFLAGS) ./hack/release/release.sh

release-crd: ## Packages and publishes a karpenter-crd helm chart
$(WITH_GOFLAGS) ./hack/release/release-crd.sh

prepare-website: ## prepare the website for release
./hack/release/prepare-website.sh

Expand All @@ -186,7 +183,7 @@ update-karpenter: ## Update kubernetes-sigs/karpenter to latest
go get -u sigs.k8s.io/karpenter@HEAD
go mod tidy

.PHONY: help presubmit ci-test ci-non-test run test deflake e2etests e2etests-deflake benchmark coverage verify vulncheck licenses image apply install delete docgen codegen stable-release-pr snapshot release release-crd prepare-website toolchain issues website tidy download update-karpenter
.PHONY: help presubmit ci-test ci-non-test run test deflake e2etests e2etests-deflake benchmark coverage verify vulncheck licenses image apply install delete docgen codegen stable-release-pr snapshot release prepare-website toolchain issues website tidy download update-karpenter

define newline

Expand Down
13 changes: 7 additions & 6 deletions hack/release/common.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
#!/usr/bin/env bash
set -euo pipefail

GITHUB_ACCOUNT="aws"
ECR_GALLERY_NAME="karpenter"
RELEASE_REPO_ECR="${RELEASE_REPO_ECR:-public.ecr.aws/${ECR_GALLERY_NAME}/}"
RELEASE_REPO_GH="${RELEASE_REPO_GH:-ghcr.io/${GITHUB_ACCOUNT}/karpenter}"

SNAPSHOT_ECR="021119463062.dkr.ecr.us-east-1.amazonaws.com"
SNAPSHOT_REPO_ECR="${SNAPSHOT_REPO_ECR:-${SNAPSHOT_ECR}/karpenter/snapshot/}"

CURRENT_MAJOR_VERSION="0"

MAIN_GITHUB_ACCOUNT="aws"

snapshot() {
local commit_sha version helm_chart_version

Expand All @@ -26,6 +22,7 @@ Commit: ${commit_sha}
Helm Chart Version ${helm_chart_version}"

authenticatePrivateRepo
echo "authenticated, now building"
build "${SNAPSHOT_REPO_ECR}" "${version}" "${helm_chart_version}" "${commit_sha}"
}

Expand Down Expand Up @@ -61,9 +58,12 @@ build() {
helm_chart_version="${3}"
commit_sha="${4}"

echo "calculating the date epoch"
date_epoch="$(dateEpoch)"
echo "getting the build date"
build_date="$(buildDate "${date_epoch}")"

echo "GOFLAGS=${GOFLAGS:-} SOURCE_DATE_EPOCH=${date_epoch} KO_DATA_DATE_EPOCH=${date_epoch} KO_DOCKER_REPO=${oci_repo} ko publish -B -t ${version} ./cmd/controller"
img="$(GOFLAGS=${GOFLAGS:-} SOURCE_DATE_EPOCH="${date_epoch}" KO_DATA_DATE_EPOCH="${date_epoch}" KO_DOCKER_REPO="${oci_repo}" ko publish -B -t "${version}" ./cmd/controller)"
img_repo="$(echo "${img}" | cut -d "@" -f 1 | cut -d ":" -f 1)"
img_tag="$(echo "${img}" | cut -d "@" -f 1 | cut -d ":" -f 2 -s)"
Expand Down Expand Up @@ -104,7 +104,7 @@ publishHelmChart() {
cd ..

helm_chart_digest="$(crane digest "${oci_repo}/${helm_chart}:${version}")"
cosignOciArtifact "${version}" "${commit_sha}" "${build_date}" "${oci_repo}/${helm_chart}:${version}@${helm_chart_digest}"
cosignOciArtifact "${version}" "${commit_sha}" "${build_date}" "${oci_repo}${helm_chart}:${version}@${helm_chart_digest}"
}

cosignOciArtifact() {
Expand All @@ -127,7 +127,8 @@ buildDate() {

date_epoch="${1}"

date -u -r "${date_epoch}" "+%Y-%m-%dT%H:%M:%SZ" 2>/dev/null
echo "got the date_epoch: ${date_epoch}"
date -u --date="@${date_epoch}" "+%Y-%m-%dT%H:%M:%SZ" 2>/dev/null
}

prepareWebsite() {
Expand Down
17 changes: 0 additions & 17 deletions hack/release/release-crd.sh

This file was deleted.

0 comments on commit 47dd4bf

Please sign in to comment.