forked from josenetoo/node-sample-oci-devops-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_spec.yaml
36 lines (32 loc) · 1.08 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
version: 0.1
component: build
timeoutInSeconds: 6000
runAs: root
shell: bash
env:
# these are local variables to the build config
variables:
# 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:
# 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
name: "Define unique image tag"
timeoutInSeconds: 40
command: |
export BUILDRUN_HASH=`echo ${OCI_BUILD_RUN_ID} | rev | cut -c 1-7`
echo "BUILDRUN_HASH: " $BUILDRUN_HASH
- type: Command
timeoutInSeconds: 1200
name: "Build container image"
command: |
d ${OCI_WORKSPACE_DIR}/node_app
docker build -t node-oke-app .
outputArtifacts:
- name: node-oke-app
type: DOCKER_IMAGE
location: node-oke-app:latest