mirror of
https://github.com/ansible/awx-operator.git
synced 2026-05-08 14:22:49 +00:00
Add script to generate files after crd.yml.j2 changes
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
## This script will build 3 images awx-{operator,bundle,catalog}
|
## This script will generate a bundle manifest, build 3 images awx-{operator,bundle,catalog}
|
||||||
## and push to the $REGISTRY specified.
|
## and push to the $REGISTRY specified.
|
||||||
##
|
##
|
||||||
## The goal is provide an quick way to build a test image.
|
## The goal is provide an quick way to build a test image.
|
||||||
@@ -78,6 +78,7 @@ build_operator_image() {
|
|||||||
|
|
||||||
build_bundle_image() {
|
build_bundle_image() {
|
||||||
echo "Building and pushing $BUNDLE_IMAGE image"
|
echo "Building and pushing $BUNDLE_IMAGE image"
|
||||||
|
operator-sdk generate bundle --operator-name awx-operator --version $TAG
|
||||||
$POD_MANAGER build . -f bundle.Dockerfile -t $REGISTRY/$BUNDLE_IMAGE:$TAG
|
$POD_MANAGER build . -f bundle.Dockerfile -t $REGISTRY/$BUNDLE_IMAGE:$TAG
|
||||||
$POD_MANAGER push $REGISTRY/$BUNDLE_IMAGE:$TAG
|
$POD_MANAGER push $REGISTRY/$BUNDLE_IMAGE:$TAG
|
||||||
}
|
}
|
||||||
|
|||||||
17
scripts/generate-files.sh
Executable file
17
scripts/generate-files.sh
Executable file
@@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
## This script will auto-generate the templated files and bundle files
|
||||||
|
## after changes to CRD template files. Please use this instead of manually
|
||||||
|
## updating the managed yaml files.
|
||||||
|
##
|
||||||
|
## Example:
|
||||||
|
## TAG=0.10.0 ./generate-files.sh
|
||||||
|
|
||||||
|
TAG=${TAG:-''}
|
||||||
|
if [[ -z "$TAG" ]]; then
|
||||||
|
echo "Set your \$TAG variable to your registry server."
|
||||||
|
echo "export TAG=mytag"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
ansible-playbook ansible/chain-operator-files.yml
|
||||||
|
operator-sdk generate bundle --operator-name awx-operator --version $TAG
|
||||||
Reference in New Issue
Block a user