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

Commit 45f3251

Browse files
committed
Merge pull request #82 from ahmetalpbalkan/use-dockerfile
Use existing sample Dockerfiles in CI. Remove beta4 from CI
2 parents 0e9a1c8 + ddfeae6 commit 45f3251

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

.ci/build-app-image.sh

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff 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+
911
BASE_IMAGE=$1
1012
TEST_APP=$2
1113
TAG=$3
1214
VERSION=$4
1315

16+
1417
echo "[CI] Injecting Dockerfile to project $TEST_APP..."
1518
if [[ ! -d $SAMPLES_REPO/samples/$VERSION/$TEST_APP ]]; then
1619
echo "[CI] Sample '$TEST_APP' not found for Docker image '$VERSION'"
1720
exit 1
1821
fi
1922
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
2132
FROM $BASE_IMAGE
2233
COPY . /app
2334
WORKDIR /app
@@ -26,6 +37,8 @@ ENV DNX_TRACE 1
2637
ENTRYPOINT sleep 10000 | dnx . kestrel
2738
EOF
2839

40+
fi
41+
2942
echo "[CI] Building Docker image for $TEST_APP, will tag as '$TAG'..."
3043
docker build -t $TAG .
3144
echo "[CI] Built Docker image '$TAG'"

.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 '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'

.ci/start-container.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff 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
2121
echo "[CI] Sleeping $SLEEP seconds to bootstrap the server..."
2222
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+

0 commit comments

Comments
 (0)