-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_spec.yaml
42 lines (39 loc) · 1.18 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
version: 0.1
component: build
timeoutInSeconds: 6000
runAs: root
shell: bash
env:
# these are local variables to the build config
variables:
key: "value"
# the value of a vaultVariable is the secret-id (in OCI ID format) stored in the OCI Vault service
# you can then access the value of that secret in your build_spec.yaml commands
vaultVariables:
# EXAMPLE_SECRET: "YOUR-SECRET-OCID"
# exportedVariables are made available to use as parameters in sucessor Build Pipeline stages
# For this Build to run, the Build Pipeline needs to have a BUILDRUN_HASH parameter set
exportedVariables:
- BUILDRUN_HASH
steps:
- type: Command
timeoutInSeconds: 1600
name: "Create Docker Image"
command: |
docker build -t node-function-service .
onFailure:
- type: Command
command: |
echo "docker build Failure"
timeoutInSeconds: 40
runAs: root
- type: Command
timeoutInSeconds: 400
name: "Test Docker Image"
command: |
build_result=SUCESS
patch_number==`echo ${OCI_BUILD_RUN_ID} | rev | cut -c 1-7`
outputArtifacts:
- name: build_artifact_image
type: DOCKER_IMAGE
location: node-function-service