-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.yml
52 lines (46 loc) · 1.22 KB
/
build.yml
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
version: 1.1
kind: operation
name: build_minimal
patchStrategy: pre_merge
component:
version: 1.1
kind: component
name: build
description: "Build container images with Polyaxon dockerizer"
tags: ["build"]
inputs:
- name: dockerfile
isOptional: true
type: str
value: Dockerfile
outputs:
- name: destination
type: image
connection: quay-dockerizer
plugins:
docker: true
run:
kind: job
connections: ["quay-dockerizer"]
init:
- container:
name: move-dockerfile
image: alpine
command: ['sh', '-c', '(ls -lah {{ globals.artifacts_path }}/repo && cp {{ globals.artifacts_path }}/repo/{{ params.dockerfile.value }} {{ globals.artifacts_path }}/repo/Dockerfile)']
volumeMounts:
- name: artifacts-context
mountPath: /plx-context/artifacts
container:
image: polyaxon/polyaxon-dockerizer:1.1.9
imagePullPolicy: "Always"
args: [
"build-and-push",
"-c",
"{{ globals.artifacts_path }}/repo",
"-d",
"{{ connections[\"quay-dockerizer\"].url + '/' + destination }}",
"{{ nocache }}"
]
env:
- name: PYTHONUNBUFFERED
value: "true"