Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
piyush-garg committed Jun 29, 2018
1 parent 9395e73 commit a774cfc
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 2 deletions.
66 changes: 66 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,76 @@ jobs:
command: mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B install -P itests-openshift
no_output_timeout: 3600

OPENSHIFT_3.9.0:
machine: true
steps:
- checkout
- run:
command: |
kube_version=$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)
curl -LO https://storage.googleapis.com/kubernetes-release/release/${kube_version}/bin/linux/amd64/kubectl && \
chmod +x kubectl && sudo mv kubectl /usr/local/bin/
echo "Installed kubectl CLI tool"
echo "Installing nsenter"
if ! which nsenter > /dev/null; then
echo "Did not find nsenter. Installing it."
NSENTER_BUILD_DIR=$(mktemp -d /tmp/nsenter-build-XXXXXX)
pushd ${NSENTER_BUILD_DIR}
curl https://www.kernel.org/pub/linux/utils/util-linux/v2.31/util-linux-2.31.tar.gz | tar -zxf-
cd util-linux-2.31
./configure --without-ncurses
make nsenter
sudo cp nsenter /usr/local/bin
rm -rf "${NSENTER_BUILD_DIR}"
popd
fi
if ! which systemd-run > /dev/null; then
echo "Did not find systemd-run. Hacking it to work around Kubernetes calling it."
echo '#!/bin/bash
echo "all arguments: "$@
while [[ $# -gt 0 ]]
do
key="$1"
if [[ "${key}" != "--" ]]; then
shift
continue
fi
shift
break
done
echo "remaining args: "$@
exec $@' | sudo tee /usr/bin/systemd-run >/dev/null
sudo chmod +x /usr/bin/systemd-run
fi
oc_tool_version="openshift-origin-client-tools-v3.9.0-191fece-linux-64bit"
curl -LO https://github.com/openshift/origin/releases/download/v3.9.0/${oc_tool_version}.tar.gz && \
tar -xvzf ${oc_tool_version}.tar.gz && chmod +x $PWD/${oc_tool_version}/oc && sudo mv $PWD/${oc_tool_version}/oc /usr/local/bin/ && \
rm -rf ${oc_tool_version}.tar.gz
echo "Installed OC CLI tool"
tmp=`mktemp`
echo 'DOCKER_OPTS="$DOCKER_OPTS --insecure-registry 172.30.0.0/16"' > ${tmp}
sudo mv ${tmp} /etc/default/docker
sudo mount --make-shared /
sudo service docker restart
echo "Configured Docker daemon with insecure-registry"
oc cluster up --version=v3.9.0
sleep 10
oc login -u system:admin
echo "Configured OpenShift cluster : v3.9.0"
- run:
command: mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B install -P itests-openshift
no_output_timeout: 3600

workflows:
version: 2
build_and_test:
jobs:
- OPENSHIFT_3.6.0
- OPENSHIFT_3.6.1
- OPENSHIFT_3.7.0
- OPENSHIFT_3.9.0
2 changes: 1 addition & 1 deletion kubernetes-examples/src/main/resources/network-policy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
#

apiVersion: extensions/v1beta1
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: test-network-policy
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
<jackson.version>2.7.7</jackson.version>
<jackson.bundle.version>${jackson.version}</jackson.bundle.version>
<junit.version>4.12</junit.version>
<kubernetes.model.version>2.1.1</kubernetes.model.version>
<kubernetes.model.version>3.0.0</kubernetes.model.version>
<log4j.version>2.10.0</log4j.version>
<zjsonpatch.version>0.3.0</zjsonpatch.version>
<arquillian.cube.version>1.15.2</arquillian.cube.version>
Expand Down

0 comments on commit a774cfc

Please sign in to comment.