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 cluster-inventory build and pull jobs #8877

Merged
merged 12 commits into from
Sep 12, 2023
105 changes: 105 additions & 0 deletions prow/jobs/cluster-inventory/cluster-inventory.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# Code generated by rendertemplates. DO NOT EDIT.


presubmits: # runs on PRs
kyma-project/cluster-inventory:
- name: pull-cluster-inventory-build
annotations:
description: "run cluster-inventory build"
owner: "framefrog"
labels:
prow.k8s.io/pubsub.project: "sap-kyma-prow"
prow.k8s.io/pubsub.runID: "pull-cluster-inventory-build"
prow.k8s.io/pubsub.topic: "prowjobs"
preset-sa-kyma-push-images: "true"
always_run: true
skip_report: false
decorate: true
cluster: untrusted-workload
max_concurrency: 10
spec:
containers:
- image: "eu.gcr.io/sap-kyma-neighbors-dev/image-builder:v20230313-8dfce5f0b"
securityContext:
privileged: false
seccompProfile:
type: RuntimeDefault
allowPrivilegeEscalation: false
command:
- "/image-builder"
args:
- "--name=cluster-inventory"
- "--config=/config/kaniko-build-config.yaml"
- "--dockerfile=Dockerfile"
resources:
requests:
memory: 1.5Gi
cpu: 1
volumeMounts:
- name: config
mountPath: /config
readOnly: true
- name: signify-secret
mountPath: /secret
readOnly: true
volumes:
- name: config
configMap:
name: kaniko-build-config
- name: signify-secret
secret:
secretName: signify-dev-secret

postsubmits: # runs on main
kyma-project/cluster-inventory:
- name: main-cluster-inventory-build
annotations:
description: "build cluster-inventory"
owner: "framefrog"
labels:
prow.k8s.io/pubsub.project: "sap-kyma-prow"
prow.k8s.io/pubsub.runID: "main-cluster-inventory-build"
prow.k8s.io/pubsub.topic: "prowjobs"
preset-sa-kyma-push-images: "true"
preset-signify-prod-secret: "true"
always_run: true
skip_report: false
decorate: true
cluster: trusted-workload
max_concurrency: 10
branches:
- ^main$
spec:
containers:
- image: "eu.gcr.io/sap-kyma-neighbors-dev/image-builder:v20230313-8dfce5f0b"
securityContext:
privileged: false
seccompProfile:
type: RuntimeDefault
allowPrivilegeEscalation: false
command:
- "/image-builder"
args:
- "--name=cluster-inventory"
- "--config=/config/kaniko-build-config.yaml"
- "--dockerfile=Dockerfile"
- "--tag=latest"
resources:
requests:
memory: 1.5Gi
cpu: 1
volumeMounts:
- name: config
mountPath: /config
readOnly: true
- name: signify-secret
mountPath: /secret
readOnly: true
volumes:
- name: config
configMap:
name: kaniko-build-config
- name: signify-secret
secret:
secretName: signify-dev-secret

43 changes: 43 additions & 0 deletions templates/data/cluster-inventory-data.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
templates:
- from: generic.tmpl
render:
- to: ../../prow/jobs/cluster-inventory/cluster-inventory.yaml
localSets:
jobConfig_default:
imagePullPolicy: "Always"
jobConfigs:
- repoName: kyma-project/cluster-inventory
jobs:
- jobConfig:
name: pull-cluster-inventory-build
annotations:
owner: framefrog
description: run cluster-inventory build
always_run: true
args:
- "--name=cluster-inventory"
- "--config=/config/kaniko-build-config.yaml"
- "--dockerfile=Dockerfile"
inheritedConfigs:
global:
- kaniko_buildpack
- jobConfig_presubmit
- jobConfig:
name: main-cluster-inventory-build
annotations:
owner: framefrog
description: build cluster-inventory
labels:
preset-signify-prod-secret: "true"
branches:
- ^main$ # any pr against main triggers this
always_run: true
args:
- "--name=cluster-inventory"
- "--config=/config/kaniko-build-config.yaml"
- "--dockerfile=Dockerfile"
- "--tag=latest"
inheritedConfigs:
global:
- kaniko_buildpack
- jobConfig_postsubmit