From b8b3e03385bd00a56aec7f23a092a03f3d2a750e Mon Sep 17 00:00:00 2001 From: Fabian von Feilitzsch Date: Tue, 21 Sep 2021 13:02:35 -0400 Subject: [PATCH 01/12] Allow publishing of Ansible 2.9 and 2.11 images Related to https://github.com/operator-framework/operator-sdk/issues/5115 This PR introduces the Dockerfile and infrastructure to build Ansible 2.9 and Ansible 2.11 images side by side. This commit does not integrate these changes into CI, and therefore will need to be mered alongside a follow-up PR to intetgrate with GitHub actions. Co-authored-by: Austin Macdonald Co-authored-by: Fabian von Feilitzsch Signed-off-by: austin --- .github/workflows/deploy-manual.yml | 8 +- .github/workflows/deploy.yml | 2 + Makefile | 3 +- images/ansible-operator/2.11/Dockerfile | 38 ++ images/ansible-operator/2.11/Pipfile | 21 + images/ansible-operator/2.11/Pipfile.lock | 537 ++++++++++++++++++ images/ansible-operator/{ => 2.9}/Dockerfile | 0 images/ansible-operator/{ => 2.9}/Pipfile | 0 .../ansible-operator/{ => 2.9}/Pipfile.lock | 0 images/ansible-operator/base.Dockerfile | 6 +- 10 files changed, 610 insertions(+), 5 deletions(-) create mode 100644 images/ansible-operator/2.11/Dockerfile create mode 100644 images/ansible-operator/2.11/Pipfile create mode 100644 images/ansible-operator/2.11/Pipfile.lock rename images/ansible-operator/{ => 2.9}/Dockerfile (100%) rename images/ansible-operator/{ => 2.9}/Pipfile (100%) rename images/ansible-operator/{ => 2.9}/Pipfile.lock (100%) diff --git a/.github/workflows/deploy-manual.yml b/.github/workflows/deploy-manual.yml index 2ad3e85ed1c..781b49caf67 100644 --- a/.github/workflows/deploy-manual.yml +++ b/.github/workflows/deploy-manual.yml @@ -32,10 +32,12 @@ jobs: with: fetch-depth: 1 - - name: create tag + # TODO(asmacdo) add 2.11-preview-base + - name: create 2.9-base tag id: tag run: | set -e + # TODO(asmacdo) IMG=quay.io/${{ github.repository_owner }}/ansible-operator-base TAG="${{ github.event.inputs.ansible_operator_base_tag }}" GIT_COMMIT=$(git rev-parse HEAD) @@ -58,7 +60,8 @@ jobs: # This change will be staged and committed in the PR pushed below. # The script below will fail if no change was made. - - name: update ansible-operator base + # TODO(asmacdo) add base of 2.11-preview + - name: update base of ansible-operator id: update run: | set -ex @@ -67,6 +70,7 @@ jobs: REF="${{ github.event.ref }}" echo ::set-output name=branch_name::"${REF##*/}" + # TODO(asmacdo) add base of 2.11-preview - name: create PR uses: peter-evans/create-pull-request@v3 with: diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9b16f067ae1..a433d014a02 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -98,6 +98,8 @@ jobs: - name: create tags id: tags run: | + # TODO(asmacdo) github.repository_owner is wrong. This should be a quay account, `operator-framework` happens to be the same in + # gh and quay. IMG=quay.io/${{ github.repository_owner }}/${{ matrix.id }} echo ::set-output name=tags::$(.github/workflows/get_image_tags.sh "$IMG" "v") diff --git a/Makefile b/Makefile index 8f775ef51d2..89204fa18b5 100644 --- a/Makefile +++ b/Makefile @@ -82,7 +82,8 @@ build/scorecard-test build/scorecard-test-kuttl build/custom-scorecard-tests: # Convenience wrapper for building all remotely hosted images. .PHONY: image-build -IMAGE_TARGET_LIST = operator-sdk helm-operator ansible-operator scorecard-test scorecard-test-kuttl +# TODO(asmacdo) add 2.11-preview +IMAGE_TARGET_LIST = operator-sdk helm-operator ansible-operator/2.9 Oscorecard-test scorecard-test-kuttl image-build: $(foreach i,$(IMAGE_TARGET_LIST),image/$(i)) ## Build all images. # Build an image. diff --git a/images/ansible-operator/2.11/Dockerfile b/images/ansible-operator/2.11/Dockerfile new file mode 100644 index 00000000000..a292992cf00 --- /dev/null +++ b/images/ansible-operator/2.11/Dockerfile @@ -0,0 +1,38 @@ +# Build the manager binary +FROM --platform=$BUILDPLATFORM golang:1.16 as builder +ARG TARGETARCH + +WORKDIR /workspace +# Copy the Go Modules manifests +COPY go.mod go.mod +COPY go.sum go.sum +# cache deps before building and copying source so that we don't need to re-download as much +# and so that source changes don't invalidate our downloaded layer +RUN go mod download + +# Copy the go source +COPY . . + +# Build +RUN GOOS=linux GOARCH=$TARGETARCH make build/ansible-operator + +# Final image. +# TODO(asmacdo) update GH action to set this +FROM quay.io/operator-framework/ansible-operator-2.11-preview-base:master-bc8aedd752afff8aed00e62901d69e737d3e370e + +ENV HOME=/opt/ansible \ + USER_NAME=ansible \ + USER_UID=1001 + +# Ensure directory permissions are properly set +RUN echo "${USER_NAME}:x:${USER_UID}:0:${USER_NAME} user:${HOME}:/sbin/nologin" >> /etc/passwd \ + && mkdir -p ${HOME}/.ansible/tmp \ + && chown -R ${USER_UID}:0 ${HOME} \ + && chmod -R ug+rwx ${HOME} + +WORKDIR ${HOME} +USER ${USER_UID} + +COPY --from=builder /workspace/build/ansible-operator /usr/local/bin/ansible-operator + +ENTRYPOINT ["/tini", "--", "/usr/local/bin/ansible-operator", "run", "--watches-file=./watches.yaml"] diff --git a/images/ansible-operator/2.11/Pipfile b/images/ansible-operator/2.11/Pipfile new file mode 100644 index 00000000000..3ffeb51c210 --- /dev/null +++ b/images/ansible-operator/2.11/Pipfile @@ -0,0 +1,21 @@ +[[source]] +url = "https://pypi.org/simple" +verify_ssl = true +name = "pypi" + +[packages] +ansible-runner = "~=1.4.7" +ansible-runner-http = "==1.0.0" +ipaddress = "==1.0.23" +openshift = "~=0.12.0" +jmespath = "==0.10.0" +# cryptography needs to be pinned to 3.3.2 as this is the last version +# before its setup requires rust, which is not available via RPM in the +# base image. This pin should be re-evaluated once the base image is updated. +cryptography = "==3.3.2" +ansible-core = "~=2.11.0" + +[dev-packages] + +[requires] +python_version = "3.8" diff --git a/images/ansible-operator/2.11/Pipfile.lock b/images/ansible-operator/2.11/Pipfile.lock new file mode 100644 index 00000000000..c9fe3af4b30 --- /dev/null +++ b/images/ansible-operator/2.11/Pipfile.lock @@ -0,0 +1,537 @@ +{ + "_meta": { + "hash": { + "sha256": "0fbb8da0cdd076d2a7cd8cbba72198fcac29c8ab2b97fdc2e84ec174fec8cff3" + }, + "pipfile-spec": 6, + "requires": { + "python_version": "3.8" + }, + "sources": [ + { + "name": "pypi", + "url": "https://pypi.org/simple", + "verify_ssl": true + } + ] + }, + "default": { + "ansible-core": { + "hashes": [ + "sha256:7d3ce47014122907454704363485e48513f8ad0f00138b88870eb6d88953d121" + ], + "index": "pypi", + "version": "==2.11.5" + }, + "ansible-runner": { + "hashes": [ + "sha256:1bb56f9061c3238d89ec8871bc842f5b8d0e868f892347e8455c98d5b6fa58a1", + "sha256:2959940ae0a6f2a8828ec34f1f8ed56244b11614f841a7dc8fe12faea12036f7" + ], + "index": "pypi", + "version": "==1.4.7" + }, + "ansible-runner-http": { + "hashes": [ + "sha256:97da445b7d5c6663b0cceaf6bd5e9b0b0dff9a4c36eae43c8c916c6208aee915", + "sha256:e2f34880531d4088a5e04967fd5eae602eb400cc4eb541b22c8c6853e342587f" + ], + "index": "pypi", + "version": "==1.0.0" + }, + "cachetools": { + "hashes": [ + "sha256:89ea6f1b638d5a73a4f9226be57ac5e4f399d22770b92355f92dcb0f7f001693", + "sha256:92971d3cb7d2a97efff7c7bb1657f21a8f5fb309a37530537c71b1774189f2d1" + ], + "markers": "python_version ~= '3.5'", + "version": "==4.2.4" + }, + "certifi": { + "hashes": [ + "sha256:2bbf76fd432960138b3ef6dda3dde0544f27cbf8546c458e60baf371917ba9ee", + "sha256:50b1e4f8446b06f41be7dd6338db18e0990601dce795c2b1686458aa7e8fa7d8" + ], + "version": "==2021.5.30" + }, + "cffi": { + "hashes": [ + "sha256:06c54a68935738d206570b20da5ef2b6b6d92b38ef3ec45c5422c0ebaf338d4d", + "sha256:0c0591bee64e438883b0c92a7bed78f6290d40bf02e54c5bf0978eaf36061771", + "sha256:19ca0dbdeda3b2615421d54bef8985f72af6e0c47082a8d26122adac81a95872", + "sha256:22b9c3c320171c108e903d61a3723b51e37aaa8c81255b5e7ce102775bd01e2c", + "sha256:26bb2549b72708c833f5abe62b756176022a7b9a7f689b571e74c8478ead51dc", + "sha256:33791e8a2dc2953f28b8d8d300dde42dd929ac28f974c4b4c6272cb2955cb762", + "sha256:3c8d896becff2fa653dc4438b54a5a25a971d1f4110b32bd3068db3722c80202", + "sha256:4373612d59c404baeb7cbd788a18b2b2a8331abcc84c3ba40051fcd18b17a4d5", + "sha256:487d63e1454627c8e47dd230025780e91869cfba4c753a74fda196a1f6ad6548", + "sha256:48916e459c54c4a70e52745639f1db524542140433599e13911b2f329834276a", + "sha256:4922cd707b25e623b902c86188aca466d3620892db76c0bdd7b99a3d5e61d35f", + "sha256:55af55e32ae468e9946f741a5d51f9896da6b9bf0bbdd326843fec05c730eb20", + "sha256:57e555a9feb4a8460415f1aac331a2dc833b1115284f7ded7278b54afc5bd218", + "sha256:5d4b68e216fc65e9fe4f524c177b54964af043dde734807586cf5435af84045c", + "sha256:64fda793737bc4037521d4899be780534b9aea552eb673b9833b01f945904c2e", + "sha256:6d6169cb3c6c2ad50db5b868db6491a790300ade1ed5d1da29289d73bbe40b56", + "sha256:7bcac9a2b4fdbed2c16fa5681356d7121ecabf041f18d97ed5b8e0dd38a80224", + "sha256:80b06212075346b5546b0417b9f2bf467fea3bfe7352f781ffc05a8ab24ba14a", + "sha256:818014c754cd3dba7229c0f5884396264d51ffb87ec86e927ef0be140bfdb0d2", + "sha256:8eb687582ed7cd8c4bdbff3df6c0da443eb89c3c72e6e5dcdd9c81729712791a", + "sha256:99f27fefe34c37ba9875f224a8f36e31d744d8083e00f520f133cab79ad5e819", + "sha256:9f3e33c28cd39d1b655ed1ba7247133b6f7fc16fa16887b120c0c670e35ce346", + "sha256:a8661b2ce9694ca01c529bfa204dbb144b275a31685a075ce123f12331be790b", + "sha256:a9da7010cec5a12193d1af9872a00888f396aba3dc79186604a09ea3ee7c029e", + "sha256:aedb15f0a5a5949ecb129a82b72b19df97bbbca024081ed2ef88bd5c0a610534", + "sha256:b315d709717a99f4b27b59b021e6207c64620790ca3e0bde636a6c7f14618abb", + "sha256:ba6f2b3f452e150945d58f4badd92310449876c4c954836cfb1803bdd7b422f0", + "sha256:c33d18eb6e6bc36f09d793c0dc58b0211fccc6ae5149b808da4a62660678b156", + "sha256:c9a875ce9d7fe32887784274dd533c57909b7b1dcadcc128a2ac21331a9765dd", + "sha256:c9e005e9bd57bc987764c32a1bee4364c44fdc11a3cc20a40b93b444984f2b87", + "sha256:d2ad4d668a5c0645d281dcd17aff2be3212bc109b33814bbb15c4939f44181cc", + "sha256:d950695ae4381ecd856bcaf2b1e866720e4ab9a1498cba61c602e56630ca7195", + "sha256:e22dcb48709fc51a7b58a927391b23ab37eb3737a98ac4338e2448bef8559b33", + "sha256:e8c6a99be100371dbb046880e7a282152aa5d6127ae01783e37662ef73850d8f", + "sha256:e9dc245e3ac69c92ee4c167fbdd7428ec1956d4e754223124991ef29eb57a09d", + "sha256:eb687a11f0a7a1839719edd80f41e459cc5366857ecbed383ff376c4e3cc6afd", + "sha256:eb9e2a346c5238a30a746893f23a9535e700f8192a68c07c0258e7ece6ff3728", + "sha256:ed38b924ce794e505647f7c331b22a693bee1538fdf46b0222c4717b42f744e7", + "sha256:f0010c6f9d1a4011e429109fda55a225921e3206e7f62a0c22a35344bfd13cca", + "sha256:f0c5d1acbfca6ebdd6b1e3eded8d261affb6ddcf2186205518f1428b8569bb99", + "sha256:f10afb1004f102c7868ebfe91c28f4a712227fe4cb24974350ace1f90e1febbf", + "sha256:f174135f5609428cc6e1b9090f9268f5c8935fddb1b25ccb8255a2d50de6789e", + "sha256:f3ebe6e73c319340830a9b2825d32eb6d8475c1dac020b4f0aa774ee3b898d1c", + "sha256:f627688813d0a4140153ff532537fbe4afea5a3dffce1f9deb7f91f848a832b5", + "sha256:fd4305f86f53dfd8cd3522269ed7fc34856a8ee3709a5e28b2836b2db9d4cd69" + ], + "version": "==1.14.6" + }, + "charset-normalizer": { + "hashes": [ + "sha256:5d209c0a931f215cee683b6445e2d77677e7e75e159f78def0db09d68fafcaa6", + "sha256:5ec46d183433dcbd0ab716f2d7f29d8dee50505b3fdb40c6b985c7c4f5a3591f" + ], + "markers": "python_version >= '3'", + "version": "==2.0.6" + }, + "cryptography": { + "hashes": [ + "sha256:0d7b69674b738068fa6ffade5c962ecd14969690585aaca0a1b1fc9058938a72", + "sha256:1bd0ccb0a1ed775cd7e2144fe46df9dc03eefd722bbcf587b3e0616ea4a81eff", + "sha256:3c284fc1e504e88e51c428db9c9274f2da9f73fdf5d7e13a36b8ecb039af6e6c", + "sha256:49570438e60f19243e7e0d504527dd5fe9b4b967b5a1ff21cc12b57602dd85d3", + "sha256:541dd758ad49b45920dda3b5b48c968f8b2533d8981bcdb43002798d8f7a89ed", + "sha256:5a60d3780149e13b7a6ff7ad6526b38846354d11a15e21068e57073e29e19bed", + "sha256:7951a966613c4211b6612b0352f5bf29989955ee592c4a885d8c7d0f830d0433", + "sha256:922f9602d67c15ade470c11d616f2b2364950602e370c76f0c94c94ae672742e", + "sha256:a0f0b96c572fc9f25c3f4ddbf4688b9b38c69836713fb255f4a2715d93cbaf44", + "sha256:a777c096a49d80f9d2979695b835b0f9c9edab73b59e4ceb51f19724dda887ed", + "sha256:a9a4ac9648d39ce71c2f63fe7dc6db144b9fa567ddfc48b9fde1b54483d26042", + "sha256:aa4969f24d536ae2268c902b2c3d62ab464b5a66bcb247630d208a79a8098e9b", + "sha256:c7390f9b2119b2b43160abb34f63277a638504ef8df99f11cb52c1fda66a2e6f", + "sha256:e18e6ab84dfb0ab997faf8cca25a86ff15dfea4027b986322026cc99e0a892da" + ], + "index": "pypi", + "version": "==3.3.2" + }, + "docutils": { + "hashes": [ + "sha256:686577d2e4c32380bb50cbb22f575ed742d58168cee37e99117a854bcd88f125", + "sha256:cf316c8370a737a022b72b56874f6602acf974a37a9fba42ec2876387549fc61" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", + "version": "==0.17.1" + }, + "google-auth": { + "hashes": [ + "sha256:2a92b485afed5292946b324e91fcbe03db277ee4cb64c998c6cfa66d4af01dee", + "sha256:6dc8173abd50f25b6e62fc5b42802c96fc7cd9deb9bfeeb10a79f5606225cdf4" + ], + "markers": "python_version >= '3.6'", + "version": "==2.2.1" + }, + "idna": { + "hashes": [ + "sha256:14475042e284991034cb48e06f6851428fb14c4dc953acd9be9a5e95c7b6dd7a", + "sha256:467fbad99067910785144ce333826c71fb0e63a425657295239737f7ecd125f3" + ], + "markers": "python_version >= '3'", + "version": "==3.2" + }, + "ipaddress": { + "hashes": [ + "sha256:6e0f4a39e66cb5bb9a137b00276a2eff74f93b71dcbdad6f10ff7df9d3557fcc", + "sha256:b7f8e0369580bb4a24d5ba1d7cc29660a4a6987763faf1d8a8046830e020e7e2" + ], + "index": "pypi", + "version": "==1.0.23" + }, + "jinja2": { + "hashes": [ + "sha256:827a0e32839ab1600d4eb1c4c33ec5a8edfbc5cb42dafa13b81f182f97784b45", + "sha256:8569982d3f0889eed11dd620c706d39b60c36d6d25843961f33f77fb6bc6b20c" + ], + "markers": "python_version >= '3.6'", + "version": "==3.0.2" + }, + "jmespath": { + "hashes": [ + "sha256:b85d0567b8666149a93172712e68920734333c0ce7e89b78b3e987f71e5ed4f9", + "sha256:cdf6525904cc597730141d61b36f2e4b8ecc257c420fa2f4549bac2c2d0cb72f" + ], + "index": "pypi", + "version": "==0.10.0" + }, + "kubernetes": { + "hashes": [ + "sha256:23c85d8571df8f56e773f1a413bc081537536dc47e2b5e8dc2e6262edb2c57ca", + "sha256:ec52ea01d52e2ec3da255992f7e859f3a76f2bdb51cf65ba8cd71dfc309d8daa" + ], + "version": "==12.0.1" + }, + "lockfile": { + "hashes": [ + "sha256:6aed02de03cba24efabcd600b30540140634fc06cfa603822d508d5361e9f799", + "sha256:6c3cb24f344923d30b2785d5ad75182c8ea7ac1b6171b08657258ec7429d50fa" + ], + "version": "==0.12.2" + }, + "markupsafe": { + "hashes": [ + "sha256:01a9b8ea66f1658938f65b93a85ebe8bc016e6769611be228d797c9d998dd298", + "sha256:023cb26ec21ece8dc3907c0e8320058b2e0cb3c55cf9564da612bc325bed5e64", + "sha256:0446679737af14f45767963a1a9ef7620189912317d095f2d9ffa183a4d25d2b", + "sha256:0717a7390a68be14b8c793ba258e075c6f4ca819f15edfc2a3a027c823718567", + "sha256:0955295dd5eec6cb6cc2fe1698f4c6d84af2e92de33fbcac4111913cd100a6ff", + "sha256:0d4b31cc67ab36e3392bbf3862cfbadac3db12bdd8b02a2731f509ed5b829724", + "sha256:10f82115e21dc0dfec9ab5c0223652f7197feb168c940f3ef61563fc2d6beb74", + "sha256:168cd0a3642de83558a5153c8bd34f175a9a6e7f6dc6384b9655d2697312a646", + "sha256:1d609f577dc6e1aa17d746f8bd3c31aa4d258f4070d61b2aa5c4166c1539de35", + "sha256:1f2ade76b9903f39aa442b4aadd2177decb66525062db244b35d71d0ee8599b6", + "sha256:2a7d351cbd8cfeb19ca00de495e224dea7e7d919659c2841bbb7f420ad03e2d6", + "sha256:2d7d807855b419fc2ed3e631034685db6079889a1f01d5d9dac950f764da3dad", + "sha256:2ef54abee730b502252bcdf31b10dacb0a416229b72c18b19e24a4509f273d26", + "sha256:36bc903cbb393720fad60fc28c10de6acf10dc6cc883f3e24ee4012371399a38", + "sha256:37205cac2a79194e3750b0af2a5720d95f786a55ce7df90c3af697bfa100eaac", + "sha256:3c112550557578c26af18a1ccc9e090bfe03832ae994343cfdacd287db6a6ae7", + "sha256:3dd007d54ee88b46be476e293f48c85048603f5f516008bee124ddd891398ed6", + "sha256:47ab1e7b91c098ab893b828deafa1203de86d0bc6ab587b160f78fe6c4011f75", + "sha256:49e3ceeabbfb9d66c3aef5af3a60cc43b85c33df25ce03d0031a608b0a8b2e3f", + "sha256:4efca8f86c54b22348a5467704e3fec767b2db12fc39c6d963168ab1d3fc9135", + "sha256:53edb4da6925ad13c07b6d26c2a852bd81e364f95301c66e930ab2aef5b5ddd8", + "sha256:5855f8438a7d1d458206a2466bf82b0f104a3724bf96a1c781ab731e4201731a", + "sha256:594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a", + "sha256:5bb28c636d87e840583ee3adeb78172efc47c8b26127267f54a9c0ec251d41a9", + "sha256:60bf42e36abfaf9aff1f50f52644b336d4f0a3fd6d8a60ca0d054ac9f713a864", + "sha256:611d1ad9a4288cf3e3c16014564df047fe08410e628f89805e475368bd304914", + "sha256:6557b31b5e2c9ddf0de32a691f2312a32f77cd7681d8af66c2692efdbef84c18", + "sha256:693ce3f9e70a6cf7d2fb9e6c9d8b204b6b39897a2c4a1aa65728d5ac97dcc1d8", + "sha256:6a7fae0dd14cf60ad5ff42baa2e95727c3d81ded453457771d02b7d2b3f9c0c2", + "sha256:6c4ca60fa24e85fe25b912b01e62cb969d69a23a5d5867682dd3e80b5b02581d", + "sha256:6fcf051089389abe060c9cd7caa212c707e58153afa2c649f00346ce6d260f1b", + "sha256:7d91275b0245b1da4d4cfa07e0faedd5b0812efc15b702576d103293e252af1b", + "sha256:905fec760bd2fa1388bb5b489ee8ee5f7291d692638ea5f67982d968366bef9f", + "sha256:97383d78eb34da7e1fa37dd273c20ad4320929af65d156e35a5e2d89566d9dfb", + "sha256:984d76483eb32f1bcb536dc27e4ad56bba4baa70be32fa87152832cdd9db0833", + "sha256:99df47edb6bda1249d3e80fdabb1dab8c08ef3975f69aed437cb69d0a5de1e28", + "sha256:a30e67a65b53ea0a5e62fe23682cfe22712e01f453b95233b25502f7c61cb415", + "sha256:ab3ef638ace319fa26553db0624c4699e31a28bb2a835c5faca8f8acf6a5a902", + "sha256:add36cb2dbb8b736611303cd3bfcee00afd96471b09cda130da3581cbdc56a6d", + "sha256:b2f4bf27480f5e5e8ce285a8c8fd176c0b03e93dcc6646477d4630e83440c6a9", + "sha256:b7f2d075102dc8c794cbde1947378051c4e5180d52d276987b8d28a3bd58c17d", + "sha256:baa1a4e8f868845af802979fcdbf0bb11f94f1cb7ced4c4b8a351bb60d108145", + "sha256:be98f628055368795d818ebf93da628541e10b75b41c559fdf36d104c5787066", + "sha256:bf5d821ffabf0ef3533c39c518f3357b171a1651c1ff6827325e4489b0e46c3c", + "sha256:c47adbc92fc1bb2b3274c4b3a43ae0e4573d9fbff4f54cd484555edbf030baf1", + "sha256:d7f9850398e85aba693bb640262d3611788b1f29a79f0c93c565694658f4071f", + "sha256:d8446c54dc28c01e5a2dbac5a25f071f6653e6e40f3a8818e8b45d790fe6ef53", + "sha256:e0f138900af21926a02425cf736db95be9f4af72ba1bb21453432a07f6082134", + "sha256:e9936f0b261d4df76ad22f8fee3ae83b60d7c3e871292cd42f40b81b70afae85", + "sha256:f5653a225f31e113b152e56f154ccbe59eeb1c7487b39b9d9f9cdb58e6c79dc5", + "sha256:f826e31d18b516f653fe296d967d700fddad5901ae07c622bb3705955e1faa94", + "sha256:f8ba0e8349a38d3001fae7eadded3f6606f0da5d748ee53cc1dab1d6527b9509", + "sha256:f9081981fe268bd86831e5c75f7de206ef275defcb82bc70740ae6dc507aee51", + "sha256:fa130dd50c57d53368c9d59395cb5526eda596d3ffe36666cd81a44d56e48872" + ], + "markers": "python_version >= '3.6'", + "version": "==2.0.1" + }, + "oauthlib": { + "hashes": [ + "sha256:42bf6354c2ed8c6acb54d971fce6f88193d97297e18602a3a886603f9d7730cc", + "sha256:8f0215fcc533dd8dd1bee6f4c412d4f0cd7297307d43ac61666389e3bc3198a3" + ], + "markers": "python_version >= '3.6'", + "version": "==3.1.1" + }, + "openshift": { + "hashes": [ + "sha256:a38957684b17ad0e140a87226249bf26de7267db0c83a6d512b48be258052e1a" + ], + "index": "pypi", + "version": "==0.12.1" + }, + "packaging": { + "hashes": [ + "sha256:7dc96269f53a4ccec5c0670940a4281106dd0bb343f47b7471f779df49c2fbe7", + "sha256:c86254f9220d55e31cc94d69bade760f0847da8000def4dfe1c6b872fd14ff14" + ], + "markers": "python_version >= '3.6'", + "version": "==21.0" + }, + "pexpect": { + "hashes": [ + "sha256:0b48a55dcb3c05f3329815901ea4fc1537514d6ba867a152b581d69ae3710937", + "sha256:fc65a43959d153d0114afe13997d439c22823a27cefceb5ff35c2178c6784c0c" + ], + "version": "==4.8.0" + }, + "psutil": { + "hashes": [ + "sha256:0066a82f7b1b37d334e68697faba68e5ad5e858279fd6351c8ca6024e8d6ba64", + "sha256:02b8292609b1f7fcb34173b25e48d0da8667bc85f81d7476584d889c6e0f2131", + "sha256:0ae6f386d8d297177fd288be6e8d1afc05966878704dad9847719650e44fc49c", + "sha256:0c9ccb99ab76025f2f0bbecf341d4656e9c1351db8cc8a03ccd62e318ab4b5c6", + "sha256:0dd4465a039d343925cdc29023bb6960ccf4e74a65ad53e768403746a9207023", + "sha256:12d844996d6c2b1d3881cfa6fa201fd635971869a9da945cf6756105af73d2df", + "sha256:1bff0d07e76114ec24ee32e7f7f8d0c4b0514b3fae93e3d2aaafd65d22502394", + "sha256:245b5509968ac0bd179287d91210cd3f37add77dad385ef238b275bad35fa1c4", + "sha256:28ff7c95293ae74bf1ca1a79e8805fcde005c18a122ca983abf676ea3466362b", + "sha256:36b3b6c9e2a34b7d7fbae330a85bf72c30b1c827a4366a07443fc4b6270449e2", + "sha256:52de075468cd394ac98c66f9ca33b2f54ae1d9bff1ef6b67a212ee8f639ec06d", + "sha256:5da29e394bdedd9144c7331192e20c1f79283fb03b06e6abd3a8ae45ffecee65", + "sha256:61f05864b42fedc0771d6d8e49c35f07efd209ade09a5afe6a5059e7bb7bf83d", + "sha256:6223d07a1ae93f86451d0198a0c361032c4c93ebd4bf6d25e2fb3edfad9571ef", + "sha256:6323d5d845c2785efb20aded4726636546b26d3b577aded22492908f7c1bdda7", + "sha256:6ffe81843131ee0ffa02c317186ed1e759a145267d54fdef1bc4ea5f5931ab60", + "sha256:74f2d0be88db96ada78756cb3a3e1b107ce8ab79f65aa885f76d7664e56928f6", + "sha256:74fb2557d1430fff18ff0d72613c5ca30c45cdbfcddd6a5773e9fc1fe9364be8", + "sha256:90d4091c2d30ddd0a03e0b97e6a33a48628469b99585e2ad6bf21f17423b112b", + "sha256:90f31c34d25b1b3ed6c40cdd34ff122b1887a825297c017e4cbd6796dd8b672d", + "sha256:99de3e8739258b3c3e8669cb9757c9a861b2a25ad0955f8e53ac662d66de61ac", + "sha256:c6a5fd10ce6b6344e616cf01cc5b849fa8103fbb5ba507b6b2dee4c11e84c935", + "sha256:ce8b867423291cb65cfc6d9c4955ee9bfc1e21fe03bb50e177f2b957f1c2469d", + "sha256:d225cd8319aa1d3c85bf195c4e07d17d3cd68636b8fc97e6cf198f782f99af28", + "sha256:ea313bb02e5e25224e518e4352af4bf5e062755160f77e4b1767dd5ccb65f876", + "sha256:ea372bcc129394485824ae3e3ddabe67dc0b118d262c568b4d2602a7070afdb0", + "sha256:f4634b033faf0d968bb9220dd1c793b897ab7f1189956e1aa9eae752527127d3", + "sha256:fcc01e900c1d7bee2a37e5d6e4f9194760a93597c97fee89c4ae51701de03563" + ], + "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==5.8.0" + }, + "ptyprocess": { + "hashes": [ + "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35", + "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220" + ], + "version": "==0.7.0" + }, + "pyasn1": { + "hashes": [ + "sha256:014c0e9976956a08139dc0712ae195324a75e142284d5f87f1a87ee1b068a359", + "sha256:03840c999ba71680a131cfaee6fab142e1ed9bbd9c693e285cc6aca0d555e576", + "sha256:0458773cfe65b153891ac249bcf1b5f8f320b7c2ce462151f8fa74de8934becf", + "sha256:08c3c53b75eaa48d71cf8c710312316392ed40899cb34710d092e96745a358b7", + "sha256:39c7e2ec30515947ff4e87fb6f456dfc6e84857d34be479c9d4a4ba4bf46aa5d", + "sha256:5c9414dcfede6e441f7e8f81b43b34e834731003427e5b09e4e00e3172a10f00", + "sha256:6e7545f1a61025a4e58bb336952c5061697da694db1cae97b116e9c46abcf7c8", + "sha256:78fa6da68ed2727915c4767bb386ab32cdba863caa7dbe473eaae45f9959da86", + "sha256:7ab8a544af125fb704feadb008c99a88805126fb525280b2270bb25cc1d78a12", + "sha256:99fcc3c8d804d1bc6d9a099921e39d827026409a58f2a720dcdb89374ea0c776", + "sha256:aef77c9fb94a3ac588e87841208bdec464471d9871bd5050a287cc9a475cd0ba", + "sha256:e89bf84b5437b532b0803ba5c9a5e054d21fec423a89952a74f87fa2c9b7bce2", + "sha256:fec3e9d8e36808a28efb59b489e4528c10ad0f480e57dcc32b4de5c9d8c9fdf3" + ], + "version": "==0.4.8" + }, + "pyasn1-modules": { + "hashes": [ + "sha256:0845a5582f6a02bb3e1bde9ecfc4bfcae6ec3210dd270522fee602365430c3f8", + "sha256:0fe1b68d1e486a1ed5473f1302bd991c1611d319bba158e98b106ff86e1d7199", + "sha256:15b7c67fabc7fc240d87fb9aabf999cf82311a6d6fb2c70d00d3d0604878c811", + "sha256:426edb7a5e8879f1ec54a1864f16b882c2837bfd06eee62f2c982315ee2473ed", + "sha256:65cebbaffc913f4fe9e4808735c95ea22d7a7775646ab690518c056784bc21b4", + "sha256:905f84c712230b2c592c19470d3ca8d552de726050d1d1716282a1f6146be65e", + "sha256:a50b808ffeb97cb3601dd25981f6b016cbb3d31fbf57a8b8a87428e6158d0c74", + "sha256:a99324196732f53093a84c4369c996713eb8c89d360a496b599fb1a9c47fc3eb", + "sha256:b80486a6c77252ea3a3e9b1e360bc9cf28eaac41263d173c032581ad2f20fe45", + "sha256:c29a5e5cc7a3f05926aff34e097e84f8589cd790ce0ed41b67aed6857b26aafd", + "sha256:cbac4bc38d117f2a49aeedec4407d23e8866ea4ac27ff2cf7fb3e5b570df19e0", + "sha256:f39edd8c4ecaa4556e989147ebf219227e2cd2e8a43c7e7fcb1f1c18c5fd6a3d", + "sha256:fe0644d9ab041506b62782e92b06b8c68cca799e1a9636ec398675459e031405" + ], + "version": "==0.2.8" + }, + "pycparser": { + "hashes": [ + "sha256:2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0", + "sha256:7582ad22678f0fcd81102833f60ef8d0e57288b6b5fb00323d101be910e35705" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==2.20" + }, + "pyparsing": { + "hashes": [ + "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1", + "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b" + ], + "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2'", + "version": "==2.4.7" + }, + "python-daemon": { + "hashes": [ + "sha256:191c7b67b8f7aac58849abf54e19fe1957ef7290c914210455673028ad454989", + "sha256:bda993f1623b1197699716d68d983bb580043cf2b8a66a01274d9b8297b0aeaf" + ], + "version": "==2.3.0" + }, + "python-dateutil": { + "hashes": [ + "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86", + "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'", + "version": "==2.8.2" + }, + "python-string-utils": { + "hashes": [ + "sha256:dcf9060b03f07647c0a603408dc8b03f807f3b54a05c6e19eb14460256fac0cb", + "sha256:f1a88700baf99db1a9b6953f44181ad9ca56623c81e257e6009707e2e7851fa4" + ], + "markers": "python_version >= '3.5'", + "version": "==1.0.0" + }, + "pyyaml": { + "hashes": [ + "sha256:08682f6b72c722394747bddaf0aa62277e02557c0fd1c42cb853016a38f8dedf", + "sha256:0f5f5786c0e09baddcd8b4b45f20a7b5d61a7e7e99846e3c799b05c7c53fa696", + "sha256:129def1b7c1bf22faffd67b8f3724645203b79d8f4cc81f674654d9902cb4393", + "sha256:294db365efa064d00b8d1ef65d8ea2c3426ac366c0c4368d930bf1c5fb497f77", + "sha256:3b2b1824fe7112845700f815ff6a489360226a5609b96ec2190a45e62a9fc922", + "sha256:3bd0e463264cf257d1ffd2e40223b197271046d09dadf73a0fe82b9c1fc385a5", + "sha256:4465124ef1b18d9ace298060f4eccc64b0850899ac4ac53294547536533800c8", + "sha256:49d4cdd9065b9b6e206d0595fee27a96b5dd22618e7520c33204a4a3239d5b10", + "sha256:4e0583d24c881e14342eaf4ec5fbc97f934b999a6828693a99157fde912540cc", + "sha256:5accb17103e43963b80e6f837831f38d314a0495500067cb25afab2e8d7a4018", + "sha256:607774cbba28732bfa802b54baa7484215f530991055bb562efbed5b2f20a45e", + "sha256:6c78645d400265a062508ae399b60b8c167bf003db364ecb26dcab2bda048253", + "sha256:72a01f726a9c7851ca9bfad6fd09ca4e090a023c00945ea05ba1638c09dc3347", + "sha256:74c1485f7707cf707a7aef42ef6322b8f97921bd89be2ab6317fd782c2d53183", + "sha256:895f61ef02e8fed38159bb70f7e100e00f471eae2bc838cd0f4ebb21e28f8541", + "sha256:8c1be557ee92a20f184922c7b6424e8ab6691788e6d86137c5d93c1a6ec1b8fb", + "sha256:bb4191dfc9306777bc594117aee052446b3fa88737cd13b7188d0e7aa8162185", + "sha256:bfb51918d4ff3d77c1c856a9699f8492c612cde32fd3bcd344af9be34999bfdc", + "sha256:c20cfa2d49991c8b4147af39859b167664f2ad4561704ee74c1de03318e898db", + "sha256:cb333c16912324fd5f769fff6bc5de372e9e7a202247b48870bc251ed40239aa", + "sha256:d2d9808ea7b4af864f35ea216be506ecec180628aced0704e34aca0b040ffe46", + "sha256:d483ad4e639292c90170eb6f7783ad19490e7a8defb3e46f97dfe4bacae89122", + "sha256:dd5de0646207f053eb0d6c74ae45ba98c3395a571a2891858e87df7c9b9bd51b", + "sha256:e1d4970ea66be07ae37a3c2e48b5ec63f7ba6804bdddfdbd3cfd954d25a82e63", + "sha256:e4fac90784481d221a8e4b1162afa7c47ed953be40d31ab4629ae917510051df", + "sha256:fa5ae20527d8e831e8230cbffd9f8fe952815b2b7dae6ffec25318803a7528fc", + "sha256:fd7f6999a8070df521b6384004ef42833b9bd62cfee11a09bda1079b4b704247", + "sha256:fdc842473cd33f45ff6bce46aea678a54e3d21f1b61a7750ce3c498eedfe25d6", + "sha256:fe69978f3f768926cfa37b867e3843918e012cf83f680806599ddce33c2c68b0" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'", + "version": "==5.4.1" + }, + "requests": { + "hashes": [ + "sha256:6c1246513ecd5ecd4528a0906f910e8f0f9c6b8ec72030dc9fd154dc1a6efd24", + "sha256:b8aa58f8cf793ffd8782d3d8cb19e66ef36f7aba4353eec859e74678b01b07a7" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'", + "version": "==2.26.0" + }, + "requests-oauthlib": { + "hashes": [ + "sha256:7f71572defaecd16372f9006f33c2ec8c077c3cfa6f5911a9a90202beb513f3d", + "sha256:b4261601a71fd721a8bd6d7aa1cc1d6a8a93b4a9f5e96626f8e4d91e8beeaa6a", + "sha256:fa6c47b933f01060936d87ae9327fead68768b69c6c9ea2109c48be30f2d4dbc" + ], + "version": "==1.3.0" + }, + "requests-unixsocket": { + "hashes": [ + "sha256:014d07bfb66dc805a011a8b4b306cf4ec96d2eddb589f6b2b5765e626f0dc0cc", + "sha256:9e5c1a20afc3cf786197ae59c79bcdb0e7565f218f27df5f891307ee8817c1ea" + ], + "version": "==0.2.0" + }, + "resolvelib": { + "hashes": [ + "sha256:8113ae3ed6d33c6be0bcbf03ffeb06c0995c099b7b8aaa5ddf2e9b3b3df4e915", + "sha256:9b9b80d5c60e4c2a8b7fbf0712c3449dc01d74e215632e5199850c9eca687628" + ], + "version": "==0.5.4" + }, + "rsa": { + "hashes": [ + "sha256:78f9a9bf4e7be0c5ded4583326e7461e3a3c5aae24073648b4bdfa797d78c9d2", + "sha256:9d689e6ca1b3038bc82bf8d23e944b6b6037bc02301a574935b2dd946e0353b9" + ], + "markers": "python_version >= '3.5' and python_version < '4'", + "version": "==4.7.2" + }, + "ruamel.yaml": { + "hashes": [ + "sha256:1a771fc92d3823682b7f0893ad56cb5a5c87c48e62b5399d6f42c8759a583b33", + "sha256:ea21da1198c4b41b8e7a259301cc9710d3b972bf8ba52f06218478e6802dd1f1" + ], + "markers": "python_version >= '3'", + "version": "==0.17.16" + }, + "ruamel.yaml.clib": { + "hashes": [ + "sha256:0847201b767447fc33b9c235780d3aa90357d20dd6108b92be544427bea197dd", + "sha256:1866cf2c284a03b9524a5cc00daca56d80057c5ce3cdc86a52020f4c720856f0", + "sha256:31ea73e564a7b5fbbe8188ab8b334393e06d997914a4e184975348f204790277", + "sha256:3fb9575a5acd13031c57a62cc7823e5d2ff8bc3835ba4d94b921b4e6ee664104", + "sha256:4ff604ce439abb20794f05613c374759ce10e3595d1867764dd1ae675b85acbd", + "sha256:72a2b8b2ff0a627496aad76f37a652bcef400fd861721744201ef1b45199ab78", + "sha256:78988ed190206672da0f5d50c61afef8f67daa718d614377dcd5e3ed85ab4a99", + "sha256:7b2927e92feb51d830f531de4ccb11b320255ee95e791022555971c466af4527", + "sha256:7f7ecb53ae6848f959db6ae93bdff1740e651809780822270eab111500842a84", + "sha256:825d5fccef6da42f3c8eccd4281af399f21c02b32d98e113dbc631ea6a6ecbc7", + "sha256:846fc8336443106fe23f9b6d6b8c14a53d38cef9a375149d61f99d78782ea468", + "sha256:89221ec6d6026f8ae859c09b9718799fea22c0e8da8b766b0b2c9a9ba2db326b", + "sha256:9efef4aab5353387b07f6b22ace0867032b900d8e91674b5d8ea9150db5cae94", + "sha256:a32f8d81ea0c6173ab1b3da956869114cae53ba1e9f72374032e33ba3118c233", + "sha256:a49e0161897901d1ac9c4a79984b8410f450565bbad64dbfcbf76152743a0cdb", + "sha256:ada3f400d9923a190ea8b59c8f60680c4ef8a4b0dfae134d2f2ff68429adfab5", + "sha256:bf75d28fa071645c529b5474a550a44686821decebdd00e21127ef1fd566eabe", + "sha256:cfdb9389d888c5b74af297e51ce357b800dd844898af9d4a547ffc143fa56751", + "sha256:d67f273097c368265a7b81e152e07fb90ed395df6e552b9fa858c6d2c9f42502", + "sha256:dc6a613d6c74eef5a14a214d433d06291526145431c3b964f5e16529b1842bed", + "sha256:de9c6b8a1ba52919ae919f3ae96abb72b994dd0350226e28f3686cb4f142165c" + ], + "markers": "platform_python_implementation == 'CPython' and python_version < '3.10'", + "version": "==0.2.6" + }, + "six": { + "hashes": [ + "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926", + "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'", + "version": "==1.16.0" + }, + "urllib3": { + "hashes": [ + "sha256:4987c65554f7a2dbf30c18fd48778ef124af6fab771a377103da0585e2336ece", + "sha256:c4fdf4019605b6e5423637e01bc9fe4daef873709a7973e195ceba0a62bbc844" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4'", + "version": "==1.26.7" + }, + "websocket-client": { + "hashes": [ + "sha256:0133d2f784858e59959ce82ddac316634229da55b498aac311f1620567a710ec", + "sha256:8dfb715d8a992f5712fff8c843adae94e22b22a99b2c5e6b0ec4a1a981cc4e0d" + ], + "markers": "python_version >= '3.6'", + "version": "==1.2.1" + } + }, + "develop": {} +} diff --git a/images/ansible-operator/Dockerfile b/images/ansible-operator/2.9/Dockerfile similarity index 100% rename from images/ansible-operator/Dockerfile rename to images/ansible-operator/2.9/Dockerfile diff --git a/images/ansible-operator/Pipfile b/images/ansible-operator/2.9/Pipfile similarity index 100% rename from images/ansible-operator/Pipfile rename to images/ansible-operator/2.9/Pipfile diff --git a/images/ansible-operator/Pipfile.lock b/images/ansible-operator/2.9/Pipfile.lock similarity index 100% rename from images/ansible-operator/Pipfile.lock rename to images/ansible-operator/2.9/Pipfile.lock diff --git a/images/ansible-operator/base.Dockerfile b/images/ansible-operator/base.Dockerfile index d75a5397960..c3914d37239 100644 --- a/images/ansible-operator/base.Dockerfile +++ b/images/ansible-operator/base.Dockerfile @@ -4,6 +4,7 @@ FROM registry.access.redhat.com/ubi8/ubi:8.4 ARG TARGETARCH +ARG ANSIBLE_VERSION=2.9 # Label this image with the repo and commit that built it, for freshmaking purposes. ARG GIT_COMMIT=devel @@ -15,8 +16,9 @@ RUN mkdir -p /etc/ansible \ && echo 'roles_path = /opt/ansible/roles' >> /etc/ansible/ansible.cfg \ && echo 'library = /usr/share/ansible/openshift' >> /etc/ansible/ansible.cfg -# Copy python dependencies specs to be installed using Pipenv -COPY Pipfile* ./ + +# Copy python dependencies (including ansible) to be installed using Pipenv +COPY images/ansible-operator/${ANSIBLE_VERSION}/Pipfile* ./ # Instruct pip(env) not to keep a cache of installed packages, # to install into the global site-packages and # to clear the pipenv cache as well From 333d30b03f76ee5b86cf0aff596971922244b0ed Mon Sep 17 00:00:00 2001 From: austin Date: Wed, 3 Nov 2021 11:06:41 -0400 Subject: [PATCH 02/12] use new preview dependency image to create preview base Signed-off-by: austin --- .github/workflows/deploy.yml | 2 +- images/ansible-operator/2.11/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a433d014a02..42ab62c6611 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -72,7 +72,7 @@ jobs: environment: deploy strategy: matrix: - id: ["operator-sdk", "ansible-operator", "helm-operator", "scorecard-test"] + id: ["operator-sdk", "ansible-operator", "ansible-operator-2.11-preview", "helm-operator", "scorecard-test"] steps: - name: set up qemu diff --git a/images/ansible-operator/2.11/Dockerfile b/images/ansible-operator/2.11/Dockerfile index a292992cf00..047f323ac9f 100644 --- a/images/ansible-operator/2.11/Dockerfile +++ b/images/ansible-operator/2.11/Dockerfile @@ -18,7 +18,7 @@ RUN GOOS=linux GOARCH=$TARGETARCH make build/ansible-operator # Final image. # TODO(asmacdo) update GH action to set this -FROM quay.io/operator-framework/ansible-operator-2.11-preview-base:master-bc8aedd752afff8aed00e62901d69e737d3e370e +FROM quay.io/operator-framework/ansible-operator-2.11-preview-base:dev ENV HOME=/opt/ansible \ USER_NAME=ansible \ From e275f28cc266e89cbac90565e54876a404447d26 Mon Sep 17 00:00:00 2001 From: austin Date: Wed, 3 Nov 2021 11:19:57 -0400 Subject: [PATCH 03/12] build and push ansible tags Signed-off-by: austin --- .github/workflows/deploy.yml | 38 +++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 42ab62c6611..58c9d85cb9e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -72,7 +72,7 @@ jobs: environment: deploy strategy: matrix: - id: ["operator-sdk", "ansible-operator", "ansible-operator-2.11-preview", "helm-operator", "scorecard-test"] + id: ["operator-sdk", "helm-operator", "scorecard-test"] steps: - name: set up qemu @@ -103,6 +103,22 @@ jobs: IMG=quay.io/${{ github.repository_owner }}/${{ matrix.id }} echo ::set-output name=tags::$(.github/workflows/get_image_tags.sh "$IMG" "v") + - name: create ansible 2.9 tag + id: ansible-29-tags + run: | + # TODO(asmacdo) github.repository_owner is wrong. This should be a quay account, `operator-framework` happens to be the same in + # gh and quay. + IMG=quay.io/${{ github.repository_owner }}/ansible-operator + echo ::set-output name=tags::$(.github/workflows/get_image_tags.sh "$IMG" "v") + + - name: create ansible 2.11 tag + id: ansible-211-tags + run: | + # TODO(asmacdo) github.repository_owner is wrong. This should be a quay account, `operator-framework` happens to be the same in + # gh and quay. + IMG=quay.io/${{ github.repository_owner }}/ansible-operator-2.11-preview + echo ::set-output name=tags::$(.github/workflows/get_image_tags.sh "$IMG" "v") + - name: build and push uses: docker/build-push-action@v2 with: @@ -113,6 +129,26 @@ jobs: push: ${{ (github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/latest')) }} tags: ${{ steps.tags.outputs.tags }} + - name: build and push ansible 2.9 + uses: docker/build-push-action@v2 + with: + file: ./images/ansible-operator/2.9/Dockerfile + context: . + platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x + # Push on tag, or master or latest branch push. + push: ${{ (github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/latest')) }} + tags: ${{ steps.ansible-29-tags.outputs.tags }} + + - name: build and push ansible 2.11 + uses: docker/build-push-action@v2 + with: + file: ./images/ansible-operator/2.11/Dockerfile + context: . + platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x + # Push on tag, or master or latest branch push. + push: ${{ (github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/latest')) }} + tags: ${{ steps.ansible-211-tags.outputs.tags }} + # scorecard-test-kuttl image build job. Only pushes if a tag with prefix "scorecard-kuttl/v" is present. image-scorecard-test-kuttl: name: image-scorecard-test-kuttl From acf77e45512f612900f5024c5bb306417d7c4263 Mon Sep 17 00:00:00 2001 From: austin Date: Wed, 3 Nov 2021 11:52:11 -0400 Subject: [PATCH 04/12] e2e ansible molecule should build 2.9 images Signed-off-by: austin --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 89204fa18b5..41e59d55bc2 100644 --- a/Makefile +++ b/Makefile @@ -167,10 +167,10 @@ test-e2e:: $(e2e_tests) ## Run e2e tests test-e2e-go:: image/custom-scorecard-tests ## Run Go e2e tests go test ./test/e2e/go -v -ginkgo.v -test-e2e-ansible:: image/ansible-operator ## Run Ansible e2e tests +test-e2e-ansible:: image/ansible-operator/2.9 ## Run Ansible e2e tests go test -count=1 ./internal/ansible/proxy/... go test ./test/e2e/ansible -v -ginkgo.v -test-e2e-ansible-molecule:: image/ansible-operator ## Run molecule-based Ansible e2e tests +test-e2e-ansible-molecule:: image/ansible-operator/2.9 ## Run molecule-based Ansible e2e tests go run ./hack/generate/samples/molecule/generate.go ./hack/tests/e2e-ansible-molecule.sh test-e2e-helm:: image/helm-operator ## Run Helm e2e tests From 72680c98e07a4db0604b4465ff865ce1ec22aee2 Mon Sep 17 00:00:00 2001 From: austin Date: Wed, 3 Nov 2021 12:26:52 -0400 Subject: [PATCH 05/12] simplify make Signed-off-by: austin --- Makefile | 2 +- .../2.11 => ansible-operator-2.11-preview}/Dockerfile | 0 .../2.11 => ansible-operator-2.11-preview}/Pipfile | 0 .../2.11 => ansible-operator-2.11-preview}/Pipfile.lock | 0 images/ansible-operator/{2.9 => }/Dockerfile | 0 images/ansible-operator/{2.9 => }/Pipfile | 0 images/ansible-operator/{2.9 => }/Pipfile.lock | 0 7 files changed, 1 insertion(+), 1 deletion(-) rename images/{ansible-operator/2.11 => ansible-operator-2.11-preview}/Dockerfile (100%) rename images/{ansible-operator/2.11 => ansible-operator-2.11-preview}/Pipfile (100%) rename images/{ansible-operator/2.11 => ansible-operator-2.11-preview}/Pipfile.lock (100%) rename images/ansible-operator/{2.9 => }/Dockerfile (100%) rename images/ansible-operator/{2.9 => }/Pipfile (100%) rename images/ansible-operator/{2.9 => }/Pipfile.lock (100%) diff --git a/Makefile b/Makefile index 41e59d55bc2..223422f8344 100644 --- a/Makefile +++ b/Makefile @@ -83,7 +83,7 @@ build/scorecard-test build/scorecard-test-kuttl build/custom-scorecard-tests: # Convenience wrapper for building all remotely hosted images. .PHONY: image-build # TODO(asmacdo) add 2.11-preview -IMAGE_TARGET_LIST = operator-sdk helm-operator ansible-operator/2.9 Oscorecard-test scorecard-test-kuttl +IMAGE_TARGET_LIST = operator-sdk helm-operator ansible-operator/2.9 scorecard-test scorecard-test-kuttl image-build: $(foreach i,$(IMAGE_TARGET_LIST),image/$(i)) ## Build all images. # Build an image. diff --git a/images/ansible-operator/2.11/Dockerfile b/images/ansible-operator-2.11-preview/Dockerfile similarity index 100% rename from images/ansible-operator/2.11/Dockerfile rename to images/ansible-operator-2.11-preview/Dockerfile diff --git a/images/ansible-operator/2.11/Pipfile b/images/ansible-operator-2.11-preview/Pipfile similarity index 100% rename from images/ansible-operator/2.11/Pipfile rename to images/ansible-operator-2.11-preview/Pipfile diff --git a/images/ansible-operator/2.11/Pipfile.lock b/images/ansible-operator-2.11-preview/Pipfile.lock similarity index 100% rename from images/ansible-operator/2.11/Pipfile.lock rename to images/ansible-operator-2.11-preview/Pipfile.lock diff --git a/images/ansible-operator/2.9/Dockerfile b/images/ansible-operator/Dockerfile similarity index 100% rename from images/ansible-operator/2.9/Dockerfile rename to images/ansible-operator/Dockerfile diff --git a/images/ansible-operator/2.9/Pipfile b/images/ansible-operator/Pipfile similarity index 100% rename from images/ansible-operator/2.9/Pipfile rename to images/ansible-operator/Pipfile diff --git a/images/ansible-operator/2.9/Pipfile.lock b/images/ansible-operator/Pipfile.lock similarity index 100% rename from images/ansible-operator/2.9/Pipfile.lock rename to images/ansible-operator/Pipfile.lock From b046127125dbe34f7f5926614a8e8dfa633c3173 Mon Sep 17 00:00:00 2001 From: austin Date: Wed, 3 Nov 2021 16:54:01 -0400 Subject: [PATCH 06/12] fixup: fix makefile imagebuild dep Signed-off-by: austin --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 223422f8344..484ed0bf5e8 100644 --- a/Makefile +++ b/Makefile @@ -167,10 +167,10 @@ test-e2e:: $(e2e_tests) ## Run e2e tests test-e2e-go:: image/custom-scorecard-tests ## Run Go e2e tests go test ./test/e2e/go -v -ginkgo.v -test-e2e-ansible:: image/ansible-operator/2.9 ## Run Ansible e2e tests +test-e2e-ansible:: image/ansible-operator ## Run Ansible e2e tests go test -count=1 ./internal/ansible/proxy/... go test ./test/e2e/ansible -v -ginkgo.v -test-e2e-ansible-molecule:: image/ansible-operator/2.9 ## Run molecule-based Ansible e2e tests +test-e2e-ansible-molecule:: image/ansible-operator ## Run molecule-based Ansible e2e tests go run ./hack/generate/samples/molecule/generate.go ./hack/tests/e2e-ansible-molecule.sh test-e2e-helm:: image/helm-operator ## Run Helm e2e tests From 6d9a01710a8a495fd1d407d497725328f1e2bc93 Mon Sep 17 00:00:00 2001 From: austin Date: Wed, 3 Nov 2021 17:32:53 -0400 Subject: [PATCH 07/12] fixup: more tweaks Signed-off-by: austin --- .github/workflows/deploy.yml | 2 +- Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 58c9d85cb9e..92329322970 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -132,7 +132,7 @@ jobs: - name: build and push ansible 2.9 uses: docker/build-push-action@v2 with: - file: ./images/ansible-operator/2.9/Dockerfile + file: ./images/ansible-operator/Dockerfile context: . platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x # Push on tag, or master or latest branch push. diff --git a/Makefile b/Makefile index 484ed0bf5e8..ba20734027d 100644 --- a/Makefile +++ b/Makefile @@ -83,7 +83,7 @@ build/scorecard-test build/scorecard-test-kuttl build/custom-scorecard-tests: # Convenience wrapper for building all remotely hosted images. .PHONY: image-build # TODO(asmacdo) add 2.11-preview -IMAGE_TARGET_LIST = operator-sdk helm-operator ansible-operator/2.9 scorecard-test scorecard-test-kuttl +IMAGE_TARGET_LIST = operator-sdk helm-operator ansible-operator scorecard-test scorecard-test-kuttl image-build: $(foreach i,$(IMAGE_TARGET_LIST),image/$(i)) ## Build all images. # Build an image. From 2b681a6d7273e2eba5f6c52e2eb772df36ca0aa2 Mon Sep 17 00:00:00 2001 From: austin Date: Wed, 3 Nov 2021 18:12:12 -0400 Subject: [PATCH 08/12] fixup: action to use 2.11 dir Signed-off-by: austin --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 92329322970..6ac9083972e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -142,7 +142,7 @@ jobs: - name: build and push ansible 2.11 uses: docker/build-push-action@v2 with: - file: ./images/ansible-operator/2.11/Dockerfile + file: ./images/ansible-operator-2.11-preview/Dockerfile context: . platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x # Push on tag, or master or latest branch push. From 633181aefaf70bfe30ffcb4dcfdf479b3898a62c Mon Sep 17 00:00:00 2001 From: austin Date: Thu, 4 Nov 2021 10:30:10 -0400 Subject: [PATCH 09/12] first draft deploy-manual Signed-off-by: austin --- .github/workflows/deploy-manual.yml | 67 +++++++++++++++++++++++++---- 1 file changed, 58 insertions(+), 9 deletions(-) diff --git a/.github/workflows/deploy-manual.yml b/.github/workflows/deploy-manual.yml index 781b49caf67..7dffeadbdd6 100644 --- a/.github/workflows/deploy-manual.yml +++ b/.github/workflows/deploy-manual.yml @@ -6,6 +6,9 @@ on: ansible_operator_base_tag: description: ansible-operator-base image tag, ex. "6e1b47e6ca7c507b8ecf197a8edcd412dd64d85d" required: false + ansible_operator_211_base_tag: + description: ansible-operator-2.11-preview-base image tag, ex. "6e1b47e6ca7c507b8ecf197a8edcd412dd64d85d" + required: false jobs: # Build the ansible-operator-base image. @@ -32,9 +35,8 @@ jobs: with: fetch-depth: 1 - # TODO(asmacdo) add 2.11-preview-base - name: create 2.9-base tag - id: tag + id: 29_base_tag run: | set -e # TODO(asmacdo) @@ -47,38 +49,85 @@ jobs: echo ::set-output name=tag::${IMG}:${TAG} echo ::set-output name=git_commit::${GIT_COMMIT} - - name: build and push + - name: create 2.11-base tag + id: 211_base_tag + run: | + set -e + # TODO(asmacdo) + IMG=quay.io/${{ github.repository_owner }}/ansible-operator-2.11-preview-base + TAG="${{ github.event.inputs.ansible_operator_211_base_tag }}" + if [[ "$TAG" == "" ]]; then + TAG="$(git branch --show-current)-${GIT_COMMIT}" + fi + echo ::set-output name=tag::${IMG}:${TAG} + echo ::set-output name=git_commit::${GIT_COMMIT} + + - name: build and push 2.9 + uses: docker/build-push-action@v2 + with: + file: ./images/ansible-operator/base.Dockerfile + context: ./images/ansible-operator + platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x + push: true + tags: ${{ steps.tag.outputs.29_base_tag }} + build-args: | + GIT_COMMIT=${{ steps.tag.outputs.git_commit }} + ANSIBLE_VERSION=2.9 + + - name: build and push 2.11 uses: docker/build-push-action@v2 with: file: ./images/ansible-operator/base.Dockerfile context: ./images/ansible-operator platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x push: true - tags: ${{ steps.tag.outputs.tag }} + tags: ${{ steps.tag.outputs.211_base_tag }} build-args: | GIT_COMMIT=${{ steps.tag.outputs.git_commit }} + ANSIBLE_VERSION=2.11 # This change will be staged and committed in the PR pushed below. # The script below will fail if no change was made. - # TODO(asmacdo) add base of 2.11-preview - name: update base of ansible-operator id: update run: | set -ex - sed -i -E 's|FROM quay\.io/operator-framework/ansible-operator-base:.+|FROM ${{ steps.tag.outputs.tag }}|g' images/ansible-operator/Dockerfile + sed -i -E 's|FROM quay\.io/operator-framework/ansible-operator-base:.+|FROM ${{ steps.tag.outputs.29_base_tag }}|g' images/ansible-operator/Dockerfile git diff --exit-code --quiet && echo "Failed to update images/ansible-operator/Dockerfile" && exit 1 REF="${{ github.event.ref }}" echo ::set-output name=branch_name::"${REF##*/}" - # TODO(asmacdo) add base of 2.11-preview - name: create PR uses: peter-evans/create-pull-request@v3 with: - title: "[${{ steps.update.outputs.branch_name }}] image(ansible-operator): bump base to ${{ steps.tag.outputs.tag }}" + title: "[${{ steps.update.outputs.branch_name }}] image(ansible-operator): bump base to ${{ steps.tag.outputs.29_base_tag }}" commit-message: | - [${{ steps.update.outputs.branch_name }}] image(ansible-operator): bump base to ${{ steps.tag.outputs.tag }} + [${{ steps.update.outputs.branch_name }}] image(ansible-operator): bump base to ${{ steps.tag.outputs.29_base_tag }} Signed-off-by: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> body: "New ansible-operator-base image built by https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" delete-branch: true branch-suffix: short-commit-hash + + # This change will be staged and committed in the PR pushed below. + # The script below will fail if no change was made. + - name: update base of ansible-operator-2.11-preview + id: update + run: | + set -ex + sed -i -E 's|FROM quay\.io/operator-framework/ansible-operator-2.11-preview-base:.+|FROM ${{ steps.tag.outputs.211_base_tag }}|g' images/ansible-operator/Dockerfile + git diff --exit-code --quiet && echo "Failed to update images/ansible-operator-11-preview-base/Dockerfile" && exit 1 + REF="${{ github.event.ref }}" + echo ::set-output name=branch_name::"${REF##*/}" + + - name: create PR + uses: peter-evans/create-pull-request@v3 + with: + title: "[${{ steps.update.outputs.branch_name }}] image(ansible-operator-2.11-preview): bump base to ${{ steps.tag.outputs.211_base_tag }}" + commit-message: | + [${{ steps.update.outputs.branch_name }}] image(ansible-operator): bump base to ${{ steps.tag.outputs.211_base_tag }} + + Signed-off-by: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> + body: "New ansible-operator-2.11-preview-base image built by https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" + delete-branch: true + branch-suffix: short-commit-hash From f9fb6458394c77f235e869e61882f6587604cfaf Mon Sep 17 00:00:00 2001 From: austin Date: Thu, 4 Nov 2021 17:09:50 -0400 Subject: [PATCH 10/12] finish full separation of 2.9 and 2.11 dirs Signed-off-by: austin --- .github/workflows/deploy-manual.yml | 9 ++-- .github/workflows/deploy.yml | 44 ++----------------- Makefile | 11 ++++- .../base.Dockerfile | 43 ++++++++++++++++++ images/ansible-operator/base.Dockerfile | 3 +- 5 files changed, 60 insertions(+), 50 deletions(-) create mode 100644 images/ansible-operator-2.11-preview/base.Dockerfile diff --git a/.github/workflows/deploy-manual.yml b/.github/workflows/deploy-manual.yml index 7dffeadbdd6..a82c68f61ed 100644 --- a/.github/workflows/deploy-manual.yml +++ b/.github/workflows/deploy-manual.yml @@ -35,11 +35,11 @@ jobs: with: fetch-depth: 1 + # Copied this for 2.11 rather than use a matrix because eventually 2.11 will be default and this will be removed. - name: create 2.9-base tag id: 29_base_tag run: | set -e - # TODO(asmacdo) IMG=quay.io/${{ github.repository_owner }}/ansible-operator-base TAG="${{ github.event.inputs.ansible_operator_base_tag }}" GIT_COMMIT=$(git rev-parse HEAD) @@ -53,7 +53,6 @@ jobs: id: 211_base_tag run: | set -e - # TODO(asmacdo) IMG=quay.io/${{ github.repository_owner }}/ansible-operator-2.11-preview-base TAG="${{ github.event.inputs.ansible_operator_211_base_tag }}" if [[ "$TAG" == "" ]]; then @@ -88,7 +87,7 @@ jobs: # This change will be staged and committed in the PR pushed below. # The script below will fail if no change was made. - - name: update base of ansible-operator + - name: update base of ansible-operator 2.9 id: update run: | set -ex @@ -97,7 +96,7 @@ jobs: REF="${{ github.event.ref }}" echo ::set-output name=branch_name::"${REF##*/}" - - name: create PR + - name: create PR for ansible-operator 2.9 Dockerfile uses: peter-evans/create-pull-request@v3 with: title: "[${{ steps.update.outputs.branch_name }}] image(ansible-operator): bump base to ${{ steps.tag.outputs.29_base_tag }}" @@ -120,7 +119,7 @@ jobs: REF="${{ github.event.ref }}" echo ::set-output name=branch_name::"${REF##*/}" - - name: create PR + - name: create PR for ansible-operator-2.11-preview Dockerfile uses: peter-evans/create-pull-request@v3 with: title: "[${{ steps.update.outputs.branch_name }}] image(ansible-operator-2.11-preview): bump base to ${{ steps.tag.outputs.211_base_tag }}" diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 6ac9083972e..aec516aa1ae 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -72,7 +72,7 @@ jobs: environment: deploy strategy: matrix: - id: ["operator-sdk", "helm-operator", "scorecard-test"] + id: ["operator-sdk", "helm-operator", "scorecard-test", "ansible-operator", "ansible-operator-2.11-preview"] steps: - name: set up qemu @@ -98,25 +98,7 @@ jobs: - name: create tags id: tags run: | - # TODO(asmacdo) github.repository_owner is wrong. This should be a quay account, `operator-framework` happens to be the same in - # gh and quay. - IMG=quay.io/${{ github.repository_owner }}/${{ matrix.id }} - echo ::set-output name=tags::$(.github/workflows/get_image_tags.sh "$IMG" "v") - - - name: create ansible 2.9 tag - id: ansible-29-tags - run: | - # TODO(asmacdo) github.repository_owner is wrong. This should be a quay account, `operator-framework` happens to be the same in - # gh and quay. - IMG=quay.io/${{ github.repository_owner }}/ansible-operator - echo ::set-output name=tags::$(.github/workflows/get_image_tags.sh "$IMG" "v") - - - name: create ansible 2.11 tag - id: ansible-211-tags - run: | - # TODO(asmacdo) github.repository_owner is wrong. This should be a quay account, `operator-framework` happens to be the same in - # gh and quay. - IMG=quay.io/${{ github.repository_owner }}/ansible-operator-2.11-preview + IMG=quay.io/${{ secrets.QUAY_USERNAME }}/${{ matrix.id }} echo ::set-output name=tags::$(.github/workflows/get_image_tags.sh "$IMG" "v") - name: build and push @@ -128,27 +110,7 @@ jobs: # Push on tag, or master or latest branch push. push: ${{ (github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/latest')) }} tags: ${{ steps.tags.outputs.tags }} - - - name: build and push ansible 2.9 - uses: docker/build-push-action@v2 - with: - file: ./images/ansible-operator/Dockerfile - context: . - platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x - # Push on tag, or master or latest branch push. - push: ${{ (github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/latest')) }} - tags: ${{ steps.ansible-29-tags.outputs.tags }} - - - name: build and push ansible 2.11 - uses: docker/build-push-action@v2 - with: - file: ./images/ansible-operator-2.11-preview/Dockerfile - context: . - platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x - # Push on tag, or master or latest branch push. - push: ${{ (github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/latest')) }} - tags: ${{ steps.ansible-211-tags.outputs.tags }} - + # # scorecard-test-kuttl image build job. Only pushes if a tag with prefix "scorecard-kuttl/v" is present. image-scorecard-test-kuttl: name: image-scorecard-test-kuttl diff --git a/Makefile b/Makefile index ba20734027d..a254b14a671 100644 --- a/Makefile +++ b/Makefile @@ -82,10 +82,14 @@ build/scorecard-test build/scorecard-test-kuttl build/custom-scorecard-tests: # Convenience wrapper for building all remotely hosted images. .PHONY: image-build -# TODO(asmacdo) add 2.11-preview -IMAGE_TARGET_LIST = operator-sdk helm-operator ansible-operator scorecard-test scorecard-test-kuttl +IMAGE_TARGET_LIST = operator-sdk helm-operator ansible-operator ansible-operator-2.11-preview scorecard-test scorecard-test-kuttl image-build: $(foreach i,$(IMAGE_TARGET_LIST),image/$(i)) ## Build all images. +# Convenience wrapper for building dependency base images. +.PHONY: image-build-base +IMAGE_BASE_TARGET_LIST = ansible-operator ansible-operator-2.11-preview +image-build-base: $(foreach i,$(IMAGE_BASE_TARGET_LIST),image-base/$(i)) ## Build all images. + # Build an image. BUILD_IMAGE_REPO = quay.io/operator-framework # When running in a terminal, this will be false. If true (ex. CI), print plain progress. @@ -96,6 +100,9 @@ image/%: export DOCKER_CLI_EXPERIMENTAL = enabled image/%: docker buildx build $(DOCKER_PROGRESS) -t $(BUILD_IMAGE_REPO)/$*:dev -f ./images/$*/Dockerfile --load . +image-base/%: export DOCKER_CLI_EXPERIMENTAL = enabled +image-base/%: + docker buildx build $(DOCKER_PROGRESS) -t $(BUILD_IMAGE_REPO)/$*:dev -f ./images/$*/base.Dockerfile --load . ##@ Release .PHONY: release diff --git a/images/ansible-operator-2.11-preview/base.Dockerfile b/images/ansible-operator-2.11-preview/base.Dockerfile new file mode 100644 index 00000000000..c1e4be65294 --- /dev/null +++ b/images/ansible-operator-2.11-preview/base.Dockerfile @@ -0,0 +1,43 @@ +# This Dockerfile defines the base image for the ansible-operator image. +# It is built with dependencies that take a while to download, thus speeding +# up ansible deploy jobs. + +FROM registry.access.redhat.com/ubi8/ubi:8.4 +ARG TARGETARCH + +# Label this image with the repo and commit that built it, for freshmaking purposes. +ARG GIT_COMMIT=devel +LABEL git_commit=$GIT_COMMIT + +RUN mkdir -p /etc/ansible \ + && echo "localhost ansible_connection=local" > /etc/ansible/hosts \ + && echo '[defaults]' > /etc/ansible/ansible.cfg \ + && echo 'roles_path = /opt/ansible/roles' >> /etc/ansible/ansible.cfg \ + && echo 'library = /usr/share/ansible/openshift' >> /etc/ansible/ansible.cfg + + +# Copy python dependencies (including ansible) to be installed using Pipenv +COPY images/ansible-operator-2.11-preview/Pipfile* ./ +# Instruct pip(env) not to keep a cache of installed packages, +# to install into the global site-packages and +# to clear the pipenv cache as well +ENV PIP_NO_CACHE_DIR=1 \ + PIPENV_SYSTEM=1 \ + PIPENV_CLEAR=1 +# Ensure fresh metadata rather than cached metadata, install system and pip python deps, +# and remove those not needed at runtime. +# pip3~=21.1 fixes a vulnerability described in https://github.com/pypa/pip/pull/9827. +RUN yum clean all && rm -rf /var/cache/yum/* \ + && yum update -y \ + && yum install -y libffi-devel openssl-devel python38-devel gcc python38-pip python38-setuptools \ + && pip3 install --upgrade pip~=21.1.0 \ + && pip3 install pipenv==2020.11.15 \ + && pipenv install --deploy \ + && pipenv check \ + && yum remove -y gcc libffi-devel openssl-devel python38-devel \ + && yum clean all \ + && rm -rf /var/cache/yum + +ENV TINI_VERSION=v0.19.0 +RUN curl -L -o /tini https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${TARGETARCH} \ + && chmod +x /tini && /tini --version diff --git a/images/ansible-operator/base.Dockerfile b/images/ansible-operator/base.Dockerfile index c3914d37239..0499bd30e81 100644 --- a/images/ansible-operator/base.Dockerfile +++ b/images/ansible-operator/base.Dockerfile @@ -4,7 +4,6 @@ FROM registry.access.redhat.com/ubi8/ubi:8.4 ARG TARGETARCH -ARG ANSIBLE_VERSION=2.9 # Label this image with the repo and commit that built it, for freshmaking purposes. ARG GIT_COMMIT=devel @@ -18,7 +17,7 @@ RUN mkdir -p /etc/ansible \ # Copy python dependencies (including ansible) to be installed using Pipenv -COPY images/ansible-operator/${ANSIBLE_VERSION}/Pipfile* ./ +COPY images/ansible-operator/Pipfile* ./ # Instruct pip(env) not to keep a cache of installed packages, # to install into the global site-packages and # to clear the pipenv cache as well From 085ffec9c550f0ea194b7e3eb4d1ab7d86e68f25 Mon Sep 17 00:00:00 2001 From: austin Date: Thu, 4 Nov 2021 17:25:51 -0400 Subject: [PATCH 11/12] fixup: s/secret/github/ Signed-off-by: austin --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index aec516aa1ae..4eaca7fbd7d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -98,7 +98,7 @@ jobs: - name: create tags id: tags run: | - IMG=quay.io/${{ secrets.QUAY_USERNAME }}/${{ matrix.id }} + IMG=quay.io/${{ github.repository_owner }}/${{ matrix.id }} echo ::set-output name=tags::$(.github/workflows/get_image_tags.sh "$IMG" "v") - name: build and push From 30a49d6a0961afa52a659b2bf8d159a7321e7640 Mon Sep 17 00:00:00 2001 From: austin Date: Fri, 5 Nov 2021 09:21:46 -0400 Subject: [PATCH 12/12] fixup: cleanup Signed-off-by: austin --- .github/workflows/deploy-manual.yml | 10 ++++------ .github/workflows/deploy.yml | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy-manual.yml b/.github/workflows/deploy-manual.yml index a82c68f61ed..3cddd15b9b6 100644 --- a/.github/workflows/deploy-manual.yml +++ b/.github/workflows/deploy-manual.yml @@ -61,7 +61,7 @@ jobs: echo ::set-output name=tag::${IMG}:${TAG} echo ::set-output name=git_commit::${GIT_COMMIT} - - name: build and push 2.9 + - name: build and push ansible 2.9 dep image uses: docker/build-push-action@v2 with: file: ./images/ansible-operator/base.Dockerfile @@ -71,19 +71,17 @@ jobs: tags: ${{ steps.tag.outputs.29_base_tag }} build-args: | GIT_COMMIT=${{ steps.tag.outputs.git_commit }} - ANSIBLE_VERSION=2.9 - - name: build and push 2.11 + - name: build and push ansible 2.11 dep image uses: docker/build-push-action@v2 with: - file: ./images/ansible-operator/base.Dockerfile + file: ./images/ansible-operator-2.11-preview/base.Dockerfile context: ./images/ansible-operator platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x push: true tags: ${{ steps.tag.outputs.211_base_tag }} build-args: | GIT_COMMIT=${{ steps.tag.outputs.git_commit }} - ANSIBLE_VERSION=2.11 # This change will be staged and committed in the PR pushed below. # The script below will fail if no change was made. @@ -124,7 +122,7 @@ jobs: with: title: "[${{ steps.update.outputs.branch_name }}] image(ansible-operator-2.11-preview): bump base to ${{ steps.tag.outputs.211_base_tag }}" commit-message: | - [${{ steps.update.outputs.branch_name }}] image(ansible-operator): bump base to ${{ steps.tag.outputs.211_base_tag }} + [${{ steps.update.outputs.branch_name }}] image(ansible-operator-2.11-preview): bump base to ${{ steps.tag.outputs.211_base_tag }} Signed-off-by: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> body: "New ansible-operator-2.11-preview-base image built by https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4eaca7fbd7d..80cbdff9816 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -110,7 +110,7 @@ jobs: # Push on tag, or master or latest branch push. push: ${{ (github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/latest')) }} tags: ${{ steps.tags.outputs.tags }} - # + # scorecard-test-kuttl image build job. Only pushes if a tag with prefix "scorecard-kuttl/v" is present. image-scorecard-test-kuttl: name: image-scorecard-test-kuttl