This repository was archived by the owner on May 31, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +23
-3
lines changed Expand file tree Collapse file tree 3 files changed +23
-3
lines changed Original file line number Diff line number Diff line change @@ -6,18 +6,29 @@ set -e # Exit immediately upon failure
66: ${3?" Need to pass TAG as argument" }
77: ${4?" Need to pass VERSION as argument" }
88
9+ set +x
10+
911BASE_IMAGE=$1
1012TEST_APP=$2
1113TAG=$3
1214VERSION=$4
1315
16+
1417echo " [CI] Injecting Dockerfile to project $TEST_APP ..."
1518if [[ ! -d $SAMPLES_REPO /samples/$VERSION /$TEST_APP ]]; then
1619 echo " [CI] Sample '$TEST_APP ' not found for Docker image '$VERSION '"
1720 exit 1
1821fi
1922cd $SAMPLES_REPO /samples/$VERSION /$TEST_APP
20- tee Dockerfile << EOF
23+
24+ ls -al
25+
26+ if [[ -f " Dockerfile" ]]; then
27+ echo " Using existing Dockerfile in the sample."
28+ echo " Dockerfile:"
29+ cat Dockerfile
30+ else
31+ tee Dockerfile << EOF
2132FROM $BASE_IMAGE
2233COPY . /app
2334WORKDIR /app
@@ -26,6 +37,8 @@ ENV DNX_TRACE 1
2637ENTRYPOINT sleep 10000 | dnx . kestrel
2738EOF
2839
40+ fi
41+
2942echo " [CI] Building Docker image for $TEST_APP , will tag as '$TAG '..."
3043docker build -t $TAG .
3144echo " [CI] Built Docker image '$TAG '"
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 ' 1.0.0-beta[1-3 ]' | grep -v ' coreclr-1.0.0-beta5-11624'
8+ find . -path ./.git -prune -o -name Dockerfile -print0 | xargs -0 -n1 dirname | sed -e " s/\.\///" | grep -v ' 1.0.0-beta[1-4 ]' | grep -v ' coreclr-1.0.0-beta5-11624'
Original file line number Diff line number Diff line change @@ -20,4 +20,11 @@ docker run -t -d -p $HOST_PORT:$APP_PORT --name $CNT_NAME $APP_IMG
2020# Wait to bootstrap the app
2121echo " [CI] Sleeping $SLEEP seconds to bootstrap the server..."
2222sleep $SLEEP
23- docker ps
23+
24+ echo " Docker logs:"
25+ docker logs " $CNT_NAME "
26+
27+ echo
28+ echo " Docker ps:"
29+ docker ps -a
30+
You can’t perform that action at this time.
0 commit comments