fix imgpkg output

This commit is contained in:
Benjamin A. Petersen 2023-09-21 12:53:51 -04:00
parent 621ef9b116
commit d1e2e497eb
No known key found for this signature in database
GPG Key ID: EF6EF83523A4BE46
5 changed files with 38 additions and 10 deletions

View File

@ -30,6 +30,18 @@ echo_blue() {
# printf "${BLUE}$@${DEFAULT}"
}
# tag=$(uuidgen) # always a new tag to force K8s to reload the image on redeploy
# build_and_deploy_for_integration_tests.sh 123455
echo ""
echo ""
tag=${1} # need to manually pass this, use the same from prepare-for-integreation-tests.sh
echo_yellow "using tag: ${tag}"
echo_yellow "does this match output tag from prepare-for-integration-test.sh?"
echo ""
echo ""
sleep 3 # just to give enough time to see it for a human
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
# got a cluster?
@ -61,11 +73,7 @@ registry="pinniped.local" # Hack, but not what we really want: getpinniped/pinni
repo="test/build"
registry_repo="$registry/$repo"
# tag=$(uuidgen) # always a new tag to force K8s to reload the image on redeploy
# build_and_deploy_for_integration_tests.sh 123455
tag=${1} # need to manually pass this, use the same from prepare-for-integreation-tests.sh
echo_yellow "using tag: ${tag}"
sleep 1 # just to give enough time to see it for a human
api_group_suffix="pinniped.dev"
# END PINNIPED IMAGE, NOT PACKAGE -------------- >>>>
@ -116,8 +124,12 @@ do
# just simple templating
echo_yellow "generating ${resource_name}/.imgpkg/images.yaml"
# there are bits for image substitution in some of the ytt commands
kbld --file "${SCRIPT_DIR}/${resource_name}/config/" --imgpkg-lock-output "${SCRIPT_DIR}/${resource_name}/.imgpkg/images.yml"
# in order to run kbld to generate correct imgpkg lock files,
# we must ytt render the templates and then pass the output to kbld
ytt \
--file "${SCRIPT_DIR}/${resource_name}/config/" | \
kbld -f- --imgpkg-lock-output "${SCRIPT_DIR}/${resource_name}/.imgpkg/images.yml"
# generate a schema in each package directory
echo_yellow "generating ${SCRIPT_DIR}/${resource_name}/schema-openapi.yaml"

View File

@ -1,3 +1,11 @@
---
apiVersion: imgpkg.carvel.dev/v1alpha1
images:
- annotations:
kbld.carvel.dev/id: projects.registry.vmware.com/pinniped/pinniped-server:latest
kbld.carvel.dev/origins: |
- resolved:
tag: latest
url: projects.registry.vmware.com/pinniped/pinniped-server:latest
image: projects.registry.vmware.com/pinniped/pinniped-server@sha256:a92183de893eb0b1850cc3a1d33306b96ba2cdb72a8a49c6493a58c01b4fa9cd
kind: ImagesLock

View File

@ -7,12 +7,12 @@ images:
- resolved:
tag: 0.25.0
url: benjaminapetersen/pinniped-package-repo-package-concierge:0.25.0
image: index.docker.io/benjaminapetersen/pinniped-package-repo-package-concierge@sha256:bcf825330cf8946b4c9a7a0cc7a774748dd519c4fe1c22a076b64dc9f369c59c
image: index.docker.io/benjaminapetersen/pinniped-package-repo-package-concierge@sha256:8cfac137dcb7e3edcf0dcc9d032ff67c9d26a7ce863ead5b28bff457336ad3e0
- annotations:
kbld.carvel.dev/id: benjaminapetersen/pinniped-package-repo-package-supervisor:0.25.0
kbld.carvel.dev/origins: |
- resolved:
tag: 0.25.0
url: benjaminapetersen/pinniped-package-repo-package-supervisor:0.25.0
image: index.docker.io/benjaminapetersen/pinniped-package-repo-package-supervisor@sha256:12577787d82b4f565be28c65c229c87dd8ac9890d0f44a690725fdb4ac7f4082
image: index.docker.io/benjaminapetersen/pinniped-package-repo-package-supervisor@sha256:f59ad2eb1737f2098e1cd4957f062b0c01de9d1ab7230c58093ab16d2192e302
kind: ImagesLock

View File

@ -1,3 +1,11 @@
---
apiVersion: imgpkg.carvel.dev/v1alpha1
images:
- annotations:
kbld.carvel.dev/id: projects.registry.vmware.com/pinniped/pinniped-server:latest
kbld.carvel.dev/origins: |
- resolved:
tag: latest
url: projects.registry.vmware.com/pinniped/pinniped-server:latest
image: projects.registry.vmware.com/pinniped/pinniped-server@sha256:a92183de893eb0b1850cc3a1d33306b96ba2cdb72a8a49c6493a58c01b4fa9cd
kind: ImagesLock

View File

@ -27,7 +27,7 @@ stringData:
namespace: supervisor
api_group_suffix: pinniped.dev
image_repo: pinniped.local/test/build
image_tag: 24753D27-6217-4E65-B508-71CB1DAF70D3
image_tag: 160E1A5F-409E-431A-9CFC-53825C6978C7
log_level: debug
service_https_nodeport_port: 443