-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sh
executable file
·37 lines (28 loc) · 874 Bytes
/
build.sh
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
# TODO: Once Cruiser is stable, replace this with a bonafide cruiser setup :)
# First, increment the version
git config user.name "GoCD Automation"
git config user.email "[email protected]"
npm version patch
version=$(npm version --json | jq '.["cruiser"]' | tr -d '"')
npm i
# Run the build
cd client
npm i
npm run build
gzip -9kr ./dist/cruiser/
cd ..
# Install server build deps
cd server
npm i
npm run build
cd ..
docker build -f server.dockerfile . -t harbor.dotglitch.dev/library/cruiser:$version
# Once built, push the new build number
git add package.json
git commit -m "⚛ [automation] increment version number"
git push
# Push the new docker image
docker push harbor.dotglitch.dev/library/cruiser:$version
# Inject the version number into the deployment files
sed -i -e "s/:latest/:$version/g" k3s.yml
sed -i -e "s/:latest/:$version/g" k3s.prod.yml