From 615da262bc7feedf2490682a4cab22959a987315 Mon Sep 17 00:00:00 2001 From: Adam Harvey Date: Tue, 15 Oct 2024 00:07:27 -0400 Subject: [PATCH 1/4] feat: Support CircleCI IP Ranges Signed-off-by: Adam Harvey --- src/executors/default.yml | 4 ++++ src/executors/python.yml | 4 ++++ src/jobs/continue.yml | 4 ++++ src/jobs/lint.yml | 4 ++++ src/jobs/pack.yml | 4 ++++ src/jobs/publish.yml | 4 ++++ src/jobs/review.yml | 4 ++++ 7 files changed, 28 insertions(+) diff --git a/src/executors/default.yml b/src/executors/default.yml index 8e59d78c..101f8ded 100644 --- a/src/executors/default.yml +++ b/src/executors/default.yml @@ -13,6 +13,10 @@ parameters: type: enum enum: ["small", "medium", "medium+", "large", "xlarge", "2xlarge", "2xlarge+"] default: "medium" + circleci_ip_ranges: + description: Enables jobs to go through a set of well-defined IP address ranges. + type: boolean + default: false resource_class: << parameters.resource_class >> docker: diff --git a/src/executors/python.yml b/src/executors/python.yml index b6cf0c06..1f05dbf6 100644 --- a/src/executors/python.yml +++ b/src/executors/python.yml @@ -13,6 +13,10 @@ parameters: type: enum enum: ["small", "medium", "medium+", "large", "xlarge", "2xlarge", "2xlarge+"] default: "medium" + circleci_ip_ranges: + description: Enables jobs to go through a set of well-defined IP address ranges. + type: boolean + default: false resource_class: << parameters.resource_class >> docker: diff --git a/src/jobs/continue.yml b/src/jobs/continue.yml index a7ab06b1..b9f20f29 100644 --- a/src/jobs/continue.yml +++ b/src/jobs/continue.yml @@ -55,6 +55,10 @@ parameters: description: The executor to use for this job. By default, this will use the "default" executor provided by this orb. type: executor default: default + circleci_ip_ranges: + description: Enables jobs to go through a set of well-defined IP address ranges. + type: boolean + default: false executor: << parameters.executor >> diff --git a/src/jobs/lint.yml b/src/jobs/lint.yml index 5dcbd772..b961135d 100644 --- a/src/jobs/lint.yml +++ b/src/jobs/lint.yml @@ -15,6 +15,10 @@ parameters: description: The executor to use for this job. By default, this will use the "python" executor provided by this orb. type: executor default: python + circleci_ip_ranges: + description: Enables jobs to go through a set of well-defined IP address ranges. + type: boolean + default: false executor: << parameters.executor >> diff --git a/src/jobs/pack.yml b/src/jobs/pack.yml index 5f895e39..60af2d5d 100644 --- a/src/jobs/pack.yml +++ b/src/jobs/pack.yml @@ -45,6 +45,10 @@ parameters: You can use "org_id" instead if you prefer. type: string default: "" + circleci_ip_ranges: + description: Enables jobs to go through a set of well-defined IP address ranges. + type: boolean + default: false executor: << parameters.executor >> diff --git a/src/jobs/publish.yml b/src/jobs/publish.yml index 0202e402..d017ad42 100644 --- a/src/jobs/publish.yml +++ b/src/jobs/publish.yml @@ -84,6 +84,10 @@ parameters: description: The executor to use for this job. By default, this will use the "default" executor provided by this orb. type: executor default: default + circleci_ip_ranges: + description: Enables jobs to go through a set of well-defined IP address ranges. + type: boolean + default: false attach_workspace: type: boolean default: true diff --git a/src/jobs/review.yml b/src/jobs/review.yml index 8119e7c3..6ef5a879 100644 --- a/src/jobs/review.yml +++ b/src/jobs/review.yml @@ -36,6 +36,10 @@ parameters: description: The executor to use for this job. By default, this will use the "python" executor provided by this orb. type: executor default: python + circleci_ip_ranges: + description: Enables jobs to go through a set of well-defined IP address ranges. + type: boolean + default: false executor: << parameters.executor >> From c73464254cc37f8402672f1044faf51c4451bb07 Mon Sep 17 00:00:00 2001 From: Adam Harvey Date: Tue, 15 Oct 2024 00:07:36 -0400 Subject: [PATCH 2/4] chore: Fix typo --- src/scripts/review.bats | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/review.bats b/src/scripts/review.bats index a2e2b559..aa9a6a26 100644 --- a/src/scripts/review.bats +++ b/src/scripts/review.bats @@ -44,7 +44,7 @@ setup() { fi } -@test "RC004: Usage example names shoud be descriptive." { +@test "RC004: Usage example names should be descriptive." { if [[ "${SKIPPED_REVIEW_CHECKS[*]}" =~ "RC004" ]]; then skip fi From bbab5c9168174946fb0b848617a7ebee3ba60796 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Alberto=20Monta=C3=B1o=20Fetecua?= Date: Thu, 31 Oct 2024 11:29:20 -0500 Subject: [PATCH 3/4] fix: use new parameter in job definitions --- src/jobs/continue.yml | 2 ++ src/jobs/lint.yml | 2 ++ src/jobs/pack.yml | 2 ++ src/jobs/publish.yml | 2 ++ src/jobs/review.yml | 2 ++ src/scripts/publish.sh | 2 +- 6 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/jobs/continue.yml b/src/jobs/continue.yml index b9f20f29..107468f8 100644 --- a/src/jobs/continue.yml +++ b/src/jobs/continue.yml @@ -62,6 +62,8 @@ parameters: executor: << parameters.executor >> +circleci_ip_ranges: << parameters.circleci_ip_ranges >> + steps: - when: condition: <> diff --git a/src/jobs/lint.yml b/src/jobs/lint.yml index b961135d..e7c74658 100644 --- a/src/jobs/lint.yml +++ b/src/jobs/lint.yml @@ -22,6 +22,8 @@ parameters: executor: << parameters.executor >> +circleci_ip_ranges: << parameters.circleci_ip_ranges >> + steps: - when: condition: <> diff --git a/src/jobs/pack.yml b/src/jobs/pack.yml index 60af2d5d..7aea9ba1 100644 --- a/src/jobs/pack.yml +++ b/src/jobs/pack.yml @@ -52,6 +52,8 @@ parameters: executor: << parameters.executor >> +circleci_ip_ranges: << parameters.circleci_ip_ranges >> + steps: - when: condition: <> diff --git a/src/jobs/publish.yml b/src/jobs/publish.yml index d017ad42..577c93c4 100644 --- a/src/jobs/publish.yml +++ b/src/jobs/publish.yml @@ -99,6 +99,8 @@ parameters: executor: << parameters.executor >> +circleci_ip_ranges: << parameters.circleci_ip_ranges >> + steps: - when: condition: <> diff --git a/src/jobs/review.yml b/src/jobs/review.yml index 6ef5a879..f35afe44 100644 --- a/src/jobs/review.yml +++ b/src/jobs/review.yml @@ -43,6 +43,8 @@ parameters: executor: << parameters.executor >> +circleci_ip_ranges: << parameters.circleci_ip_ranges >> + steps: - when: condition: <> diff --git a/src/scripts/publish.sh b/src/scripts/publish.sh index 829b4b3e..f5291ce3 100644 --- a/src/scripts/publish.sh +++ b/src/scripts/publish.sh @@ -87,4 +87,4 @@ function orbPublish() { ORB_RELEASE_VERSION="" ORB_VAL_ORB_PUB_TOKEN=${!ORB_VAL_ORB_PUB_TOKEN} mkdir -p /tmp/orb_dev_kit/ -orbPublish \ No newline at end of file +orbPublish From 0f4ddd474f77a9056975ec07beef19e7baee0771 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Alberto=20Monta=C3=B1o=20Fetecua?= Date: Thu, 31 Oct 2024 16:57:19 -0500 Subject: [PATCH 4/4] fix: removing uneeded parameters from the executors --- src/executors/default.yml | 4 ---- src/executors/python.yml | 4 ---- 2 files changed, 8 deletions(-) diff --git a/src/executors/default.yml b/src/executors/default.yml index 101f8ded..8e59d78c 100644 --- a/src/executors/default.yml +++ b/src/executors/default.yml @@ -13,10 +13,6 @@ parameters: type: enum enum: ["small", "medium", "medium+", "large", "xlarge", "2xlarge", "2xlarge+"] default: "medium" - circleci_ip_ranges: - description: Enables jobs to go through a set of well-defined IP address ranges. - type: boolean - default: false resource_class: << parameters.resource_class >> docker: diff --git a/src/executors/python.yml b/src/executors/python.yml index 1f05dbf6..b6cf0c06 100644 --- a/src/executors/python.yml +++ b/src/executors/python.yml @@ -13,10 +13,6 @@ parameters: type: enum enum: ["small", "medium", "medium+", "large", "xlarge", "2xlarge", "2xlarge+"] default: "medium" - circleci_ip_ranges: - description: Enables jobs to go through a set of well-defined IP address ranges. - type: boolean - default: false resource_class: << parameters.resource_class >> docker: