From 1344010f10be582a26e748184de08d12760a708c Mon Sep 17 00:00:00 2001 From: Miguel Company Date: Mon, 13 May 2024 15:56:27 +0200 Subject: [PATCH 1/4] Refs #20652. Write hosts file on reusable-ubuntu-ci. Signed-off-by: Miguel Company --- .github/workflows/reusable-ubuntu-ci.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reusable-ubuntu-ci.yml b/.github/workflows/reusable-ubuntu-ci.yml index 22a7d21b0b5..9f603cb17e1 100644 --- a/.github/workflows/reusable-ubuntu-ci.yml +++ b/.github/workflows/reusable-ubuntu-ci.yml @@ -85,7 +85,18 @@ jobs: - name: Setup CCache uses: eProsima/eProsima-CI/external/setup-ccache-action@v0 - # TODO(eduponz): Update known hosts file for DNS resolver testing. NOTE: The runner cannot modify /etc/hosts. + - name: Set up hosts file for DNS testing + run: | + sudo echo "" | sudo tee -a /etc/hosts + sudo echo "127.0.0.1 localhost.test" | sudo tee -a /etc/hosts + sudo echo "::1 localhost.test" | sudo tee -a /etc/hosts + sudo echo "154.56.134.194 www.eprosima.com.test" | sudo tee -a /etc/hosts + sudo echo "216.58.215.164 www.acme.com.test" | sudo tee -a /etc/hosts + sudo echo "2a00:1450:400e:803::2004 www.acme.com.test" | sudo tee -a /etc/hosts + sudo echo "140.82.121.4 www.foo.com.test" | sudo tee -a /etc/hosts + sudo echo "140.82.121.3 www.foo.com.test" | sudo tee -a /etc/hosts + sudo echo "ff1e::ffff:efff:1 acme.org.test" | sudo tee -a /etc/hosts + # TODO(eduponz): Set up libp11 and SoftHSM. NOTE: using SoftHSM requires adding the runner to a group, # which entails logout/login or rebooting the machine. This is not feasible in a CI environment. From 89a4e2dcd138a26af0021194b9c6737da2b5d24f Mon Sep 17 00:00:00 2001 From: Miguel Company Date: Mon, 13 May 2024 16:18:29 +0200 Subject: [PATCH 2/4] Refs #20652. Write hosts file on reusable-sanitizers-ci. Signed-off-by: Miguel Company --- .github/workflows/reusable-sanitizers-ci.yml | 24 ++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/reusable-sanitizers-ci.yml b/.github/workflows/reusable-sanitizers-ci.yml index ec267d7ff28..0ace005d66c 100644 --- a/.github/workflows/reusable-sanitizers-ci.yml +++ b/.github/workflows/reusable-sanitizers-ci.yml @@ -95,6 +95,18 @@ jobs: - name: Setup CCache uses: eProsima/eProsima-CI/external/setup-ccache-action@v0 + - name: Set up hosts file for DNS testing + run: | + sudo echo "" | sudo tee -a /etc/hosts + sudo echo "127.0.0.1 localhost.test" | sudo tee -a /etc/hosts + sudo echo "::1 localhost.test" | sudo tee -a /etc/hosts + sudo echo "154.56.134.194 www.eprosima.com.test" | sudo tee -a /etc/hosts + sudo echo "216.58.215.164 www.acme.com.test" | sudo tee -a /etc/hosts + sudo echo "2a00:1450:400e:803::2004 www.acme.com.test" | sudo tee -a /etc/hosts + sudo echo "140.82.121.4 www.foo.com.test" | sudo tee -a /etc/hosts + sudo echo "140.82.121.3 www.foo.com.test" | sudo tee -a /etc/hosts + sudo echo "ff1e::ffff:efff:1 acme.org.test" | sudo tee -a /etc/hosts + - name: Fetch Fast DDS dependencies uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0 with: @@ -363,6 +375,18 @@ jobs: destination_workspace: src skip_existing: 'true' + - name: Set up hosts file for DNS testing + run: | + sudo echo "" | sudo tee -a /etc/hosts + sudo echo "127.0.0.1 localhost.test" | sudo tee -a /etc/hosts + sudo echo "::1 localhost.test" | sudo tee -a /etc/hosts + sudo echo "154.56.134.194 www.eprosima.com.test" | sudo tee -a /etc/hosts + sudo echo "216.58.215.164 www.acme.com.test" | sudo tee -a /etc/hosts + sudo echo "2a00:1450:400e:803::2004 www.acme.com.test" | sudo tee -a /etc/hosts + sudo echo "140.82.121.4 www.foo.com.test" | sudo tee -a /etc/hosts + sudo echo "140.82.121.3 www.foo.com.test" | sudo tee -a /etc/hosts + sudo echo "ff1e::ffff:efff:1 acme.org.test" | sudo tee -a /etc/hosts + - name: Fetch Fast DDS CI dependencies uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0 with: From 1b0dcc06b726824e77bfc2bc23ec3b485414deaa Mon Sep 17 00:00:00 2001 From: Miguel Company Date: Mon, 13 May 2024 16:18:43 +0200 Subject: [PATCH 3/4] Refs #20652. Write hosts file on reusable-mac-ci. Signed-off-by: Miguel Company --- .github/workflows/reusable-mac-ci.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reusable-mac-ci.yml b/.github/workflows/reusable-mac-ci.yml index 02ee5916ad7..5ca71362e78 100644 --- a/.github/workflows/reusable-mac-ci.yml +++ b/.github/workflows/reusable-mac-ci.yml @@ -86,7 +86,18 @@ jobs: - name: Setup CCache uses: eProsima/eProsima-CI/external/setup-ccache-action@v0 - # TODO(eduponz): Update known hosts file for DNS resolver testing. NOTE: The runner cannot modify /etc/hosts. + - name: Set up hosts file for DNS testing + run: | + sudo echo "" | sudo tee -a /etc/hosts + sudo echo "127.0.0.1 localhost.test" | sudo tee -a /etc/hosts + sudo echo "::1 localhost.test" | sudo tee -a /etc/hosts + sudo echo "154.56.134.194 www.eprosima.com.test" | sudo tee -a /etc/hosts + sudo echo "216.58.215.164 www.acme.com.test" | sudo tee -a /etc/hosts + sudo echo "2a00:1450:400e:803::2004 www.acme.com.test" | sudo tee -a /etc/hosts + sudo echo "140.82.121.4 www.foo.com.test" | sudo tee -a /etc/hosts + sudo echo "140.82.121.3 www.foo.com.test" | sudo tee -a /etc/hosts + sudo echo "ff1e::ffff:efff:1 acme.org.test" | sudo tee -a /etc/hosts + # TODO(eduponz): Set up libp11 and SoftHSM. NOTE: using SoftHSM requires adding the runner to a group, # which entails logout/login or rebooting the machine. This is not feasible in a CI environment. From 6b79f9b1818ea0a081ce5f655383474456e669f0 Mon Sep 17 00:00:00 2001 From: Miguel Company Date: Fri, 17 May 2024 12:25:23 +0200 Subject: [PATCH 4/4] Refs #20652. Apply review suggestions. Signed-off-by: Miguel Company --- .github/workflows/reusable-sanitizers-ci.yml | 24 ++++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/reusable-sanitizers-ci.yml b/.github/workflows/reusable-sanitizers-ci.yml index 0ace005d66c..22294287af9 100644 --- a/.github/workflows/reusable-sanitizers-ci.yml +++ b/.github/workflows/reusable-sanitizers-ci.yml @@ -95,18 +95,6 @@ jobs: - name: Setup CCache uses: eProsima/eProsima-CI/external/setup-ccache-action@v0 - - name: Set up hosts file for DNS testing - run: | - sudo echo "" | sudo tee -a /etc/hosts - sudo echo "127.0.0.1 localhost.test" | sudo tee -a /etc/hosts - sudo echo "::1 localhost.test" | sudo tee -a /etc/hosts - sudo echo "154.56.134.194 www.eprosima.com.test" | sudo tee -a /etc/hosts - sudo echo "216.58.215.164 www.acme.com.test" | sudo tee -a /etc/hosts - sudo echo "2a00:1450:400e:803::2004 www.acme.com.test" | sudo tee -a /etc/hosts - sudo echo "140.82.121.4 www.foo.com.test" | sudo tee -a /etc/hosts - sudo echo "140.82.121.3 www.foo.com.test" | sudo tee -a /etc/hosts - sudo echo "ff1e::ffff:efff:1 acme.org.test" | sudo tee -a /etc/hosts - - name: Fetch Fast DDS dependencies uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0 with: @@ -172,6 +160,18 @@ jobs: with: packages: vcstool setuptools gcovr tomark xmltodict jsondiff pandas + - name: Set up hosts file for DNS testing + run: | + sudo echo "" | sudo tee -a /etc/hosts + sudo echo "127.0.0.1 localhost.test" | sudo tee -a /etc/hosts + sudo echo "::1 localhost.test" | sudo tee -a /etc/hosts + sudo echo "154.56.134.194 www.eprosima.com.test" | sudo tee -a /etc/hosts + sudo echo "216.58.215.164 www.acme.com.test" | sudo tee -a /etc/hosts + sudo echo "2a00:1450:400e:803::2004 www.acme.com.test" | sudo tee -a /etc/hosts + sudo echo "140.82.121.4 www.foo.com.test" | sudo tee -a /etc/hosts + sudo echo "140.82.121.3 www.foo.com.test" | sudo tee -a /etc/hosts + sudo echo "ff1e::ffff:efff:1 acme.org.test" | sudo tee -a /etc/hosts + - name: Setup CCache uses: eProsima/eProsima-CI/external/setup-ccache-action@v0