mirror of
https://github.com/ansible/awx-operator.git
synced 2026-03-26 21:33:14 +00:00
devel: Update development guide
- Update the development.md file - Allow builds from macos automatically - implement podman-buildx Signed-off-by: Lucas Benedito <lbenedit@redhat.com>
This commit is contained in:
committed by
Dimitri Savineau
parent
605b46d83c
commit
a47b06f937
@@ -1,8 +1,8 @@
|
||||
FROM quay.io/operator-framework/ansible-operator:v1.36.1
|
||||
|
||||
USER root
|
||||
RUN dnf update --security --bugfix -y && \
|
||||
dnf install -y openssl
|
||||
RUN dnf update --security --bugfix -y --disableplugin=subscription-manager && \
|
||||
dnf install -y --disableplugin=subscription-manager openssl
|
||||
|
||||
USER 1001
|
||||
|
||||
|
||||
4
Makefile
4
Makefile
@@ -105,6 +105,10 @@ docker-buildx: ## Build and push docker image for the manager for cross-platform
|
||||
- docker buildx build --push $(BUILD_ARGS) --platform=$(PLATFORMS) --tag ${IMG} -f Dockerfile .
|
||||
- docker buildx rm project-v3-builder
|
||||
|
||||
.PHONY: podman-buildx
|
||||
podman-buildx: ## Build and push podman image for the manager for cross-platform support
|
||||
podman build --platform=$(PLATFORMS) $(BUILD_ARGS) --manifest ${IMG} -f Dockerfile .
|
||||
podman manifest push --all ${IMG} ${IMG}
|
||||
|
||||
##@ Deployment
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Development Guide
|
||||
|
||||
There are development scripts and yaml exaples in the [`dev/`](../dev) directory that, along with the up.sh and down.sh scripts in the root of the repo, can be used to build, deploy and test changes made to the awx-operator.
|
||||
There are development scripts and yaml examples in the [`dev/`](../dev) directory that, along with the up.sh and down.sh scripts in the root of the repo, can be used to build, deploy and test changes made to the awx-operator.
|
||||
|
||||
|
||||
## Prerequisites
|
||||
|
||||
18
up.sh
18
up.sh
@@ -121,12 +121,20 @@ fi
|
||||
# -- Build & Push Operator Image
|
||||
echo "Preparing to build $IMG:$TAG ($IMG:$DEV_TAG) with $ENGINE..."
|
||||
sleep 3
|
||||
make docker-build docker-push IMG=$IMG:$TAG
|
||||
|
||||
# Tag and Push DEV_TAG Image when DEV_TAG_PUSH is 'True'
|
||||
if $DEV_TAG_PUSH ; then
|
||||
$ENGINE tag $IMG:$TAG $IMG:$DEV_TAG
|
||||
make docker-push IMG=$IMG:$DEV_TAG
|
||||
# Detect architecture and use multi-arch build for ARM hosts
|
||||
HOST_ARCH=$(uname -m)
|
||||
if [[ "$HOST_ARCH" == "aarch64" || "$HOST_ARCH" == "arm64" ]] && [ "$ENGINE" = "podman" ]; then
|
||||
echo "ARM architecture detected ($HOST_ARCH). Using multi-arch build..."
|
||||
make podman-buildx IMG=$IMG:$TAG ENGINE=$ENGINE
|
||||
else
|
||||
make docker-build docker-push IMG=$IMG:$TAG
|
||||
|
||||
# Tag and Push DEV_TAG Image when DEV_TAG_PUSH is 'True'
|
||||
if $DEV_TAG_PUSH ; then
|
||||
$ENGINE tag $IMG:$TAG $IMG:$DEV_TAG
|
||||
make docker-push IMG=$IMG:$DEV_TAG
|
||||
fi
|
||||
fi
|
||||
|
||||
# -- Deploy Operator
|
||||
|
||||
Reference in New Issue
Block a user