From 3cef72444f7e202b2d6760b81a5c06c4e45a949a Mon Sep 17 00:00:00 2001 From: Erik Berg Date: Fri, 3 May 2024 08:08:08 +0000 Subject: [PATCH] Pin dependencies to speed up CI We don't want to update galaxy.yml directly where others might need different versions because of requirements, but pinning it here to speed up the CI seems like a good compromise. --- .github/workflows/agent.yml | 10 +++++++++- .github/workflows/javagateway.yml | 8 ++++++++ .github/workflows/proxy.yml | 8 ++++++++ .github/workflows/server.yml | 8 ++++++++ .github/workflows/web.yml | 8 ++++++++ 5 files changed, 41 insertions(+), 1 deletion(-) diff --git a/.github/workflows/agent.yml b/.github/workflows/agent.yml index 65c5b555d..55b7e1b72 100644 --- a/.github/workflows/agent.yml +++ b/.github/workflows/agent.yml @@ -60,6 +60,14 @@ jobs: - name: Build the collection run: | + # Pin versions to speed up CI + sed -i 's/ansible\.windows:\s*"\*"/ansible.windows: "2.3.0"/' galaxy.yml + sed -i 's/ansible\.netcommon:\s*"\*"/ansible.netcommon: "6.1.1"/' galaxy.yml + sed -i 's/ansible\.posix:\s*"\*"/ansible.posix: "1.5.4"/' galaxy.yml + sed -i 's/community\.general:\s*"\*"/community.general: "8.6.0"/' galaxy.yml + sed -i 's/community\.mysql:\s*"\*"/community.mysql: "3.9.0"/' galaxy.yml + sed -i 's/community\.postgresql:\s*"\*"/community.postgresql: "3.4.0"/' galaxy.yml + collection_file=$( basename $(ansible-galaxy collection build -f | awk -F" " '{print $NF}')) echo "COLLECTION_FILE=$collection_file" >> $GITHUB_ENV @@ -73,4 +81,4 @@ jobs: MY_MOLECULE_IMAGE=${{ matrix.container }} MY_MOLECULE_VERSION=${{ matrix.version }} MY_MOLECULE_DOCKER_COMMAND=${{ matrix.command }} - molecule -c common/molecule.yml test -s ${{ matrix.scenario_name }} \ No newline at end of file + molecule -c common/molecule.yml test -s ${{ matrix.scenario_name }} diff --git a/.github/workflows/javagateway.yml b/.github/workflows/javagateway.yml index d961ad3b6..22bc5ede1 100644 --- a/.github/workflows/javagateway.yml +++ b/.github/workflows/javagateway.yml @@ -58,6 +58,14 @@ jobs: - name: Build the collection run: | + # Pin versions to speed up CI + sed -i 's/ansible\.windows:\s*"\*"/ansible.windows: "2.3.0"/' galaxy.yml + sed -i 's/ansible\.netcommon:\s*"\*"/ansible.netcommon: "6.1.1"/' galaxy.yml + sed -i 's/ansible\.posix:\s*"\*"/ansible.posix: "1.5.4"/' galaxy.yml + sed -i 's/community\.general:\s*"\*"/community.general: "8.6.0"/' galaxy.yml + sed -i 's/community\.mysql:\s*"\*"/community.mysql: "3.9.0"/' galaxy.yml + sed -i 's/community\.postgresql:\s*"\*"/community.postgresql: "3.4.0"/' galaxy.yml + collection_file=$( basename $(ansible-galaxy collection build -f | awk -F" " '{print $NF}')) echo "COLLECTION_FILE=$collection_file" >> $GITHUB_ENV diff --git a/.github/workflows/proxy.yml b/.github/workflows/proxy.yml index b8ad4b9b9..ad5f61b34 100644 --- a/.github/workflows/proxy.yml +++ b/.github/workflows/proxy.yml @@ -62,6 +62,14 @@ jobs: - name: Build the collection run: | + # Pin versions to speed up CI + sed -i 's/ansible\.windows:\s*"\*"/ansible.windows: "2.3.0"/' galaxy.yml + sed -i 's/ansible\.netcommon:\s*"\*"/ansible.netcommon: "6.1.1"/' galaxy.yml + sed -i 's/ansible\.posix:\s*"\*"/ansible.posix: "1.5.4"/' galaxy.yml + sed -i 's/community\.general:\s*"\*"/community.general: "8.6.0"/' galaxy.yml + sed -i 's/community\.mysql:\s*"\*"/community.mysql: "3.9.0"/' galaxy.yml + sed -i 's/community\.postgresql:\s*"\*"/community.postgresql: "3.4.0"/' galaxy.yml + collection_file=$( basename $(ansible-galaxy collection build -f | awk -F" " '{print $NF}')) echo "COLLECTION_FILE=$collection_file" >> $GITHUB_ENV diff --git a/.github/workflows/server.yml b/.github/workflows/server.yml index 141d3f116..33f5cd5fd 100644 --- a/.github/workflows/server.yml +++ b/.github/workflows/server.yml @@ -66,6 +66,14 @@ jobs: - name: Build the collection run: | + # Pin versions to speed up CI + sed -i 's/ansible\.windows:\s*"\*"/ansible.windows: "2.3.0"/' galaxy.yml + sed -i 's/ansible\.netcommon:\s*"\*"/ansible.netcommon: "6.1.1"/' galaxy.yml + sed -i 's/ansible\.posix:\s*"\*"/ansible.posix: "1.5.4"/' galaxy.yml + sed -i 's/community\.general:\s*"\*"/community.general: "8.6.0"/' galaxy.yml + sed -i 's/community\.mysql:\s*"\*"/community.mysql: "3.9.0"/' galaxy.yml + sed -i 's/community\.postgresql:\s*"\*"/community.postgresql: "3.4.0"/' galaxy.yml + collection_file=$( basename $(ansible-galaxy collection build -f | awk -F" " '{print $NF}')) echo "COLLECTION_FILE=$collection_file" >> $GITHUB_ENV diff --git a/.github/workflows/web.yml b/.github/workflows/web.yml index 19e800d99..0541a2457 100644 --- a/.github/workflows/web.yml +++ b/.github/workflows/web.yml @@ -68,6 +68,14 @@ jobs: - name: Build the collection run: | + # Pin versions to speed up CI + sed -i 's/ansible\.windows:\s*"\*"/ansible.windows: "2.3.0"/' galaxy.yml + sed -i 's/ansible\.netcommon:\s*"\*"/ansible.netcommon: "6.1.1"/' galaxy.yml + sed -i 's/ansible\.posix:\s*"\*"/ansible.posix: "1.5.4"/' galaxy.yml + sed -i 's/community\.general:\s*"\*"/community.general: "8.6.0"/' galaxy.yml + sed -i 's/community\.mysql:\s*"\*"/community.mysql: "3.9.0"/' galaxy.yml + sed -i 's/community\.postgresql:\s*"\*"/community.postgresql: "3.4.0"/' galaxy.yml + collection_file=$( basename $(ansible-galaxy collection build -f | awk -F" " '{print $NF}')) echo "COLLECTION_FILE=$collection_file" >> $GITHUB_ENV