Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[20652] Add DNS entries to hosts files on github workflows (backport #4776) #4808

Merged
merged 1 commit into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .github/workflows/reusable-mac-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/reusable-sanitizers-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,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

Expand Down Expand Up @@ -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:
Expand Down
13 changes: 12 additions & 1 deletion .github/workflows/reusable-ubuntu-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
Loading