diff --git a/.github/tests/ee_builder/ee_builder.yml b/.github/tests/ee_builder/ee_builder.yml deleted file mode 100644 index 31571ad..0000000 --- a/.github/tests/ee_builder/ee_builder.yml +++ /dev/null @@ -1,31 +0,0 @@ ---- -- name: Playbook to configure ansible controller organizations - hosts: localhost - gather_facts: false - collections: - - sean_m_sullivan.tower_utilities - - containers.podman - vars: - # builder_dir: /tmp - ee_registry_dest: quay.io/ssulliva/ee_tools - ee_base_image: quay.io/ssulliva/ee_tools # quay.io/podman/stable - ee_name: ee_tools - ee_bindep: - - python3 - - python3-pip - ee_python: - - podman - - ansible-core - - ansible-runner - - ansible-lint - - ansible-builder - ee_collections: - - name: sean_m_sullivan.ee_utilities - - name: containers.podman - ee_append: - - RUN pip3 install ansible-core - - VOLUME /var/lib/docker - - VOLUME /runner - roles: - - infra.ee_utilities.ee_builder -... diff --git a/.github/tests/ee_builder/ee_builder_base.yml b/.github/tests/ee_builder/ee_builder_base.yml deleted file mode 100644 index 2c0ba0f..0000000 --- a/.github/tests/ee_builder/ee_builder_base.yml +++ /dev/null @@ -1,38 +0,0 @@ ---- -- name: Playbook to configure ansible controller organizations - hosts: localhost - gather_facts: false - collections: - - sean_m_sullivan.tower_utilities - - containers.podman - vars: - # builder_dir: /tmp - ee_registry_dest: quay.io/ssulliva/ee_tools - ee_name: ee_tools - ee_bindep: - - crun - ee_python: - - podman - - ansible-core - - ansible-runner - - ansible-lint - - ansible-builder - ee_collections: - - name: awx.awx - - name: sean_m_sullivan.tower_utilities - version: 0.3.2-develh - - name: containers.podman - ee_append: - - RUN useradd build; dnf -y module enable container-tools:rhel8; dnf -y update; dnf -y reinstall shadow-utils; dnf -y install podman fuse-overlayfs /etc/containers/storage.conf; rm -rf /var/cache /var/log/dnf* /var/log/yum.* - - RUN useradd podman; echo podman:10000:5000 > /etc/subuid; echo podman:10000:5000 > /etc/subgid; - - RUN chown podman:podman -R /home/podman - - ADD https://raw.githubusercontent.com/containers/libpod/master/contrib/podmanimage/stable/containers.conf /etc/containers/containers.conf - - ADD https://raw.githubusercontent.com/containers/libpod/master/contrib/podmanimage/stable/podman-containers.conf /home/podman/.config/containers/containers.conf - - RUN chown podman:podman -R /home/podman - - RUN sed -i -e 's|^#mount_program|mount_program|g' -e '/additionalimage.*/a "/var/lib/shared",' /etc/containers/storage.conf - - RUN mkdir -p /var/lib/shared/overlay-images /var/lib/shared/overlay-layers; touch /var/lib/shared/overlay-images/images.lock; touch /var/lib/shared/overlay-layers/layers.lock - - RUN sed -i -e '/^cgroup_manager.*/d' -e '/\#\ cgroup_manager\ =/a cgroup_manager = "cgroupfs"' /usr/share/containers/containers.conf - - ENV _BUILDAH_STARTED_IN_USERNS="" BUILDAH_ISOLATION=chroot - roles: - - infra.ee_utilities.ee_builder -... diff --git a/.github/workflows/ci_testing.yaml b/.github/workflows/ci_testing.yaml index 0625b77..f3cd889 100644 --- a/.github/workflows/ci_testing.yaml +++ b/.github/workflows/ci_testing.yaml @@ -1,6 +1,8 @@ --- name: Run Test of EE utilities -on: [push, pull_request] +on: + push: + pull_request: jobs: Integration-test: diff --git a/.gitignore b/.gitignore index 17bae38..60455cf 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,5 @@ collections/* # Ignore test directory test + +galaxy.yml diff --git a/roles/ee_builder/README.md b/roles/ee_builder/README.md index 5a61d65..fcf19d5 100644 --- a/roles/ee_builder/README.md +++ b/roles/ee_builder/README.md @@ -51,7 +51,7 @@ Best practice is to use the default images, unless needing to pull from another |`ee_container_policy`||no|str|The container image validation policy to use with podman. Can be one of 'ignore_all', 'system','signature_required'.|ignore_all| |`ee_verbosity`|0|no|int|Options Increase the output verbosity, can be from 0-3.|| |`ee_prune_images`|true|no|bool|To enable or disable pruning the images after building.|| -|`ee_stream`|upstream unless ee_base_registry_username is defined then downstream|no|str|What stream to pull images from either upstream or downstream.|| +|`ee_stream`|upstream unless ee_base_registry_username is defined then downstream|no|str|What stream to pull images from either upstream or downstream. Also changes package manager used for downstream to microdnf to avoid errors.|| |`ee_update_base_images`|false|no|bool|Whether to pull down images, this forces an update to avoid stale images.|| |`ee_base_image`|registry.redhat.io/ansible-automation-platform-24/ee-minimal-rhel9:latest|no|str|Build arg specifies parent image for the execution environment. Use the images option to override this for an individual list item.|| |`ee_base_registry_username`|ee_registry_username|no|str|Username to use when authenticating to base registries. If neither ee or base registry provided will be omitted.|| diff --git a/roles/ee_builder/defaults/main.yml b/roles/ee_builder/defaults/main.yml index 91d137f..25b16dd 100644 --- a/roles/ee_builder/defaults/main.yml +++ b/roles/ee_builder/defaults/main.yml @@ -18,8 +18,7 @@ ansible_cfg_file: ansible.cfg ee_list: [] # Major section Options -ee_build_options: - package_manager_path: /usr/bin/microdnf # This is set because the default images and redhat images require microdnf +ee_build_options: "{{ __ee_dnf_fix[ee_stream] }}" ee_build_arg_defaults: ANSIBLE_GALAXY_CLI_COLLECTION_OPTS: '-vv' diff --git a/roles/ee_builder/vars/main.yml b/roles/ee_builder/vars/main.yml index 2d96bcf..d4c438e 100644 --- a/roles/ee_builder/vars/main.yml +++ b/roles/ee_builder/vars/main.yml @@ -5,4 +5,9 @@ __ee_stream_images: base_image: quay.io/ansible/ansible-runner:latest downstream: base_image: registry.redhat.io/ansible-automation-platform-24/ee-minimal-rhel9:latest + +__ee_dnf_fix: + upstream: {} + downstream: + package_manager_path: /usr/bin/microdnf # This is set because the default images and redhat images require microdnf ...