You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by as...@apache.org on 2021/03/09 08:57:39 UTC
[camel-k] 01/02: fix(ci): Fix OpenShift DNS node configuration
This is an automated email from the ASF dual-hosted git repository.
astefanutti pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit d76aab232bf8f3fefbb22656fd2634c189651c90
Author: Antonin Stefanutti <an...@stefanutti.fr>
AuthorDate: Mon Mar 8 18:40:20 2021 +0100
fix(ci): Fix OpenShift DNS node configuration
---
.github/workflows/openshift.yml | 32 +++++++++++++++++++++++++++-----
1 file changed, 27 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/openshift.yml b/.github/workflows/openshift.yml
index adb6bee..4911139 100644
--- a/.github/workflows/openshift.yml
+++ b/.github/workflows/openshift.yml
@@ -79,11 +79,6 @@ jobs:
# Download and install the oc binary
sudo mount --make-shared /
- sudo apt-get install resolvconf
- echo "nameserver 8.8.8.8" | sudo tee /etc/resolvconf/resolv.conf.d/head > /dev/null
- echo "nameserver 8.8.4.4" | sudo tee /etc/resolvconf/resolv.conf.d/head > /dev/null
- sudo service resolvconf restart
-
sudo service docker stop
sudo echo '{"insecure-registries": ["172.30.0.0/16"]}' | sudo tee /etc/docker/daemon.json > /dev/null
sudo service docker start
@@ -125,6 +120,33 @@ jobs:
exit 1
fi
+ # Configure DNS
+ oc cluster down
+
+ echo "nameserver 8.8.8.8" >> openshift.local.clusterup/kubedns/resolv.conf
+ echo "nameserver 4.4.4.4" >> openshift.local.clusterup/kubedns/resolv.conf
+
+ # Restart OpenShift
+ oc cluster up
+ oc login -u system:admin
+
+ # Wait until we have a ready node in openshift
+ TIMEOUT=0
+ TIMEOUT_COUNT=60
+ until [ $TIMEOUT -eq $TIMEOUT_COUNT ]; do
+ if [ -n "$(oc get nodes | grep Ready)" ]; then
+ break
+ fi
+ echo "openshift is not up yet"
+ TIMEOUT=$((TIMEOUT+1))
+ sleep 5
+ done
+
+ if [ $TIMEOUT -eq $TIMEOUT_COUNT ]; then
+ echo "Failed to start openshift"
+ exit 1
+ fi
+
echo "openshift is deployed and reachable"
- name: Info