This repository was archived by the owner on May 31, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +16
-18
lines changed Expand file tree Collapse file tree 5 files changed +16
-18
lines changed Original file line number Diff line number Diff line change @@ -4,28 +4,28 @@ set -e # Exit immediately upon failure
44: ${1?" Need to pass BASE_IMAGE as argument" }
55: ${2?" Need to pass TEST_APP as argument" }
66: ${3?" Need to pass TAG as argument" }
7- : ${4?" Need to pass BRANCH as argument" }
7+ : ${4?" Need to pass VERSION as argument" }
88
99BASE_IMAGE=$1
1010TEST_APP=$2
1111TAG=$3
12- BRANCH =$4
12+ VERSION =$4
1313
1414echo " [CI] Injecting Dockerfile to project $TEST_APP ..."
15- cd $SAMPLES_REPO /samples/$TEST_APP
16- echo " [CI] Checkout branch $BRANCH "
17- git checkout $BRANCH
15+ if [[ ! -d $SAMPLES_REPO /samples/$VERSION /$TEST_APP ]]; then
16+ echo " [CI] Sample '$TEST_APP ' not found for Docker image '$VERSION '"
17+ exit 1
18+ fi
19+ cd $SAMPLES_REPO /samples/$VERSION /$TEST_APP
1820tee Dockerfile << EOF
1921FROM $BASE_IMAGE
2022COPY . /app
2123WORKDIR /app
22- RUN kpm restore
23- ENV KRE_TRACE 1
24- ENTRYPOINT sleep 10000 | k kestrel
24+ RUN dnu restore
25+ ENV DNX_TRACE 1
26+ ENTRYPOINT sleep 10000 | dnx . kestrel
2527EOF
2628
2729echo " [CI] Building Docker image for $TEST_APP , will tag as '$TAG '..."
2830docker build -t $TAG .
2931echo " [CI] Built Docker image '$TAG '"
30- echo " [CI] Revert checkout"
31- git checkout master
Original file line number Diff line number Diff line change @@ -5,4 +5,4 @@ set -o pipefail # carry failures over pipes
55: ${1?" Need to pass Dockerfile search directory as argument" }
66
77cd $1
8- find . -path ./.git -prune -o -name Dockerfile -print0 | xargs -0 -n1 dirname | sed -e " s/\.\///" | grep -v nightly
8+ find . -path ./.git -prune -o -name Dockerfile -print0 | xargs -0 -n1 dirname | sed -e " s/\.\///" | grep -v ' 1.0.0-beta[1-3] ' | grep -v ' coreclr-1.0.0-beta5-11624 '
Original file line number Diff line number Diff line change @@ -3,17 +3,17 @@ set -e # Exit immediately upon failure
33
44: ${1?" Need to pass BASE_IMAGE as argument" }
55: ${2?" Need to pass TEST_APP as argument" }
6- : ${3?" Need to pass BRANCH as argument" }
6+ : ${3?" Need to pass VERSION as argument" }
77
88BASE_IMAGE=$1
99TEST_APP=$2
1010TEST_PORT=$RANDOM
11- BRANCH =$3
11+ VERSION =$3
1212
1313APP_IMG_TAG=$( tr ' [:upper:]' ' [:lower:]' <<< $TEST_APP ) _${TEST_PORT}
1414
1515# Build the app image
16- .ci/build-app-image.sh $BASE_IMAGE $TEST_APP $APP_IMG_TAG $BRANCH
16+ .ci/build-app-image.sh $BASE_IMAGE $TEST_APP $APP_IMG_TAG $VERSION
1717
1818# Start app
1919.ci/start-container.sh 5004 $TEST_PORT $APP_IMG_TAG $APP_IMG_TAG
Original file line number Diff line number Diff line change @@ -7,11 +7,9 @@ set -e # Exit immediately upon failure
77
88for tag in ` .ci/find-tags.sh $1 ` ; do
99 TAG=${IMAGE} :${tag}
10- BRANCH=master
11- if [[ ${tag} == " nightly" ]]; then BRANCH=dev; else BRANCH=tags/v${tag} ; fi
1210 echo " [CI] ----------------------------------"
1311 echo " [CI] Verifying '$2 ' app with '$TAG '"
14- .ci/run-app.sh $TAG $2 $BRANCH
12+ .ci/run-app.sh $TAG $2 ${tag}
1513done
1614
1715echo " [CI] '$2 ' runs fine on all tags."
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ general:
1111
1212checkout :
1313 post :
14- - git clone -q git://github.com/aspnet/Home.git $SAMPLES_REPO
14+ - git clone -q git://github.com/aspnet/Home.git -b dev $SAMPLES_REPO
1515
1616dependencies :
1717 override :
You can’t perform that action at this time.
0 commit comments