From 78dac5e18586bdd50334cc56ee3ba822aa5c5157 Mon Sep 17 00:00:00 2001 From: Mohammed Naser Date: Mon, 14 Oct 2024 14:58:26 -0400 Subject: [PATCH] Add last non-platform job --- .github/workflows/molecule.yml | 35 ----------------------- molecule/upload-helm-chart/molecule.yml | 38 ++++++++----------------- molecule/upload-helm-chart/prepare.yml | 33 --------------------- tox.ini | 6 ++++ zuul.d/jobs.yaml | 6 ++++ zuul.d/project.yaml | 4 +++ 6 files changed, 28 insertions(+), 94 deletions(-) delete mode 100644 molecule/upload-helm-chart/prepare.yml diff --git a/.github/workflows/molecule.yml b/.github/workflows/molecule.yml index 4e23bef3..89bc0709 100644 --- a/.github/workflows/molecule.yml +++ b/.github/workflows/molecule.yml @@ -21,41 +21,6 @@ on: - main jobs: - test: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - scenario: - - upload-helm-chart - distro: - - rockylinux9 - - ubuntu2004 - - ubuntu2204 - steps: - - name: Checkout project - uses: actions/checkout@v3 - - - name: Setup Python - uses: actions/setup-python@v2 - with: - python-version: "3.10" - cache: pip - - - name: Install Molecule - run: pip install -r requirements.txt - - - name: Turn off swap - run: sudo swapoff -a - - - name: Bump number of inotify watchers - run: sudo sysctl fs.inotify.max_user_watches=524288 - - - name: Run Molecule - run: molecule test -s ${{ matrix.scenario }} - env: - MOLECULE_DISTRO: ${{ matrix.distro }} - kubernetes: runs-on: ubuntu-latest timeout-minutes: 15 diff --git a/molecule/upload-helm-chart/molecule.yml b/molecule/upload-helm-chart/molecule.yml index a986c4bf..b8f807d2 100644 --- a/molecule/upload-helm-chart/molecule.yml +++ b/molecule/upload-helm-chart/molecule.yml @@ -1,39 +1,25 @@ -# Copyright (c) 2023 VEXXHOST, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. +# Copyright (c) 2024 VEXXHOST, Inc. +# SPDX-License-Identifier: Apache-2.0 dependency: name: galaxy driver: - name: docker + name: default + options: + managed: False + ansible_connection_options: + ansible_become: "true" + ansible_connection: local platforms: - name: instance - image: geerlingguy/docker-${MOLECULE_DISTRO:-ubuntu2204}-ansible:latest - command: ${MOLECULE_DOCKER_COMMAND:-""} - privileged: true - cgroupns_mode: host - pre_build_image: true - environment: - container: docker - security_opts: - - apparmor=unconfined - volumes: - - /sys/fs/cgroup:/sys/fs/cgroup:rw - - /lib/modules:/lib/modules:ro + groups: + - controllers provisioner: name: ansible config_options: connection: pipelining: true + defaults: + callbacks_enabled: ansible.posix.profile_tasks verifier: name: ansible diff --git a/molecule/upload-helm-chart/prepare.yml b/molecule/upload-helm-chart/prepare.yml deleted file mode 100644 index f144066a..00000000 --- a/molecule/upload-helm-chart/prepare.yml +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (c) 2023 VEXXHOST, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -- name: Prepare - hosts: all - become: true - pre_tasks: - - name: Wait for systemd to complete initialization - ansible.builtin.command: systemctl is-system-running - register: systemctl_status - until: > - 'running' in systemctl_status.stdout or - 'degraded' in systemctl_status.stdout - retries: 30 - delay: 5 - changed_when: false - failed_when: systemctl_status.rc > 1 - tasks: - - name: Run APT update - ansible.builtin.apt: - update_cache: yes - when: ansible_facts['pkg_mgr'] == "apt" diff --git a/tox.ini b/tox.ini index 07b2c2ab..a14fb67c 100644 --- a/tox.ini +++ b/tox.ini @@ -37,3 +37,9 @@ deps = {[testenv:molecule-venv]deps} commands = molecule test -s helm + +[testenv:molecule-upload-helm-chart] +deps = + {[testenv:molecule-venv]deps} +commands = + molecule test -s upload-helm-chart diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index 60343092..32134fba 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -31,3 +31,9 @@ parent: ansible-collection-kubernetes-molecule vars: tox_envlist: molecule-helm + +- job: + name: ansible-collection-kubernetes-molecule-upload-helm-chart + parent: ansible-collection-kubernetes-molecule + vars: + tox_envlist: molecule-upload-helm-chart diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml index 5e09e29d..12fe6f15 100644 --- a/zuul.d/project.yaml +++ b/zuul.d/project.yaml @@ -19,12 +19,16 @@ - ansible-collection-kubernetes-linters - ansible-collection-kubernetes-molecule-cluster-api - ansible-collection-kubernetes-molecule-cluster-api-upgrade + - ansible-collection-kubernetes-molecule-helm + - ansible-collection-kubernetes-molecule-upload-helm-chart - build-ansible-collection gate: jobs: - ansible-collection-kubernetes-linters - ansible-collection-kubernetes-molecule-cluster-api - ansible-collection-kubernetes-molecule-cluster-api-upgrade + - ansible-collection-kubernetes-molecule-helm + - ansible-collection-kubernetes-molecule-upload-helm-chart - build-ansible-collection release: jobs: