Skip to content

Commit 65853fb

Browse files
committed
add temp fixture & target
Signed-off-by: Danny Brito <[email protected]>
1 parent 52c771e commit 65853fb

File tree

2 files changed

+158
-2
lines changed

2 files changed

+158
-2
lines changed

docker-bake.hcl

Lines changed: 58 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,63 @@ target "examples" {
221221
tags = ["local/dalec/examples/${f}:${distro}"]
222222
}
223223

224+
target "go-stuff" {
225+
name = "examples-${f}-${tgt}"
226+
matrix = {
227+
distro = ["azlinux3"]
228+
f = ["simple-go-require"]
229+
tgt = ["sources", "patched-sources"]
230+
}
231+
args = {
232+
"BUILDKIT_SYNTAX" = "dalec_frontend"
233+
}
234+
contexts = {
235+
"dalec_frontend" = "target:frontend"
236+
}
237+
// target = "${distro}/container"
238+
// target = "debug/sources"
239+
target = "debug/${tgt}"
240+
dockerfile = "test/fixtures/${f}.yml"
241+
// tags = ["local/dralec/examples/${f}:${distro}"]
242+
output = [ "_output/_src_${tgt}" ]
243+
244+
}
245+
target "go-azl3-container-stuff" {
246+
name = "examples-${f}-${tgt}"
247+
matrix = {
248+
distro = ["azlinux3"]
249+
f = ["simple-go-require"]
250+
tgt = ["rpm"]
251+
}
252+
args = {
253+
"BUILDKIT_SYNTAX" = "dalec_frontend"
254+
}
255+
contexts = {
256+
"dalec_frontend" = "target:frontend"
257+
}
258+
target = "${distro}/${tgt}"
259+
dockerfile = "test/fixtures/${f}.yml"
260+
tags = ["local/dalec/examples/${f}:${distro}"]
261+
output = [ "_output/_src_${tgt}" ]
262+
263+
}
264+
target "godebugmod" {
265+
name = "godebugmod-examples-${replace(tgt, "/", "-")}-${f}"
266+
matrix = {
267+
f = ["simple-go-require"]
268+
tgt = ["azlinux3/rpm/debug/sources", "jammy/deb","jammy/dsc"]
269+
}
270+
args = {
271+
"BUILDKIT_SYNTAX" = "dalec_frontend"
272+
}
273+
contexts = {
274+
"dalec_frontend" = "target:frontend"
275+
}
276+
target = tgt
277+
dockerfile = "test/fixtures/${f}.yml"
278+
output = [ "_output/_src_debug_gomods_${replace(tgt, "/", "-")}" ]
279+
}
280+
224281
target "deps-only" {
225282
name = "deps-only-${distro}"
226283
matrix = {
@@ -280,5 +337,4 @@ target "worker" {
280337
contexts = {
281338
"dalec_frontend" = "target:frontend"
282339
}
283-
}
284-
340+
}
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
#syntax=local/dalec/frontend:test
2+
args:
3+
VERSION: 1.5.1
4+
COMMIT: a8ca31655b37214a6038a3e2a53b4c6d81ba21f5
5+
REVISION: 1
6+
7+
name: go-md2man
8+
version: ${VERSION}
9+
revision: ${REVISION}
10+
packager: Dalec Example
11+
vendor: Dalec Example
12+
license: MIT
13+
description: A tool to convert markdown into man pages (roff).
14+
website: https://github.com/cpuguy83/go-md2man
15+
16+
x-vars:
17+
msft-key: &msft-key
18+
msft.asc:
19+
http:
20+
url: https://packages.microsoft.com/keys/microsoft.asc
21+
digest: sha256:2fa9c05d591a1582a9aba276272478c262e95ad00acf60eaee1644d93941e3c6
22+
permissions: 0o644
23+
msft-repo-envs: &msft-repo-envs
24+
- build
25+
jammy-repo: &jammy-repo
26+
- keys: *msft-key
27+
config:
28+
microsoft-prod.list:
29+
inline:
30+
file:
31+
contents: deb [arch=amd64,arm64,armhf signed-by=/usr/share/keyrings/msft.asc] https://packages.microsoft.com/ubuntu/22.04/prod jammy main
32+
envs: *msft-repo-envs
33+
34+
sources:
35+
src:
36+
generate:
37+
- gomod:
38+
edits:
39+
require:
40+
- github.com/russross/blackfriday/v2:github.com/russross/blackfriday/[email protected]
41+
git:
42+
url: https://github.com/cpuguy83/go-md2man.git
43+
commit: v2.0.0
44+
45+
autoscaler:
46+
generate:
47+
- gomod:
48+
paths:
49+
- vertical-pod-autoscaler
50+
- cluster-autoscaler
51+
edits:
52+
require:
53+
- github.com/spf13/pflag:github.com/spf13/[email protected]
54+
git:
55+
url: https://github.com/kubernetes/autoscaler.git
56+
commit: ${COMMIT}
57+
58+
dependencies:
59+
build:
60+
golang:
61+
62+
targets:
63+
jammy:
64+
dependencies:
65+
build:
66+
msft-golang:
67+
version:
68+
- ">= 1.24.0"
69+
extra_repos: *jammy-repo
70+
71+
build:
72+
env:
73+
CGO_ENABLED: "0"
74+
steps:
75+
- command: |
76+
cd src
77+
go build -o go-md2man .
78+
- command: |
79+
set -xe
80+
cd autoscaler/vertical-pod-autoscaler
81+
# check that the go.mod is patched with the require directive
82+
grep -q "github.com/spf13/pflag v1.0.10" go.mod
83+
# verify the module cache exists
84+
test -d "${GOMODCACHE}/github.com/spf13/[email protected]"
85+
cd ../cluster-autoscaler
86+
grep -q "github.com/spf13/pflag v1.0.10" go.mod
87+
88+
artifacts:
89+
binaries:
90+
src/go-md2man:
91+
92+
image:
93+
entrypoint: go-md2man
94+
cmd: --help
95+
96+
tests:
97+
- name: Check bin
98+
files:
99+
/usr/bin/go-md2man:
100+
permissions: 0755

0 commit comments

Comments
 (0)