-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdevelop
More file actions
100 lines (56 loc) · 1.87 KB
/
develop
File metadata and controls
100 lines (56 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#!/usr/bin/env bash
if [ $# -gt 0 ]; then
if [ "$1" == "start" ]; then
docker-compose up -d
elif [ "$1" == "stop" ]; then
docker-compose down
elif [ "$1" == "composer" ] || [ "$1" == "comp" ]; then
shift 1
docker-compose exec \
app \
composer "$@"
elif [ "$1" == "test" ]; then
shift 1
docker-compose exec \
app \
./vendor/bin/phpunit "$@"
else
docker-compose "$@"
fi
else
docker-compose ps
fi
# Update the version in the package.json file and start a new
# git tag. The version variable contains the new version.
#git_tag=`npm version prerelease`
#remove the 'v' prefix from the version string
#version=${git_tag:1}
# Prepare the image prodution image name, with the new version.
#export TAG_BASE=my_repository/calculator
#export TAG=$TAG_BASE:${version}
# add a label with the version. We're using a new file,
# because we are going to push the changes to git,
#and we don't want to modify the original Dockerfile.
#cp Dockerfile.production Dockerfile
# Building the image (we don't nee the -f, because Dockerfile
# is the default):
#docker build -t $TAG --no-cache --build-arg VERSION=$version.
# Adding a local tag to the new image, for the test image's FROM:
#docker tag $TAG calcolator
# Building the test image:
#docker build -t calculator-test -f Dockerfile.test --no-cache .
# Running the test:
#docker run --rm calculator-test
# Remove the test image (cleanup)
#docker rmi calculator-test
# Push the new version back to git
#git checkout master
#git merge ${git_tag}
#git push --follow-tags
# Push the new tested production image to a docker
# repository:
#docker push $TAG
# [optional, based on the deployment policies] push
# the latest tag for this image:
#docker tag $TAG $BASE_TAG:latest
#docker push $BASE_TAG:latest