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

Adds pre commit job for cinder #37559

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ base_images:
build_root:
from_repository: true
images:
- dockerfile_literal: |
FROM src
RUN pip3 install pre-commit
from: src
to: openstack-operator-ci-pre-commit
- dockerfile_literal: |
FROM src
RUN pip3 install python-openstackclient
Expand Down Expand Up @@ -74,6 +79,18 @@ tests:
optional: true
steps:
workflow: openstack-k8s-operators-test-build-deploy
- as: precommit-check
commands: |
export SKIP=no-commit-to-branch
export GOFLAGS=
export PRE_COMMIT_HOME=/tmp
export GOLANGCI_LINT_CACHE=/tmp
mkdir -p ../operator/ && cp -r . ../operator
cd ../operator
pre-commit run -a --show-diff-on-failure
container:
from: openstack-operator-ci-pre-commit
optional: true
zz_generated_metadata:
branch: master
org: openstack-k8s-operators
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,54 @@ presubmits:
secret:
secretName: result-aggregator
trigger: (?m)^/test( | .* )images,?($|\s.*)
- agent: kubernetes
always_run: true
branches:
- ^master$
- ^master-
cluster: build04
context: ci/prow/precommit-check
decorate: true
labels:
ci.openshift.io/generator: prowgen
pj-rehearse.openshift.io/can-be-rehearsed: "true"
name: pull-ci-openstack-k8s-operators-cinder-operator-master-precommit-check
optional: true
rerun_command: /test precommit-check
spec:
containers:
- args:
- --gcs-upload-secret=/secrets/gcs/service-account.json
- --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson
- --report-credentials-file=/etc/report/credentials
- --target=precommit-check
command:
- ci-operator
image: ci-operator:latest
imagePullPolicy: Always
name: ""
resources:
requests:
cpu: 10m
volumeMounts:
- mountPath: /secrets/gcs
name: gcs-credentials
readOnly: true
- mountPath: /etc/pull-secret
name: pull-secret
readOnly: true
- mountPath: /etc/report
name: result-aggregator
readOnly: true
serviceAccountName: ci-operator
volumes:
- name: pull-secret
secret:
secretName: registry-pull-credentials
- name: result-aggregator
secret:
secretName: result-aggregator
trigger: (?m)^/test( | .* )precommit-check,?($|\s.*)
- agent: kubernetes
always_run: true
branches:
Expand Down