mirror of
https://github.com/kyverno/kyverno.git
synced 2025-04-18 02:06:52 +00:00
adding check for digest and update git command
Signed-off-by: Naman Lakhwani <namanlakhwani@gmail.com>
This commit is contained in:
parent
6b5bcfcc42
commit
985e2cc158
3 changed files with 15 additions and 8 deletions
6
.github/workflows/image.yaml
vendored
6
.github/workflows/image.yaml
vendored
|
@ -15,7 +15,7 @@ jobs:
|
|||
uses: kyverno/kyverno/.github/workflows/reuse.yaml@main
|
||||
with:
|
||||
publish_command: docker-publish-initContainer
|
||||
digest_command: docker-get-initContainer-dev-digest
|
||||
digest_command: docker-get-initContainer-digest
|
||||
image_name: kyvernopre
|
||||
tag: image
|
||||
secrets:
|
||||
|
@ -26,7 +26,7 @@ jobs:
|
|||
uses: kyverno/kyverno/.github/workflows/reuse.yaml@main
|
||||
with:
|
||||
publish_command: docker-publish-kyverno
|
||||
digest_command: docker-get-kyverno-dev-digest
|
||||
digest_command: docker-get-kyverno-digest
|
||||
image_name: kyverno
|
||||
tag: image
|
||||
secrets:
|
||||
|
@ -37,7 +37,7 @@ jobs:
|
|||
uses: kyverno/kyverno/.github/workflows/reuse.yaml@main
|
||||
with:
|
||||
publish_command: docker-publish-cli
|
||||
digest_command: docker-get-cli-dev-digest
|
||||
digest_command: docker-get-cli-digest
|
||||
image_name: kyverno-cli
|
||||
tag: image
|
||||
secrets:
|
||||
|
|
9
.github/workflows/reuse.yaml
vendored
9
.github/workflows/reuse.yaml
vendored
|
@ -130,7 +130,14 @@ jobs:
|
|||
if: ${{inputs.tag == 'release' || (inputs.tag == 'image' && steps.check-branch.outputs.match == 'true')}}
|
||||
run: make ${{inputs.publish_command}}
|
||||
|
||||
- name: get digest
|
||||
- name: get image digest
|
||||
if: ${{inputs.tag == 'image' && steps.extract_branch.outputs.branch == 'main'}}
|
||||
id: get-step
|
||||
run: |
|
||||
echo "::set-output name=digest::$(make ${{inputs.digest_command}}-dev)"
|
||||
|
||||
- name: get release-image digest
|
||||
if: ${{inputs.tag == 'release' || (inputs.tag == 'image' && steps.check-branch.outputs.match == 'true')}}
|
||||
id: get-step
|
||||
run: |
|
||||
echo "::set-output name=digest::$(make ${{inputs.digest_command}})"
|
||||
|
|
8
Makefile
8
Makefile
|
@ -3,7 +3,7 @@
|
|||
##################################
|
||||
# DEFAULTS
|
||||
##################################
|
||||
GIT_VERSION := $(shell git describe --match "v[0-9]*")
|
||||
GIT_VERSION := $(shell git tag --list --sort=-version:refname "v[0-9]*" | head -n 1)
|
||||
GIT_VERSION_DEV := $(shell git describe --match "[0-9].[0-9]-dev*")
|
||||
GIT_BRANCH := $(shell git branch | grep \* | cut -d ' ' -f2)
|
||||
GIT_HASH := $(GIT_BRANCH)/$(shell git log -1 --pretty=format:"%H")
|
||||
|
@ -89,7 +89,7 @@ docker-push-initContainer-dev: docker-buildx-builder
|
|||
@docker buildx build --file $(PWD)/$(INITC_PATH)/Dockerfile --progress plane --push --platform linux/arm64,linux/amd64,linux/s390x --tag $(REPO)/$(INITC_IMAGE):$(IMAGE_TAG_LATEST_DEV)-latest . --build-arg LD_FLAGS=$(LD_FLAGS_DEV)
|
||||
@docker buildx build --file $(PWD)/$(INITC_PATH)/Dockerfile --progress plane --push --platform linux/arm64,linux/amd64,linux/s390x --tag $(REPO)/$(INITC_IMAGE):latest . --build-arg LD_FLAGS=$(LD_FLAGS_DEV)
|
||||
|
||||
docker-get-initContainer-dev-digest:
|
||||
docker-get-initContainer-digest-dev:
|
||||
@docker buildx imagetools inspect --raw $(REPO)/$(INITC_IMAGE):$(IMAGE_TAG_DEV) | perl -pe 'chomp if eof' | openssl dgst -sha256 | sed 's/^.* //'
|
||||
##################################
|
||||
# KYVERNO CONTAINER
|
||||
|
@ -132,7 +132,7 @@ docker-push-kyverno-dev: docker-buildx-builder
|
|||
@docker buildx build --file $(PWD)/$(KYVERNO_PATH)/Dockerfile --progress plane --push --platform linux/arm64,linux/amd64,linux/s390x --tag $(REPO)/$(KYVERNO_IMAGE):$(IMAGE_TAG_LATEST_DEV)-latest . --build-arg LD_FLAGS=$(LD_FLAGS_DEV)
|
||||
@docker buildx build --file $(PWD)/$(KYVERNO_PATH)/Dockerfile --progress plane --push --platform linux/arm64,linux/amd64,linux/s390x --tag $(REPO)/$(KYVERNO_IMAGE):latest . --build-arg LD_FLAGS=$(LD_FLAGS_DEV)
|
||||
|
||||
docker-get-kyverno-dev-digest:
|
||||
docker-get-kyverno-digest-dev:
|
||||
@docker buildx imagetools inspect --raw $(REPO)/$(KYVERNO_IMAGE):$(IMAGE_TAG_DEV) | perl -pe 'chomp if eof' | openssl dgst -sha256 | sed 's/^.* //'
|
||||
##################################
|
||||
|
||||
|
@ -175,7 +175,7 @@ docker-push-cli-dev: docker-buildx-builder
|
|||
@docker buildx build --file $(PWD)/$(CLI_PATH)/Dockerfile --progress plane --push --platform linux/arm64,linux/amd64,linux/s390x --tag $(REPO)/$(KYVERNO_CLI_IMAGE):$(IMAGE_TAG_LATEST_DEV)-latest . --build-arg LD_FLAGS=$(LD_FLAGS_DEV)
|
||||
@docker buildx build --file $(PWD)/$(CLI_PATH)/Dockerfile --progress plane --push --platform linux/arm64,linux/amd64,linux/s390x --tag $(REPO)/$(KYVERNO_CLI_IMAGE):latest . --build-arg LD_FLAGS=$(LD_FLAGS_DEV)
|
||||
|
||||
docker-get-cli-dev-digest:
|
||||
docker-get-cli-digest-dev:
|
||||
@docker buildx imagetools inspect --raw $(REPO)/$(KYVERNO_CLI_IMAGE):$(IMAGE_TAG_DEV) | perl -pe 'chomp if eof' | openssl dgst -sha256 | sed 's/^.* //'
|
||||
|
||||
##################################
|
||||
|
|
Loading…
Add table
Reference in a new issue