Skip to content

Commit 45246b0

Browse files
authored
Merge pull request kubernetes#14344 from alvaroaleman/move-config-to-config
Move prow/{plugins,config}.yaml to config/
2 parents 5b3409d + 8a5c72d commit 45246b0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1518
-83
lines changed

config/BUILD.bazel

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ sh_binary(
44
name = "mkpj",
55
srcs = ["mkpj_binary"],
66
args = [
7-
"--config-path=$(location //prow:config.yaml)",
7+
"--config-path=$(location //config/prow:config.yaml)",
88
"--job-config-path=config/jobs",
99
],
1010
data = [
1111
":prowjobs",
12-
"//prow:config.yaml",
12+
"//config/prow:config.yaml",
1313
],
1414
)
1515

@@ -49,6 +49,7 @@ filegroup(
4949
srcs = [
5050
":package-srcs",
5151
"//config/jobs/kubernetes-security:all-srcs",
52+
"//config/prow:all-srcs",
5253
"//config/tests/jobs:all-srcs",
5354
"//config/tests/testgrids:all-srcs",
5455
],

config/jobs/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ eg:
5454

5555
Prow supports [Presets](/prow/jobs.md#presets) to define and patch in common
5656
env vars and volumes used for credentials or common job config. Some are
57-
defined centrally in [`prow/config.yaml`], while others can be defined in
57+
defined centrally in [`config/prow/config.yaml`], while others can be defined in
5858
files here. eg:
5959

6060
- [`preset-service-account: "true"`] ensures the prowjob has a GCP service

config/jobs/kubernetes-security/genjobs.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ genjobs automatically generates the security repo presubmits from the
1919
kubernetes presubmits
2020
2121
NOTE: this makes a few assumptions
22-
- $PWD/../../prow/config.yaml is where the config lives (unless you supply --config=)
22+
- $PWD/../../config/prow/config.yaml is where the config lives (unless you supply --config=)
2323
- $PWD/.. is where the job configs live (unless you supply --jobs=)
2424
- the output is job configs ($PWD/..) + /kubernetes-security/generated-security-jobs.yaml (unless you supply --output)
2525
*/
@@ -47,7 +47,7 @@ import (
4747
"k8s.io/test-infra/prow/config"
4848
)
4949

50-
var configPath = flag.String("config", "", "path to prow/config.yaml, defaults to $PWD/../../prow/config.yaml")
50+
var configPath = flag.String("config", "", "path to config/prow/config.yaml, defaults to $PWD/../../config/prow/config.yaml")
5151
var jobsPath = flag.String("jobs", "", "path to prowjobs, defaults to $PWD/../")
5252
var outputPath = flag.String("output", "", "path to output the generated jobs to, defaults to $PWD/generated-security-jobs.yaml")
5353

@@ -315,13 +315,13 @@ func copyFile(srcPath, destPath string) error {
315315

316316
func main() {
317317
flag.Parse()
318-
// default to $PWD/prow/config.yaml
318+
// default to $PWD/config/prow/config.yaml
319319
pwd, err := os.Getwd()
320320
if err != nil {
321321
log.Fatalf("Failed to get $PWD: %v", err)
322322
}
323323
if *configPath == "" {
324-
*configPath = pwd + "/../../prow/config.yaml"
324+
*configPath = pwd + "/../../config/prow/config.yaml"
325325
}
326326
if *jobsPath == "" {
327327
*jobsPath = pwd + "/../"

config/jobs/kubernetes/test-infra/janitors.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ periodics:
1717
- go
1818
- run
1919
- experiment/ci-janitor/main.go
20-
- --config-path=prow/config.yaml
20+
- --config-path=config/prow/config.yaml
2121
- --job-config-path=config/jobs
2222
- --janitor-path=boskos/janitor/gcp_janitor.py
2323
image: gcr.io/k8s-testimages/kubekins-e2e:v20190917-d7c7545-master

config/jobs/kubernetes/test-infra/test-infra-presubmits.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ presubmits:
6363
- name: pull-test-infra-gubernator
6464
branches:
6565
- master
66-
run_if_changed: 'gubernator|prow/config.yaml'
66+
run_if_changed: 'gubernator|config/prow/config.yaml'
6767
decorate: true
6868
labels:
6969
preset-service-account: "true"

config/jobs/kubernetes/test-infra/test-infra-trusted.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1043,7 +1043,7 @@ periodics:
10431043
command:
10441044
- /app/prow/cmd/branchprotector/app.binary
10451045
args:
1046-
- --config-path=prow/config.yaml
1046+
- --config-path=config/prow/config.yaml
10471047
- --job-config-path=config/jobs
10481048
- --github-token-path=/etc/github/oauth
10491049
- --confirm

config/pj-on-kind.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ set -o nounset
2020
set -o pipefail
2121

2222
root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)"
23-
export CONFIG_PATH="${root}/prow/config.yaml"
23+
export CONFIG_PATH="${root}/config/prow/config.yaml"
2424
export JOB_CONFIG_PATH="${root}/config/jobs"
2525

2626
"${root}/prow/pj-on-kind.sh" "$@"

config/prow/BUILD.bazel

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package(default_visibility = ["//visibility:public"])
2+
3+
filegroup(
4+
name = "configs",
5+
srcs = glob(["*.yaml"]),
6+
)
7+
8+
filegroup(
9+
name = "package-srcs",
10+
srcs = glob(["**"]),
11+
tags = ["automanaged"],
12+
visibility = ["//visibility:private"],
13+
)
14+
15+
filegroup(
16+
name = "all-srcs",
17+
srcs = [":package-srcs"],
18+
tags = ["automanaged"],
19+
visibility = ["//visibility:public"],
20+
)

0 commit comments

Comments
 (0)