This repository was archived by the owner on May 31, 2019. It is now read-only.
File tree 3 files changed +23
-3
lines changed
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
6
6
: ${3?" Need to pass TAG as argument" }
7
7
: ${4?" Need to pass VERSION as argument" }
8
8
9
+ set +x
10
+
9
11
BASE_IMAGE=$1
10
12
TEST_APP=$2
11
13
TAG=$3
12
14
VERSION=$4
13
15
16
+
14
17
echo " [CI] Injecting Dockerfile to project $TEST_APP ..."
15
18
if [[ ! -d $SAMPLES_REPO /samples/$VERSION /$TEST_APP ]]; then
16
19
echo " [CI] Sample '$TEST_APP ' not found for Docker image '$VERSION '"
17
20
exit 1
18
21
fi
19
22
cd $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
21
32
FROM $BASE_IMAGE
22
33
COPY . /app
23
34
WORKDIR /app
@@ -26,6 +37,8 @@ ENV DNX_TRACE 1
26
37
ENTRYPOINT sleep 10000 | dnx . kestrel
27
38
EOF
28
39
40
+ fi
41
+
29
42
echo " [CI] Building Docker image for $TEST_APP , will tag as '$TAG '..."
30
43
docker build -t $TAG .
31
44
echo " [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
5
5
: ${1?" Need to pass Dockerfile search directory as argument" }
6
6
7
7
cd $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
20
20
# Wait to bootstrap the app
21
21
echo " [CI] Sleeping $SLEEP seconds to bootstrap the server..."
22
22
sleep $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