forked from oracle-devrel/save-the-wildlife
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_spec.yaml
50 lines (47 loc) · 1.26 KB
/
build_spec.yaml
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
version: 0.1
component: build
timeoutInSeconds: 1200
failImmediatelyOnError: true
shell: bash
env:
exportedVariables:
- WS_SERVER_VERSION
- WEB_VERSION
- SCORE_VERSION
steps:
- type: Command
name: "Install libraries"
command: |
yum update -y
yum install jq -y
- type: Command
name: "Set up server versions"
command: |
export WS_SERVER_VERSION=$(cat server/package.json | jq .version | tr -d '/"')
echo "WS_SERVER_VERSION: $WS_SERVER_VERSION"
export WEB_VERSION=$(cat web/package.json | jq .version | tr -d '/"')
echo "WEB_VERSION: $WEB_VERSION"
export SCORE_VERSION=$(grep "version = " score/build.gradle | cut -d "'" -f2)
echo "SCORE_VERSION: $SCORE_VERSION"
- type: Command
name: "Build ws-server"
command: |
npx zx scripts/build.mjs ws-server
- type: Command
name: "Build web"
command: |
npx zx scripts/build.mjs web
- type: Command
name: "Build score"
command: |
npx zx scripts/build.mjs score
outputArtifacts:
- name: server
type: DOCKER_IMAGE
location: server:${WS_SERVER_VERSION}
- name: web
type: DOCKER_IMAGE
location: web:${WEB_VERSION}
- name: score
type: DOCKER_IMAGE
location: score:${SCORE_VERSION}