Adding IP address to host file on windows image #25959
-
I’ve been trying to figure out how to map a DNS name to an unlisted publicly hosted server for running integrated SDK tests against. Instead of getting the desired result, I get some strange result with a URL that seems to be somehow related bitcoin mining when searched on google. The log goes something like this and I can’t quite figure out what’s going on. The fact the IP address shows up appended to another URL when attempting to ping is strange. Initially I thought it required a space or line feed but that doesn’t appear to help. Add test server host name 0s Run ECHO %NEWLINE%^1.2.3.4 example.org>>%WINDIR%\System32\drivers\etc\hosts debug dns name to make sure ip is assigned 3s Run ping example.org Pinging stratum-na.rplant.xyz1.2.3.4 [127.0.0.1] with 32 bytes of data: Reply from 127.0.0.1: bytes=32 time<1ms TTL=128 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @mrking, Glad to see you in Github Community Forum! This is due to
Please check my workflow for your refernce. weide-zhou/ticket13Contribute to weide-zhou/ticket13 development by creating an account on GitHub. Thanks |
Beta Was this translation helpful? Give feedback.
-
Thanks so much! I had been using CMD, but this seems to have worked! Really appreciate taking the time to even setup a working example. |
Beta Was this translation helpful? Give feedback.
Hi @mrking,
Glad to see you in Github Community Forum!
This is due to
1.2.3.4 example.org
is added behindstratum-na.rplant.xyz
while not in a new line.The default shell for windows hosted runner is pwsh, so please use below command instead:
Please check my workflow for your refernce.
GitHubweide-zhou/ticket13
Contribute to weide-zhou/ticket13 development by creating an account on GitHub.
Thanks