Skip to content
This repository was archived by the owner on May 31, 2019. It is now read-only.

Commit 2011dda

Browse files
committed
Merge pull request #57 from vlesierse/ci-fix
Fixed CI tests by excluding 1.0.0-beta3 and earlier
2 parents 1dd17e8 + 4d4cb90 commit 2011dda

File tree

5 files changed

+16
-18
lines changed

5 files changed

+16
-18
lines changed

.ci/build-app-image.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff 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

99
BASE_IMAGE=$1
1010
TEST_APP=$2
1111
TAG=$3
12-
BRANCH=$4
12+
VERSION=$4
1313

1414
echo "[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
1820
tee Dockerfile << EOF
1921
FROM $BASE_IMAGE
2022
COPY . /app
2123
WORKDIR /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
2527
EOF
2628

2729
echo "[CI] Building Docker image for $TEST_APP, will tag as '$TAG'..."
2830
docker build -t $TAG .
2931
echo "[CI] Built Docker image '$TAG'"
30-
echo "[CI] Revert checkout"
31-
git checkout master

.ci/find-tags.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ set -o pipefail # carry failures over pipes
55
: ${1?"Need to pass Dockerfile search directory as argument"}
66

77
cd $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'

.ci/run-app.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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

88
BASE_IMAGE=$1
99
TEST_APP=$2
1010
TEST_PORT=$RANDOM
11-
BRANCH=$3
11+
VERSION=$3
1212

1313
APP_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

.ci/run-with-all-tags.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,9 @@ set -e # Exit immediately upon failure
77

88
for 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}
1513
done
1614

1715
echo "[CI] '$2' runs fine on all tags."

circle.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ general:
1111

1212
checkout:
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

1616
dependencies:
1717
override:

0 commit comments

Comments
 (0)