Skip to content

Commit

Permalink
Makefile: verify generated jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
bart0sh committed Jan 7, 2025
1 parent 8adde54 commit 51f4171
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,7 @@ verify-boilerplate:
.PHONY: verify-yamllint
verify-yamllint:
hack/make-rules/verify/yamllint.sh
.PHONY: verify-generated-jobs
verify-generated-jobs:
hack/make-rules/verify/generated-jobs.sh
#################################################################################
6 changes: 6 additions & 0 deletions hack/make-rules/verify/all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ if [[ "${VERIFY_GO_DEPS:-true}" == "true" ]]; then
hack/make-rules/verify/go-deps.sh || { FAILED+=($name); echo "ERROR: $name failed"; }
cd "${REPO_ROOT}"
fi
if [[ "${VERIFY_GENERATED_JOBS:-true}" == "true" ]]; then
name="generated jobs"
echo "verifying $name"
hack/make-rules/verify/generated-jobs.sh || { FAILED+=($name); echo "ERROR: $name failed"; }
cd "${REPO_ROOT}"
fi

# exit based on verify scripts
if [[ "${#FAILED[@]}" == 0 ]]; then
Expand Down
26 changes: 26 additions & 0 deletions hack/make-rules/verify/generated-jobs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env bash
# Copyright 2024 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -o errexit
set -o nounset
set -o pipefail

echo "Installing requirements3.txt"
hack/run-in-python-container.sh \
pip3 install -r requirements3.txt

echo "Verifying generated jobs"
hack/run-in-python-container.sh \
python3 hack/generate-jobs.py config/jobs/kubernetes/sig-node/*.conf --only-verify
1 change: 1 addition & 0 deletions requirements3.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ backports.functools_lru_cache==1.6.1
configparser==4.0.2
chardet==4.0.0
isort==4.3.21
Jinja2==3.1.5
pylint==2.4.4
parameterized==0.7.4
PyYAML==5.3
Expand Down

0 comments on commit 51f4171

Please sign in to comment.