Skip to content

Commit 0c57b25

Browse files
p3ndaAriaXLi
authored andcommitted
(ITHELP-116185) Add fix dns step to Task Acceptance Tests workflow
In the Task Acceptance Tests workflow, Twingate was having trouble connecting to Artifactory due to running the job in Docker containers. The Docker containers used in the workflow run on Azure VM's and Microsoft adds their own nameservers, 168.63.129.16. It gets copied to resolv.conf and interferes with Twingate which caused DNS resolution failures with Artifactory. To resolve this, this commit adds a "Fix DNS" step that removes the Azure DNS name server and adds Twingate's DNS server.
1 parent 1dd09ad commit 0c57b25

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

.github/workflows/task_acceptance_tests.yaml

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,29 @@ jobs:
2424
steps:
2525

2626
- name: Connect to Twingate
27-
uses: twingate/github-action@v1
27+
uses: twingate/github-action@v1.5
2828
with:
2929
service-key: ${{ secrets.TWINGATE_PUBLIC_REPO_KEY }}
30+
env:
31+
TWINGATE_LOG_LEVEL: debug
32+
33+
- name: Fix DNS
34+
run: |
35+
echo "=== Remove Azure DNS from eth0 interface ==="
36+
sudo resolvectl dns eth0 ""
37+
38+
echo "=== Configure Twingate DNS properly ==="
39+
sudo resolvectl dns sdwan0 100.95.0.251 100.95.0.252
40+
sudo resolvectl domain sdwan0 delivery.puppetlabs.net
41+
42+
echo "=== Flush DNS cache ==="
43+
sudo resolvectl flush-caches
44+
45+
echo "=== Check new configuration ==="
46+
resolvectl status
47+
48+
echo "=== Test DNS resolution ==="
49+
nslookup artifactory.delivery.puppetlabs.net
3050
3151
- name: Checkout current PR code
3252
uses: actions/checkout@v4
@@ -47,3 +67,15 @@ jobs:
4767
run: |
4868
cd task_spec
4969
bundle exec rake task_acceptance
70+
71+
72+
# (ITHELP-116185) Add fix dns step to Task Acceptance Tests workflow
73+
74+
# In the Task Acceptance Tests workflow, Twingate was having trouble connecting
75+
# to Artifactory due to running the job in Docker containers. The Docker
76+
# containers used in the workflow run on Azure VM's and Microsoft adds their own
77+
# nameservers, 168.63.129.16. It gets copied to resolv.conf and interferes with
78+
# Twingate which caused DNS resolution failures with Artifactory.
79+
80+
# To resolve this, this commit adds a "Fix DNS" step that removes the Azure DNS
81+
# name server and adds Twingate's DNS server.

0 commit comments

Comments
 (0)