-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_spec_dev.yaml
More file actions
55 lines (49 loc) · 1.43 KB
/
build_spec_dev.yaml
File metadata and controls
55 lines (49 loc) · 1.43 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
version: 0.1
component: build
timeoutInSeconds: 1000
shell: bash
env:
exportedVariables:
- BUILDRUN_HASH
steps:
- type: Command
name: "Define unique build tag"
timeoutInSeconds: 140
command: |
echo "OCI_BUILD_RUN_ID: ${OCI_BUILD_RUN_ID}"
export BUILDRUN_HASH=`echo ${OCI_BUILD_RUN_ID} | rev | cut -c 1-7`
echo "BUILDRUN_HASH: " $BUILDRUN_HASH
- type: Command
name: "Install Nodejs"
command: |
sudo yum install -y oracle-nodejs-release-el7 oracle-release-el7
echo "Installation Complete..."
- type: Command
name: "Create .env.production"
command: |
echo "Creating .env.production file..."
echo "Parameters check:"
echo "VITE_GOOGLE_MAPS_API_KEY=${VITE_GOOGLE_MAPS_API_KEY}"
echo "VITE_SERVER_URL_API=${VITE_SERVER_URL_API}"
echo ""
echo "VITE_GOOGLE_MAPS_API_KEY=${VITE_GOOGLE_MAPS_API_KEY}" > .env.production
echo "VITE_SERVER_URL_API=${VITE_SERVER_URL_API}" >> .env.production
echo "=== .env.production content ==="
cat .env.production
echo "================================"
- type: Command
name: "Frontend build"
command: |
npm install
npm run build
echo "Build Done..."
- type: Command
name: "Zip build files"
command: |
cd dist
zip -r build.zip ./*
echo "Zip complete"
outputArtifacts:
- name: dev-frontend-artifact
type: BINARY
location: dist/build.zip