Skip to content

Commit 768c618

Browse files
committed
Make the helper scripts in docker/ a bit more robust
When the git repo is in a detached HEAD state, GIT_BRANCH_NAME became "HEAD", which docker does not like as a project name. So I lowercased it and added a cms- in front for good measure.
1 parent 6ced7a5 commit 768c618

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

docker/cms-dev.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22
set -x
33

4-
GIT_BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
4+
GIT_BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD | tr A-Z a-z)
55

6-
docker compose -p $GIT_BRANCH_NAME -f docker/docker-compose.dev.yml run --build --rm --service-ports devcms
6+
docker compose -p cms-$GIT_BRANCH_NAME -f docker/docker-compose.dev.yml run --build --rm --service-ports devcms

docker/cms-stresstest.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22
set -x
33

4-
GIT_BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
4+
GIT_BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD | tr A-Z a-z)
55

6-
docker compose -p $GIT_BRANCH_NAME -f docker/docker-compose.test.yml run --build --rm stresstestcms
6+
docker compose -p cms-$GIT_BRANCH_NAME -f docker/docker-compose.test.yml run --build --rm stresstestcms

docker/cms-test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22
set -x
33

4-
GIT_BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
4+
GIT_BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD | tr A-Z a-z)
55

6-
docker compose -p $GIT_BRANCH_NAME -f docker/docker-compose.test.yml run --build --rm testcms
6+
docker compose -p cms-$GIT_BRANCH_NAME -f docker/docker-compose.test.yml run --build --rm testcms

0 commit comments

Comments
 (0)