Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add feature of building images in ADO #8806

Merged
merged 40 commits into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
1e81b3a
Add sign-only mode.
dekiel Aug 29, 2023
3616d95
POC of image building in ADO.
dekiel Sep 28, 2023
580e323
Merge remote-tracking branch 'upstream/main' into sign-only
dekiel Sep 28, 2023
669f068
go mod tidy
dekiel Sep 28, 2023
1f907f4
Use default build config.
dekiel Nov 15, 2023
20d2d43
Merge remote-tracking branch 'upstream/main' into sign-only
dekiel Nov 15, 2023
8e0f245
Add sign-only mode.
dekiel Aug 29, 2023
00c757c
POC of image building in ADO.
dekiel Sep 28, 2023
9785b2e
go mod tidy
dekiel Sep 28, 2023
c1aac7e
Use default build config.
dekiel Nov 15, 2023
e31765e
Merge remote-tracking branch 'origin/sign-only' into sign-only
dekiel Nov 15, 2023
d788eef
fix linter errors
dekiel Nov 15, 2023
239242a
rendertemplates
dekiel Nov 15, 2023
28983db
go get -t github.com/kyma-project/test-infra/pkg/prow/pjconfigtests
dekiel Nov 15, 2023
b53cec8
Fixed test.
dekiel Nov 15, 2023
9ec1a34
Fix test
dekiel Nov 15, 2023
d6f8c96
Refactored code for building images in ADO.
dekiel Nov 20, 2023
36f93bb
Linter errors.
dekiel Nov 20, 2023
b315b5a
Move ado code to separate pacakge and make it testable.
dekiel Nov 21, 2023
6a981e2
Move build in ado code to separate package. This can be tested indepe…
dekiel Nov 23, 2023
fbeddaa
Tests.
dekiel Nov 29, 2023
ad70c89
Merge remote-tracking branch 'upstream/main' into sign-only
dekiel Nov 29, 2023
8933589
go mod tidy
dekiel Nov 29, 2023
f8d9971
Missing mocks.
dekiel Nov 29, 2023
07db1e7
Key name aligned with ADO pipeline parameter name.
dekiel Nov 29, 2023
6d1df04
Added building image-builder image to the prowjob.
dekiel Nov 29, 2023
e45d937
Merge remote-tracking branch 'upstream/main' into sign-only
dekiel Nov 29, 2023
285a165
go mod tidy
dekiel Nov 29, 2023
187529f
Aligned client with expected ado pipeline parameters names.
dekiel Nov 29, 2023
887f10e
Fixed validation.
dekiel Nov 29, 2023
4dd0d9c
Use go buildpack. Chainguard offers free access to the latest tag only.
dekiel Nov 30, 2023
4db4e88
Moved Dockerfile back to original location. images directory is not s…
dekiel Nov 30, 2023
42e42b2
Build image-builder image in prowjob.
dekiel Nov 30, 2023
2e08430
Apply suggestions from code review
dekiel Dec 1, 2023
4e69981
Unexport options fields.
dekiel Dec 1, 2023
fd943b1
Use sets.Strings.
dekiel Dec 1, 2023
1e029d9
This tests will be added in separate pr.
dekiel Dec 1, 2023
92b0629
Not in use yet.
dekiel Dec 1, 2023
18af0ab
Remove testing prowjob.
dekiel Dec 4, 2023
40fdf03
Align build config with expected schema.
dekiel Dec 4, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .mockery.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
with-expecter: true
packages:
github.com/kyma-project/test-infra/pkg/azuredevops/pipelines:
config:
include-regex: ".*Client"
dir: "{{.InterfaceDir}}/mocks"
outpkg: "{{.PackageName}}mocks"
2 changes: 2 additions & 0 deletions cmd/image-builder/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ import (
"fmt"
"os"

adoPipelines "github.com/kyma-project/test-infra/pkg/azuredevops/pipelines"
"github.com/kyma-project/test-infra/pkg/sign"
"github.com/kyma-project/test-infra/pkg/tags"
"gopkg.in/yaml.v3"
)

type Config struct {
AdoConfig adoPipelines.Config `yaml:"ado-config,omitempty" json:"ado-config,omitempty"`
// Registry is URL where clean build should land.
Registry Registry `yaml:"registry" json:"registry"`
// DevRegistry is Registry URL where development/dirty images should land.
Expand Down
13 changes: 10 additions & 3 deletions cmd/image-builder/images/kaniko/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
FROM gcr.io/kaniko-project/executor:v1.9.0
FROM europe-docker.pkg.dev/kyma-project/prod/testimages/buildpack-go:v20231128-9bb59ac6 AS builder

COPY ./image-builder /image-builder
WORKDIR /
COPY . /app/
RUN cd /app/cmd/image-builder && CGO_ENABLED=0 go build -o /app/image-builder -a -ldflags '-extldflags "-static"' .

ENTRYPOINT ["/image-builder"]

FROM gcr.io/kaniko-project/executor:v1.14.0

COPY --from=builder /app/image-builder /image-builder

ENTRYPOINT ["/image-builder"]
Loading