From b768829cb2fdba86e399c4dc1e551acbe601e75a Mon Sep 17 00:00:00 2001 From: Rado Chmiel Date: Mon, 29 Jan 2024 18:10:51 +0100 Subject: [PATCH] Adding pre-submit images build (#486) Dependency for pre-submit testing PRs: https://github.com/nephio-project/nephio/issues/373 --- .prow.yaml | 360 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 360 insertions(+) diff --git a/.prow.yaml b/.prow.yaml index 44c09614..d2cc6657 100644 --- a/.prow.yaml +++ b/.prow.yaml @@ -77,3 +77,363 @@ presubmits: - image: nephio/gotests:1671656214984921088 command: - "/usr/local/bin/lichen.sh" + + - name: build-push-pre-image-ueransim-deploy-fn + cluster: default + always_run: true + branches: + - "main" + annotations: + description: Build and Push Presubmit Image to Hub + decorate: true + decoration_config: + censor_secrets: true + max_concurrency: 0 + spec: + containers: + - name: kaniko + image: gcr.io/kaniko-project/executor:debug + command: + - "/bin/sh" + - "-c" + - | + executor --context=${PWD} \ + --dockerfile=krm-functions/ueransim-deploy-fn/Dockerfile --destination=nephio/pre-ueransim-deploy-fn:${PULL_BASE_REF} + volumeMounts: + - name: kaniko-secret + mountPath: /kaniko/.docker/ + resources: + requests: + cpu: 1 + memory: 1Gi + volumes: + - name: kaniko-secret + secret: + secretName: regcred + items: + - key: .dockerconfigjson + path: config.json + + - name: build-push-pre-image-configinject-fn + cluster: default + always_run: true + branches: + - "main" + annotations: + description: Build and Push Presubmit Image to Hub + decorate: true + decoration_config: + censor_secrets: true + max_concurrency: 0 + spec: + containers: + - name: kaniko + image: gcr.io/kaniko-project/executor:debug + command: + - "/bin/sh" + - "-c" + - | + executor --context=${PWD} \ + --dockerfile=krm-functions/configinject-fn/Dockerfile --destination=nephio/pre-configinject-fn:${BUILD_ID} + volumeMounts: + - name: kaniko-secret + mountPath: /kaniko/.docker/ + resources: + requests: + cpu: 1 + memory: 1Gi + volumes: + - name: kaniko-secret + secret: + secretName: regcred + items: + - key: .dockerconfigjson + path: config.json + + - name: build-push-pre-image-dnn-fn-commit-conf + cluster: default + always_run: true + branches: + - "main" + annotations: + description: Build and Push Presubmit Image to Hub + decorate: true + decoration_config: + censor_secrets: true + max_concurrency: 0 + spec: + containers: + - name: kaniko + image: gcr.io/kaniko-project/executor:debug + command: + - "/bin/sh" + - "-c" + - | + executor --context=${PWD} \ + --dockerfile=krm-functions/dnn-fn/Dockerfile --destination=nephio/pre-dnn-fn:${BUILD_ID} + volumeMounts: + - name: kaniko-secret + mountPath: /kaniko/.docker/ + resources: + requests: + cpu: 1 + memory: 1Gi + volumes: + - name: kaniko-secret + secret: + secretName: regcred + items: + - key: .dockerconfigjson + path: config.json + + - name: build-push-pre-image-gen-cmap-fn + cluster: default + always_run: true + branches: + - "main" + annotations: + description: Build and Push Presubmit Image to Hub + decorate: true + decoration_config: + censor_secrets: true + max_concurrency: 0 + spec: + containers: + - name: kaniko + image: gcr.io/kaniko-project/executor:debug + command: + - "/bin/sh" + - "-c" + - | + executor --context=${PWD} \ + --dockerfile=krm-functions/gen-configmap-fn/Dockerfile --destination=nephio/pre-gen-configmap-fn:${BUILD_ID} + volumeMounts: + - name: kaniko-secret + mountPath: /kaniko/.docker/ + resources: + requests: + cpu: 1 + memory: 1Gi + volumes: + - name: kaniko-secret + secret: + secretName: regcred + items: + - key: .dockerconfigjson + path: config.json + + - name: build-push-pre-image-interface-fn + cluster: default + always_run: true + branches: + - "main" + annotations: + description: Build and Push Presubmit Image to Hub + decorate: true + decoration_config: + censor_secrets: true + max_concurrency: 0 + spec: + containers: + - name: kaniko + image: gcr.io/kaniko-project/executor:debug + command: + - "/bin/sh" + - "-c" + - | + executor --context=${PWD} \ + --dockerfile=krm-functions/interface-fn/Dockerfile --destination=nephio/pre-interface-fn:${BUILD_ID} + volumeMounts: + - name: kaniko-secret + mountPath: /kaniko/.docker/ + resources: + requests: + cpu: 1 + memory: 1Gi + volumes: + - name: kaniko-secret + secret: + secretName: regcred + items: + - key: .dockerconfigjson + path: config.json + + - name: build-push-pre-image-ipam-fn + cluster: default + always_run: true + branches: + - "main" + annotations: + description: Build and Push Presubmit Image to Hub + decorate: true + decoration_config: + censor_secrets: true + max_concurrency: 0 + spec: + containers: + - name: kaniko + image: gcr.io/kaniko-project/executor:debug + command: + - "/bin/sh" + - "-c" + - | + executor --context=${PWD} \ + --dockerfile=krm-functions/ipam-fn/Dockerfile --destination=nephio/pre-ipam-fn:${BUILD_ID} + volumeMounts: + - name: kaniko-secret + mountPath: /kaniko/.docker/ + resources: + requests: + cpu: 1 + memory: 1Gi + volumes: + - name: kaniko-secret + secret: + secretName: regcred + items: + - key: .dockerconfigjson + path: config.json + + - name: build-push-pre-image-nad-fn + cluster: default + always_run: true + branches: + - "main" + annotations: + description: Build and Push Presubmit Image to Hub + decorate: true + decoration_config: + censor_secrets: true + max_concurrency: 0 + spec: + containers: + - name: kaniko + image: gcr.io/kaniko-project/executor:debug + command: + - "/bin/sh" + - "-c" + - | + executor --context=${PWD} \ + --dockerfile=krm-functions/nad-fn/Dockerfile --destination=nephio/pre-nad-fn:${BUILD_ID} + volumeMounts: + - name: kaniko-secret + mountPath: /kaniko/.docker/ + resources: + requests: + cpu: 1 + memory: 1Gi + volumes: + - name: kaniko-secret + secret: + secretName: regcred + items: + - key: .dockerconfigjson + path: config.json + + - name: build-push-pre-image-nfdeployfn + cluster: default + always_run: true + branches: + - "main" + annotations: + description: Build and Push Presubmit Image to Hub + decorate: true + decoration_config: + censor_secrets: true + max_concurrency: 0 + spec: + containers: + - name: kaniko + image: gcr.io/kaniko-project/executor:debug + command: + - "/bin/sh" + - "-c" + - | + executor --context=${PWD} \ + --dockerfile=krm-functions/nfdeploy-fn/Dockerfile --destination=nephio/pre-nfdeploy-fn:${BUILD_ID} + volumeMounts: + - name: kaniko-secret + mountPath: /kaniko/.docker/ + resources: + requests: + cpu: 1 + memory: 1Gi + volumes: + - name: kaniko-secret + secret: + secretName: regcred + items: + - key: .dockerconfigjson + path: config.json + + - name: build-push-pre-image-vlan-fn + cluster: default + always_run: true + branches: + - "main" + annotations: + description: Build and Push Presubmit Image to Hub + decorate: true + decoration_config: + censor_secrets: true + max_concurrency: 0 + spec: + containers: + - name: kaniko + image: gcr.io/kaniko-project/executor:debug + command: + - "/bin/sh" + - "-c" + - | + executor --context=${PWD} \ + --dockerfile=krm-functions/vlan-fn/Dockerfile --destination=nephio/pre-vlan-fn:${BUILD_ID} + volumeMounts: + - name: kaniko-secret + mountPath: /kaniko/.docker/ + resources: + requests: + cpu: 1 + memory: 1Gi + volumes: + - name: kaniko-secret + secret: + secretName: regcred + items: + - key: .dockerconfigjson + path: config.json + + - name: build-push-pre-image-nephio-operator + cluster: default + always_run: true + branches: + - "main" + annotations: + description: Build and Push Presubmit Image to Hub + decorate: true + decoration_config: + censor_secrets: true + max_concurrency: 0 + spec: + containers: + - name: kaniko + image: gcr.io/kaniko-project/executor:debug + command: + - "/bin/sh" + - "-c" + - | + executor --context=${PWD} \ + --dockerfile=operators/nephio-controller-manager/Dockerfile --destination=nephio/pre-nephio-operator:${BUILD_ID} + volumeMounts: + - name: kaniko-secret + mountPath: /kaniko/.docker/ + resources: + requests: + cpu: 1 + memory: 1Gi + volumes: + - name: kaniko-secret + secret: + secretName: regcred + items: + - key: .dockerconfigjson + path: config.json