Skip to content

Commit

Permalink
Merge pull request #4 from radoslawc/pre_image
Browse files Browse the repository at this point in the history
Adding pre-submit image build
  • Loading branch information
nephio-prow[bot] authored Jan 15, 2024
2 parents 9f6a3ee + 60aed78 commit 47fb73b
Showing 1 changed file with 37 additions and 1 deletion.
38 changes: 37 additions & 1 deletion .prow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,40 @@ presubmits:
- |
for i in \
$(egrep -rl --null --include \*.go 'package\s+main\b' | xargs -0 -L 1 dirname | sort -u | xargs -d '\n' -L 1 printf "%s " ) ; \
do cd $i; echo $i; rm -f /tmp/cmd; go build -o "/tmp/cmd"; lichen -c /etc/lichen.yaml "/tmp/cmd" || exit 1; cd - ;done
do cd $i; echo $i; rm -f /tmp/cmd; go build -o "/tmp/cmd"; lichen -c /etc/lichen.yaml "/tmp/cmd" || exit 1; cd - ;done
- name: build-push-pre-image-oai
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=Dockerfile --destination=nephio/oai-ran-controller:${BUILD_ID}
volumeMounts:
- name: kaniko-secret
mountPath: /kaniko/.docker/
resources:
requests:
cpu: 2
memory: 2Gi
volumes:
- name: kaniko-secret
secret:
secretName: regcred
items:
- key: .dockerconfigjson
path: config.json

0 comments on commit 47fb73b

Please sign in to comment.