From 6d916ec5ec42ef5d1dba9731f765a898be03524f Mon Sep 17 00:00:00 2001 From: Shane McDonald Date: Wed, 31 Mar 2021 15:15:50 -0400 Subject: [PATCH 1/3] Use latest receptor release --- Containerfile | 2 +- execution-environment.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Containerfile b/Containerfile index d21774c..6acf101 100644 --- a/Containerfile +++ b/Containerfile @@ -22,7 +22,7 @@ COPY --from=galaxy /usr/share/ansible /usr/share/ansible COPY --from=builder /output/ /output/ RUN /output/install-from-bindep && rm -rf /output/wheels RUN alternatives --set python /usr/bin/python3 -COPY --from=quay.io/project-receptor/receptor:0.9.6 /usr/bin/receptor /usr/bin/receptor +COPY --from=quay.io/project-receptor/receptor:0.9.7 /usr/bin/receptor /usr/bin/receptor RUN mkdir -p /var/run/receptor ADD run.sh /run.sh CMD /run.sh diff --git a/execution-environment.yml b/execution-environment.yml index 660a825..996fa7b 100644 --- a/execution-environment.yml +++ b/execution-environment.yml @@ -6,7 +6,7 @@ dependencies: additional_build_steps: append: - RUN alternatives --set python /usr/bin/python3 - - COPY --from=quay.io/project-receptor/receptor:0.9.6 /usr/bin/receptor /usr/bin/receptor + - COPY --from=quay.io/project-receptor/receptor:0.9.7 /usr/bin/receptor /usr/bin/receptor - RUN mkdir -p /var/run/receptor - ADD run.sh /run.sh - CMD /run.sh From e2e7ee76cf2ebe3c225eafbb4dda09ccf1bb7e6c Mon Sep 17 00:00:00 2001 From: Shane McDonald Date: Wed, 31 Mar 2021 15:15:59 -0400 Subject: [PATCH 2/3] Use released ovirt collection --- _build/requirements.yml | 3 +-- _build/requirements_combined.txt | 6 +++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/_build/requirements.yml b/_build/requirements.yml index 753d038..f750aaf 100644 --- a/_build/requirements.yml +++ b/_build/requirements.yml @@ -12,8 +12,7 @@ collections: version: ee_req_install type: git - name: community.vmware # has requirements.txt, but may add pyvcloud - - name: https://github.com/shanemcd/ovirt-ansible-collection - type: git + - name: ovirt.ovirt - name: https://github.com/ansible-collections/community.kubernetes.git type: git # adds openshift python lib diff --git a/_build/requirements_combined.txt b/_build/requirements_combined.txt index 5ae110f..53877a0 100644 --- a/_build/requirements_combined.txt +++ b/_build/requirements_combined.txt @@ -17,11 +17,13 @@ azure-mgmt-compute==10.0.0 # from collection azure.azcollection azure-mgmt-containerinstance==1.4.0 # from collection azure.azcollection azure-mgmt-containerregistry==2.0.0 # from collection azure.azcollection azure-mgmt-containerservice==9.1.0 # from collection azure.azcollection +azure-mgmt-datalake-store==0.5.0 # from collection azure.azcollection azure-mgmt-dns==2.1.0 # from collection azure.azcollection azure-mgmt-keyvault==1.1.0 # from collection azure.azcollection azure-mgmt-marketplaceordering==0.1.0 # from collection azure.azcollection azure-mgmt-monitor==0.5.2 # from collection azure.azcollection azure-mgmt-managedservices==1.0.0 # from collection azure.azcollection +azure-mgmt-managementgroups==0.2.0 # from collection azure.azcollection azure-mgmt-network==10.2.0 # from collection azure.azcollection azure-mgmt-nspkg==2.0.0 # from collection azure.azcollection azure-mgmt-privatedns==0.1.0 # from collection azure.azcollection @@ -45,6 +47,8 @@ azure-mgmt-devtestlabs==3.0.0 # from collection azure.azcollection azure-mgmt-loganalytics==1.0.0 # from collection azure.azcollection azure-mgmt-automation==0.1.1 # from collection azure.azcollection azure-mgmt-iothub==0.7.0 # from collection azure.azcollection +azure-mgmt-recoveryservices==0.4.0 # from collection azure.azcollection +azure-mgmt-recoveryservicesbackup==0.6.0 # from collection azure.azcollection openshift>=0.6.2 # from collection community.kubernetes requests-oauthlib # from collection community.kubernetes pyvmomi # from collection community.vmware @@ -53,5 +57,5 @@ google-auth # from collection google.cloud openstacksdk>=0.44 # from collection openstack.cloud keystoneauth1>=3.4.0 # from collection openstack.cloud jsonpatch # from collection openstack.cloud -ovirt-engine-sdk-python>=4.4.0 # from collection ovirt.ovirt +ovirt-engine-sdk-python>=4.4.10 # from collection ovirt.ovirt ipaddress # from collection theforeman.foreman \ No newline at end of file From 9e7f5d3fbe7a7a076cb9c6906ea609bbfb3a57f1 Mon Sep 17 00:00:00 2001 From: Shane McDonald Date: Mon, 5 Apr 2021 15:16:27 -0400 Subject: [PATCH 3/3] Add GitHub Actions --- .github/workflows/ci.yml | 72 +++++++++++++++++++++++++++++++++++ .github/workflows/release.yml | 37 ++++++++++++++++++ .zuul.d/jobs.yaml | 2 +- tox.ini | 18 +++++++-- 4 files changed, 124 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e538235 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,72 @@ +--- + +name: CI + +on: + pull_request: + branches: [devel] + + push: + branches: [devel] + +jobs: + podman: + runs-on: ubuntu-20.04 + name: Podman + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-python@v2 + with: + python-version: "3.8" + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install tox + + - name: Build EE with Podman + run: | + tox -e podman + + docker: + runs-on: ubuntu-20.04 + name: Docker + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-python@v2 + with: + python-version: "3.8" + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install tox + + - name: Build EE with Docker + env: + DOCKER_BUILDKIT: 1 + run: | + tox -e docker + + check_diff: + runs-on: ubuntu-20.04 + name: Ensure build context is up-to-date + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-python@v2 + with: + python-version: "3.8" + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install tox + + - name: Run + env: + DOCKER_BUILDKIT: 1 + run: | + tox -e check-diff diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..0a2c7ee --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,37 @@ +name: Release + +on: + release: + types: + - created + +jobs: + release: + runs-on: ubuntu-20.04 + name: Release + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-python@v2 + with: + python-version: "3.8" + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install tox + + - name: Build image + env: + DOCKER_BUILDKIT: 1 + run: | + tox -e docker -- --tag=awx-ee:${{ github.event.release.tag_name }} + + - name: Push To Quay + uses: redhat-actions/push-to-registry@v2.1.1 + with: + image: awx-ee + tags: ${{ github.event.release.tag_name }} + registry: quay.io/ansible/ + username: ${{ secrets.QUAY_USERNAME }} + password: ${{ secrets.QUAY_TOKEN }} diff --git a/.zuul.d/jobs.yaml b/.zuul.d/jobs.yaml index c866acc..62b4958 100644 --- a/.zuul.d/jobs.yaml +++ b/.zuul.d/jobs.yaml @@ -16,7 +16,7 @@ - github.com/ansible/ansible-builder nodeset: ubuntu-bionic-2vcpu vars: - tox_envlist: ansible-builder + tox_envlist: check-diff tox_install_siblings: false - job: diff --git a/tox.ini b/tox.ini index ed8b3ad..e773891 100644 --- a/tox.ini +++ b/tox.ini @@ -7,7 +7,7 @@ basepython = python3 install_command = pip install {opts} {packages} deps = -r{toxinidir}/requirements.txt -[testenv:build] +[testenv:podman] passenv = HOME whitelist_external = @@ -16,9 +16,19 @@ commands = /bin/bash -c "podman rmi quay.io/ansible/awx-ee:latest || true" ansible-builder build -v3 -c . -t quay.io/ansible/awx-ee {posargs} -[testenv:ansible-builder] + +[testenv:docker] +passenv = + HOME DOCKER_BUILDKIT +whitelist_external = + true +commands = + /bin/bash -c "podman rmi quay.io/ansible/awx-ee:latest || true" + ansible-builder build -v3 -c . -t quay.io/ansible/awx-ee {posargs} --container-runtime=docker + +[testenv:check-diff] passenv = - {[testenv:build]passenv} + {[testenv:docker]passenv} commands = - {[testenv:build]commands} + {[testenv:docker]commands} {toxinidir}/tools/check_ansible_builder_changed.sh