-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path04-builders.feature
48 lines (46 loc) · 1.46 KB
/
04-builders.feature
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
Feature: Builders
Use cases will often involve more than simply copying files to the image.
Many will require a build step: some process that creates additional files
in the image's local filesystem needed at runtime.
@set3
Scenario: Compiling an application from source
Given "examples/hello-world-c" as a working directory
And this "blubber.yaml"
"""
version: v4
variants:
build:
base: debian:bullseye
apt:
packages:
- gcc
- libc6-dev
builder:
requirements: [main.c]
command: [gcc, -o, hello, main.c]
entrypoint: [./hello]
"""
When you build the "build" variant
Then the image will have the following files in the default working directory
| hello |
@set4
Scenario: Compiling an application using multiple builders
Given "examples/hello-world-go" as a working directory
And this "blubber.yaml"
"""
version: v4
variants:
build:
base: golang:1.18
builders:
- custom:
requirements: [go.mod, go.sum]
command: [go, mod, download]
- custom:
requirements: [main.go]
command: [go, build, .]
entrypoint: [./hello-world-go]
"""
When you build the "build" variant
Then the image will have the following files in the default working directory
| hello-world-go |