From 21a91767ec36bd3c92ddaa792cc3369a54b08264 Mon Sep 17 00:00:00 2001 From: Abhijeet Kasurde Date: Mon, 3 May 2021 20:27:20 +0530 Subject: [PATCH] test2 Signed-off-by: Abhijeet Kasurde --- .github/workflows/ci.yml | 398 ++++++++++++++++++--------------------- galaxy.yml | 4 +- meta/runtime.yml | 29 +-- 3 files changed, 196 insertions(+), 235 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 476e92e8..54dc73b7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,222 +33,182 @@ jobs: run: make test-sanity PYTHON_VERSION=${{ matrix.python_version }} working-directory: ./ansible_collections/community/kubernetes - integration: - runs-on: ubuntu-latest - strategy: - matrix: - # Our old integration tests fail under newer Python versions. - python_version: ['3.6'] - steps: - - name: Check out code - uses: actions/checkout@v2 - with: - path: ansible_collections/community/kubernetes - - - name: Set up Python ${{ matrix.python_version }} - uses: actions/setup-python@v1 - with: - python-version: ${{ matrix.python_version }} - - - name: Install ansible base (devel branch) - run: pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check - - - name: Install Collection dependency - cloud.common - run: ansible-galaxy collection install cloud.common - working-directory: ./ansible_collections/community/kubernetes - - - name: Install Collection dependency - kubernetes.core - run: ansible-galaxy collection install kubernetes.core - working-directory: ./ansible_collections/community/kubernetes - - - name: Run integration tests on Python ${{ matrix.python_version }} - run: make test-integration PYTHON_VERSION=${{ matrix.python_version }} - working-directory: ./ansible_collections/community/kubernetes - - - name: Generate coverage report. - run: ansible-test coverage xml -v --requirements --group-by command --group-by version - working-directory: ./ansible_collections/community/kubernetes - - - uses: codecov/codecov-action@v1 - with: - fail_ci_if_error: false - - molecule: - runs-on: ubuntu-latest - strategy: - matrix: - python_version: ['3.7'] - steps: - - name: Check out code - uses: actions/checkout@v2 - with: - path: ansible_collections/community/kubernetes - - - name: Set up KinD cluster - uses: engineerd/setup-kind@v0.5.0 - - - name: Set up Python ${{ matrix.python_version }} - uses: actions/setup-python@v1 - with: - python-version: ${{ matrix.python_version }} - - # The 3.3.0 release of molecule introduced a breaking change. See - # https://github.com/ansible-community/molecule/issues/3083 - - name: Install molecule and openshift dependencies - run: pip install ansible "molecule<3.3.0" yamllint openshift flake8 - - # The latest release doesn't work with Molecule currently. - # See: https://github.com/ansible-community/molecule/issues/2757 - # - name: Install ansible base, latest release. - # run: | - # pip uninstall -y ansible - # pip install --pre ansible-base - - # The devel branch doesn't work with Molecule currently. - # See: https://github.com/ansible-community/molecule/issues/2757 - # - name: Install ansible base (devel branch) - # run: | - # pip uninstall -y ansible - # pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check - - - name: Install Collection dependency - cloud.common - run: ansible-galaxy collection install cloud.common - working-directory: ./ansible_collections/community/kubernetes - - - name: Install Collection dependency - kubernetes.core - run: ansible-galaxy collection install kubernetes.core - working-directory: ./ansible_collections/community/kubernetes - - - name: Create default collection path symlink - run: | - mkdir -p /home/runner/.ansible - ln -s /home/runner/work/kubernetes/kubernetes /home/runner/.ansible/collections - - - name: Run molecule default test scenario - run: make test-molecule - working-directory: ./ansible_collections/community/kubernetes - - unit: - runs-on: ubuntu-latest - strategy: - matrix: - python_version: ['2.7', '3.7'] - steps: - - name: Check out code - uses: actions/checkout@v2 - with: - path: ansible_collections/community/kubernetes - - - name: Set up Python ${{ matrix.python_version }} - uses: actions/setup-python@v1 - with: - python-version: ${{ matrix.python_version }} - - - name: Install ansible base (devel branch) - run: pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check - - - name: Run unit tests on Python ${{ matrix.python_version }} - run: make test-unit PYTHON_VERSION=${{ matrix.python_version }} - working-directory: ./ansible_collections/community/kubernetes - - downstream-sanity-29: - runs-on: ubuntu-latest - strategy: - matrix: - python_version: ['3.7'] - steps: - - name: Check out code - uses: actions/checkout@v2 - with: - path: ansible_collections/community/kubernetes - - - name: Set up Python ${{ matrix.python_version }} - uses: actions/setup-python@v1 - with: - python-version: ${{ matrix.python_version }} - - - name: Install ansible base (devel branch) - run: pip install "ansible>=2.9.0,<2.10.0" - - - name: Install Collection dependency - cloud.common - run: ansible-galaxy collection install cloud.common - working-directory: ./ansible_collections/community/kubernetes - - - name: Install Collection dependency - kubernetes.core - run: ansible-galaxy collection install kubernetes.core - working-directory: ./ansible_collections/community/kubernetes - - - name: Run sanity tests on Python ${{ matrix.python_version }} - run: make downstream-test-sanity - working-directory: ./ansible_collections/community/kubernetes - - downstream-integration-29: - runs-on: ubuntu-latest - strategy: - matrix: - # Our old integration tests fail under newer Python versions. - python_version: ['3.6'] - steps: - - name: Check out code - uses: actions/checkout@v2 - with: - path: ansible_collections/community/kubernetes - - - name: Set up Python ${{ matrix.python_version }} - uses: actions/setup-python@v1 - with: - python-version: ${{ matrix.python_version }} - - - name: Install ansible base (devel branch) - run: pip install "ansible>=2.9.0,<2.10.0" pip==20.3.1 - - - name: Install Collection dependency - cloud.common - run: ansible-galaxy collection install cloud.common - working-directory: ./ansible_collections/community/kubernetes - - - name: Install Collection dependency - kubernetes.core - run: ansible-galaxy collection install kubernetes.core - working-directory: ./ansible_collections/community/kubernetes - - - name: Run integration tests on Python ${{ matrix.python_version }} - run: make downstream-test-integration - working-directory: ./ansible_collections/community/kubernetes - - downstream-molecule-29: - runs-on: ubuntu-latest - strategy: - matrix: - python_version: ['3.7'] - steps: - - name: Check out code - uses: actions/checkout@v2 - with: - path: ansible_collections/community/kubernetes - - - name: Set up KinD cluster - uses: engineerd/setup-kind@v0.5.0 - - - name: Set up Python ${{ matrix.python_version }} - uses: actions/setup-python@v1 - with: - python-version: ${{ matrix.python_version }} - - - name: Install molecule and openshift dependencies - run: pip install "ansible>=2.9.0,<2.10.0" "molecule<3.3.0" yamllint openshift flake8 - - - name: Create default collection path symlink - run: | - mkdir -p /home/runner/.ansible - ln -s /home/runner/work/kubernetes/kubernetes /home/runner/.ansible/collections - - - name: Install Collection dependency - cloud.common - run: ansible-galaxy collection install cloud.common - working-directory: ./ansible_collections/community/kubernetes - - - name: Install Collection dependency - kubernetes.core - run: ansible-galaxy collection install kubernetes.core - working-directory: ./ansible_collections/community/kubernetes - - - name: Run molecule default test scenario - run: make downstream-test-molecule - working-directory: ./ansible_collections/community/kubernetes + # integration: + # runs-on: ubuntu-latest + # strategy: + # matrix: + # # Our old integration tests fail under newer Python versions. + # python_version: ['3.6'] + # steps: + # - name: Check out code + # uses: actions/checkout@v2 + # with: + # path: ansible_collections/community/kubernetes + + # - name: Set up Python ${{ matrix.python_version }} + # uses: actions/setup-python@v1 + # with: + # python-version: ${{ matrix.python_version }} + + # - name: Install ansible base (devel branch) + # run: pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check + + # - name: Run integration tests on Python ${{ matrix.python_version }} + # run: make test-integration PYTHON_VERSION=${{ matrix.python_version }} + # working-directory: ./ansible_collections/community/kubernetes + + # - name: Generate coverage report. + # run: ansible-test coverage xml -v --requirements --group-by command --group-by version + # working-directory: ./ansible_collections/community/kubernetes + + # - uses: codecov/codecov-action@v1 + # with: + # fail_ci_if_error: false + + # molecule: + # runs-on: ubuntu-latest + # strategy: + # matrix: + # python_version: ['3.7'] + # steps: + # - name: Check out code + # uses: actions/checkout@v2 + # with: + # path: ansible_collections/community/kubernetes + + # - name: Set up KinD cluster + # uses: engineerd/setup-kind@v0.5.0 + + # - name: Set up Python ${{ matrix.python_version }} + # uses: actions/setup-python@v1 + # with: + # python-version: ${{ matrix.python_version }} + + # # The 3.3.0 release of molecule introduced a breaking change. See + # # https://github.com/ansible-community/molecule/issues/3083 + # - name: Install molecule and openshift dependencies + # run: pip install ansible "molecule<3.3.0" yamllint openshift flake8 + + # # The latest release doesn't work with Molecule currently. + # # See: https://github.com/ansible-community/molecule/issues/2757 + # # - name: Install ansible base, latest release. + # # run: | + # # pip uninstall -y ansible + # # pip install --pre ansible-base + + # # The devel branch doesn't work with Molecule currently. + # # See: https://github.com/ansible-community/molecule/issues/2757 + # # - name: Install ansible base (devel branch) + # # run: | + # # pip uninstall -y ansible + # # pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check + + # - name: Create default collection path symlink + # run: | + # mkdir -p /home/runner/.ansible + # ln -s /home/runner/work/kubernetes/kubernetes /home/runner/.ansible/collections + + # - name: Run molecule default test scenario + # run: make test-molecule + # working-directory: ./ansible_collections/community/kubernetes + + # unit: + # runs-on: ubuntu-latest + # strategy: + # matrix: + # python_version: ['2.7', '3.7'] + # steps: + # - name: Check out code + # uses: actions/checkout@v2 + # with: + # path: ansible_collections/community/kubernetes + + # - name: Set up Python ${{ matrix.python_version }} + # uses: actions/setup-python@v1 + # with: + # python-version: ${{ matrix.python_version }} + + # - name: Install ansible base (devel branch) + # run: pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check + + # - name: Run unit tests on Python ${{ matrix.python_version }} + # run: make test-unit PYTHON_VERSION=${{ matrix.python_version }} + # working-directory: ./ansible_collections/community/kubernetes + + # downstream-sanity-29: + # runs-on: ubuntu-latest + # strategy: + # matrix: + # python_version: ['3.7'] + # steps: + # - name: Check out code + # uses: actions/checkout@v2 + # with: + # path: ansible_collections/community/kubernetes + + # - name: Set up Python ${{ matrix.python_version }} + # uses: actions/setup-python@v1 + # with: + # python-version: ${{ matrix.python_version }} + + # - name: Install ansible base (devel branch) + # run: pip install "ansible>=2.9.0,<2.10.0" + + # - name: Run sanity tests on Python ${{ matrix.python_version }} + # run: make downstream-test-sanity + # working-directory: ./ansible_collections/community/kubernetes + + # downstream-integration-29: + # runs-on: ubuntu-latest + # strategy: + # matrix: + # # Our old integration tests fail under newer Python versions. + # python_version: ['3.6'] + # steps: + # - name: Check out code + # uses: actions/checkout@v2 + # with: + # path: ansible_collections/community/kubernetes + + # - name: Set up Python ${{ matrix.python_version }} + # uses: actions/setup-python@v1 + # with: + # python-version: ${{ matrix.python_version }} + + # - name: Install ansible base (devel branch) + # run: pip install "ansible>=2.9.0,<2.10.0" pip==20.3.1 + + # - name: Run integration tests on Python ${{ matrix.python_version }} + # run: make downstream-test-integration + # working-directory: ./ansible_collections/community/kubernetes + + # downstream-molecule-29: + # runs-on: ubuntu-latest + # strategy: + # matrix: + # python_version: ['3.7'] + # steps: + # - name: Check out code + # uses: actions/checkout@v2 + # with: + # path: ansible_collections/community/kubernetes + + # - name: Set up KinD cluster + # uses: engineerd/setup-kind@v0.5.0 + + # - name: Set up Python ${{ matrix.python_version }} + # uses: actions/setup-python@v1 + # with: + # python-version: ${{ matrix.python_version }} + + # - name: Install molecule and openshift dependencies + # run: pip install "ansible>=2.9.0,<2.10.0" "molecule<3.3.0" yamllint openshift flake8 + + # - name: Create default collection path symlink + # run: | + # mkdir -p /home/runner/.ansible + # ln -s /home/runner/work/kubernetes/kubernetes /home/runner/.ansible/collections + + # - name: Run molecule default test scenario + # run: make downstream-test-molecule + # working-directory: ./ansible_collections/community/kubernetes diff --git a/galaxy.yml b/galaxy.yml index 45c760a9..f1caac3b 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -9,8 +9,8 @@ authors: - mmazur (https://github.com/mmazur) - jamescassell (https://github.com/jamescassell) dependencies: - cloud.common: '*' - kubernetes.core: '2.0.0' + cloud.common: '*' + kubernetes.core: '>=1.2.0' description: Kubernetes Collection for Ansible. documentation: '' homepage: '' diff --git a/meta/runtime.yml b/meta/runtime.yml index ed47d306..e3d405f5 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -27,43 +27,44 @@ plugin_routing: filter: k8s: redirect: kubernetes.core.k8s - modules: + action: k8s_auth: redirect: community.okd.k8s_auth helm: - redirect: kubernetes.core.helm + redirect: kubernetes.core.k8s_info helm_info: - redirect: kubernetes.core.helm_info + redirect: kubernetes.core.k8s_info helm_plugin: - redirect: kubernetes.core.helm_plugin + redirect: kubernetes.core.k8s_info helm_plugin_info: - redirect: kubernetes.core.helm_plugin_info + redirect: kubernetes.core.k8s_info helm_repository: - redirect: kubernetes.core.helm_repository + redirect: kubernetes.core.k8s_info helm_template: - redirect: kubernetes.core.helm_template + redirect: kubernetes.core.k8s_info k8s: - redirect: kubernetes.core.k8s + redirect: kubernetes.core.k8s_info k8s_cluster_info: - redirect: kubernetes.core.k8s_cluster_info + redirect: kubernetes.core.k8s_info k8s_exec: - redirect: kubernetes.core.k8s_exec + redirect: kubernetes.core.k8s_info k8s_info: redirect: kubernetes.core.k8s_info k8s_log: - redirect: kubernetes.core.k8s_log + redirect: kubernetes.core.k8s_info k8s_rollback: - redirect: kubernetes.core.k8s_rollback + redirect: kubernetes.core.k8s_info k8s_scale: - redirect: kubernetes.core.k8s_scale + redirect: kubernetes.core.k8s_info k8s_service: - redirect: kubernetes.core.k8s_service + redirect: kubernetes.core.k8s_info # k8s_facts was originally slated for removal in Ansible 2.13. k8s_facts: redirect: kubernetes.core.k8s_info deprecation: removal_version: 2.0.0 warning_text: Use kubernetes.core.k8s_info instead. + modules: k8s_raw: tombstone: removal_version: 0.1.0