Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run integration e2e test on mac and windows #3143

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion openshift-ci/build-root/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,22 @@

FROM registry.svc.ci.openshift.org/openshift/release:golang-1.13

RUN yum -y install make wget gcc git httpd-tools
RUN yum -y install sudo make wget gcc git httpd-tools ruby ruby-devel gcc-c++ patch \
readline readline-devel zlib zlib-devel libffi-devel openssl-devel make bzip2 \
autoconf automake libtool bison sqlite-devel

RUN sudo curl -sSL https://rvm.io/mpapis.asc | gpg2 --import - \
sudo curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import -

RUN curl -L get.rvm.io | bash -s stable

RUN source /etc/profile.d/rvm.sh \
rvm reload

RUN rvm requirements run \
rvm install 2.7

RUN ruby --version

RUN gem install travis --pre --no-document

36 changes: 36 additions & 0 deletions scripts/ci-build-info.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/usr/bin/env bash

if [[ -z $PR_NO ]]; then
echo "Please set PR_NO"
exit 1
fi

if [[ -z $GITHUB_TOKEN ]]; then
echo "Please set GITHUB_TOKEN"
exit 1
fi

REPO=openshift/odo

hist=`mktemp`

# Travis login with token here
echo "Logging in to travis with provided token..."
travis login --github-token $GITHUB_TOKEN --com

echo "Querying travis history..."
travis history -p $PR_NO --limit 4 -r $REPO --com | tr -s ' ' > $hist
echo "Iterating over travis history to find all builds for pr $PR_NO"
while IFS= read -r line
do
build_no=`echo $line | cut -d ' ' -f1`
build_no="${build_no//#}"
build_status=`echo $line | cut -d ' ' -f2`
build_status="${build_status//:}"
if [[ ! -z $out ]];then
out="$out "
fi
out="$out$build_no:$build_status"
done < "$hist"

echo $out
8 changes: 8 additions & 0 deletions scripts/openshiftci-presubmit-all-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ TMP_DIR=$(mktemp -d)
cp $KUBECONFIG $TMP_DIR/kubeconfig
chmod 640 $TMP_DIR/kubeconfig
export KUBECONFIG=$TMP_DIR/kubeconfig
echo $PULL_SECRET_PATH
echo "==============="
echo $JOB_SPEC
echo "==============="
pr_num="$( jq .refs.pulls[0].num <<<"${JOB_SPEC}" )"
echo $pr_num
echo "==============="
echo $JOB_SPEC

# Login as developer
odo login -u developer -p developer
Expand Down
9 changes: 9 additions & 0 deletions scripts/openshiftci-presubmit-unittests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ export PATH=$PATH:$GOPATH/bin
# otherwise /.cache is used, and it fails on permission denied
export GOLANGCI_LINT_CACHE="/tmp/.cache"

echo $PULL_SECRET_PATH
echo "==============="
echo $JOB_SPEC
echo "==============="
pr_num="$( jq .refs.pulls[0].num <<<"${JOB_SPEC}" )"
echo $pr_num
echo "==============="
echo $JOB_SPEC

make goget-tools
make validate
make test
Expand Down