From 036e0e3a3b692454b01fb2ead57131800677324c Mon Sep 17 00:00:00 2001 From: MyroTk Date: Tue, 21 Jan 2025 20:13:56 -0500 Subject: [PATCH 1/2] Use test_name to determine ipv6 subnet --- .github/actions/docker_setup/action.yml | 14 +++++++++----- .github/workflows/reusable_test.yml | 2 ++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/actions/docker_setup/action.yml b/.github/actions/docker_setup/action.yml index 06388e4175c1..069654fbd480 100644 --- a/.github/actions/docker_setup/action.yml +++ b/.github/actions/docker_setup/action.yml @@ -1,10 +1,14 @@ name: Docker setup description: Setup docker inputs: - nested_job: - description: the fuse for unintended use inside of the reusable callable jobs - default: true - type: boolean + test_name: + description: name of the test, used in determining ipv6 configs. + default: None + type: string + +env: + ipv6_subnet: ${{ contains(inputs.test_name, 'Integration') && '2001:db8:1::/64' || "2001:3984:3989::/64" }} + runs: using: "composite" steps: @@ -17,7 +21,7 @@ runs: sudo cat < /etc/docker/daemon.json { "ipv6": true, - "fixed-cidr-v6": "2001:3984:3989::/64" + "fixed-cidr-v6": "${{ env.ipv6_subnet }}"" } EOT sudo chown root:root /etc/docker/daemon.json diff --git a/.github/workflows/reusable_test.yml b/.github/workflows/reusable_test.yml index dc81ebd2c3f3..4867cab03480 100644 --- a/.github/workflows/reusable_test.yml +++ b/.github/workflows/reusable_test.yml @@ -116,6 +116,8 @@ jobs: job_type: test - name: Docker setup uses: ./.github/actions/docker_setup + with: + test_name: ${{ inputs.test_name }} - name: Setup batch if: ${{ fromJson(inputs.data).jobs_data.jobs_params[inputs.test_name].num_batches > 1 }} run: | From a022d430fd429d1f54420c874ecbc318641b3d40 Mon Sep 17 00:00:00 2001 From: MyroTk Date: Tue, 21 Jan 2025 22:01:27 -0500 Subject: [PATCH 2/2] move the env var due --- .github/actions/docker_setup/action.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/actions/docker_setup/action.yml b/.github/actions/docker_setup/action.yml index 069654fbd480..60c9a17519a6 100644 --- a/.github/actions/docker_setup/action.yml +++ b/.github/actions/docker_setup/action.yml @@ -5,15 +5,13 @@ inputs: description: name of the test, used in determining ipv6 configs. default: None type: string - -env: - ipv6_subnet: ${{ contains(inputs.test_name, 'Integration') && '2001:db8:1::/64' || "2001:3984:3989::/64" }} - runs: using: "composite" steps: - name: Docker IPv6 configuration shell: bash + env: + ipv6_subnet: ${{ contains(inputs.test_name, 'Integration') && '2001:db8:1::/64' || '2001:3984:3989::/64' }} run: | # make sure docker uses proper IPv6 config sudo touch /etc/docker/daemon.json @@ -21,7 +19,7 @@ runs: sudo cat < /etc/docker/daemon.json { "ipv6": true, - "fixed-cidr-v6": "${{ env.ipv6_subnet }}"" + "fixed-cidr-v6": "${{ env.ipv6_subnet }}" } EOT sudo chown root:root /etc/docker/daemon.json