mirror of
https://github.com/keycloak/keycloak.git
synced 2025-12-16 20:15:46 -06:00
Hardcode nip.io test hosts to /etc/hosts (#39044)
Closes #38104 Signed-off-by: Václav Muzikář <vmuzikar@redhat.com>
This commit is contained in:
@@ -14,6 +14,10 @@ inputs:
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- id: update-hosts
|
||||
name: Update /etc/hosts
|
||||
uses: ./.github/actions/update-hosts
|
||||
|
||||
- id: setup-java
|
||||
name: Setup Java
|
||||
uses: ./.github/actions/java-setup
|
||||
|
||||
21
.github/actions/update-hosts/action.yml
vendored
Normal file
21
.github/actions/update-hosts/action.yml
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
name: Update /etc/hosts
|
||||
description: Update /etc/hosts file to hardcode known nip.io hostnames. This is to avoid test instability due to DNS resolution issues.
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
|
||||
- id: update-hosts-linux
|
||||
name: Update /etc/hosts
|
||||
if: runner.os == 'Linux'
|
||||
shell: bash
|
||||
run: |
|
||||
printf "\n\n$(cat .github/actions/update-hosts/nipio-hosts)" | sudo tee -a /etc/hosts
|
||||
|
||||
- id: update-hosts-windows
|
||||
name: Update C:\Windows\System32\drivers\etc\hosts
|
||||
if: runner.os == 'Windows'
|
||||
shell: powershell
|
||||
run: |
|
||||
"`n`n" | Add-Content C:\Windows\System32\drivers\etc\hosts
|
||||
Get-Content .github/actions/update-hosts/nipio-hosts | Add-Content C:\Windows\System32\drivers\etc\hosts
|
||||
1
.github/actions/update-hosts/nipio-hosts
vendored
Normal file
1
.github/actions/update-hosts/nipio-hosts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
127.0.0.1 127.0.0.1.nip.io admin.127.0.0.1.nip.io localhost-myapp.127.0.0.1.nip.io localhost-sso.127.0.0.1.nip.io realmFrontend.127.0.0.1.nip.io proxy.kc.127.0.0.1.nip.io
|
||||
Reference in New Issue
Block a user