Skip to content

Commit 96e5507

Browse files
committed
Tag major version builds
1 parent 714ee53 commit 96e5507

File tree

3 files changed

+8
-17
lines changed

3 files changed

+8
-17
lines changed

Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
ARG CLI_VERSION=2.10
2-
ARG PHP_VERSION=php7.3
1+
ARG CLI_VERSION=2.10-php7.3
32
# Extend the Docksal CLI per https://docs.docksal.io/stack/extend-images/
4-
FROM docksal/cli:${CLI_VERSION}-${PHP_VERSION}
3+
FROM docksal/cli:${CLI_VERSION}
54

65
# Puppeteer dependencies taken from https://github.com/alekzonder/docker-puppeteer
76
# Install addtional apt packages needed for pa11y and puppeteer

hooks/build

100644100755
Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,4 @@ printenv
55
echo "Cur dir"
66
pwd
77

8-
cliVersion="$SOURCE_BRANCH"
9-
phpVersions="$DOCKERFILE_PATH"
10-
#docker build \
11-
# --build-arg CLI_VERSION=${cliVersion} \
12-
# --build-arg PHP_VERSION=${phpVersion} \
13-
# -t $IMAGE_NAME \
14-
# .
8+
docker build --build-arg CLI_VERSION=$DOCKER_TAG -f $DOCKERFILE_PATH -t $IMAGE_NAME .

hooks/post_push

100644100755
Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@
33
echo "Post Push"
44
printenv
55

6-
# Parse image name for repo name
7-
tagStart=$(expr index "$IMAGE_NAME" :)
8-
repoName=${IMAGE_NAME:0:tagStart-1}
9-
tag="test"
6+
shortVersion=${SOURCE_BRANCH%.*-php*}
7+
phpVersion=${SOURCE_BRANCH#*-}
8+
tag="${shortVersion}-${phpVersion}"
109

11-
echo "repoName: $repoName"
12-
echo docker tag $IMAGE_NAME ${repoName}:${tag}
13-
echo docker push ${repoName}:${tag}
10+
docker tag $IMAGE_NAME $DOCKER_REPO:${tag}
11+
docker push $DOCKER_REPO:${tag}

0 commit comments

Comments
 (0)