From d496c24238d6d9740178f5024775e11efdbfd01d Mon Sep 17 00:00:00 2001 From: jayfranco999 Date: Mon, 2 Dec 2024 16:33:26 +0530 Subject: [PATCH 1/2] chore(updatecli) tracks GitHub git end-points Signed-off-by: jayfranco999 --- updatecli/updatecli.d/git-inbound-ips.yml | 42 +++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 updatecli/updatecli.d/git-inbound-ips.yml diff --git a/updatecli/updatecli.d/git-inbound-ips.yml b/updatecli/updatecli.d/git-inbound-ips.yml new file mode 100644 index 0000000..0d75163 --- /dev/null +++ b/updatecli/updatecli.d/git-inbound-ips.yml @@ -0,0 +1,42 @@ +name: Update allowed GitHub inbound IPs + +scms: + default: + kind: github + spec: + user: "{{ .github.user }}" + email: "{{ .github.email }}" + owner: "{{ .github.owner }}" + repository: "{{ .github.repository }}" + token: "{{ requiredEnv .github.token }}" + username: "{{ .github.username }}" + branch: "{{ .github.branch }}" + +sources: + githubInboundIpV4: + kind: json + name: get GitHub git IPv4s + spec: + file: https://api.github.com/meta + key: git + transformers: + - trimprefix: "[" + - trimsuffix: "]" + +targets: + updateGitHubIPs: + name: Update allowed IPs + kind: hcl + sourceid: githubInboundIpV4 + spec: + file: terraform/modules/azure-jenkinsinfra-azurevm-agents/locals.tf + path: locals.github_destination_address_prefixes + +actions: + default: + kind: github/pullrequest + scmid: default + title: Update allowed GitHub `git` endpoints for VM agents + spec: + labels: + - github-git-ips From c58a799e97b82d714da7440154c61670f5652c1c Mon Sep 17 00:00:00 2001 From: jayfranco999 Date: Mon, 2 Dec 2024 17:22:54 +0530 Subject: [PATCH 2/2] fixup Signed-off-by: jayfranco999 --- updatecli/updatecli.d/git-inbound-ips.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/updatecli/updatecli.d/git-inbound-ips.yml b/updatecli/updatecli.d/git-inbound-ips.yml index 0d75163..dd15283 100644 --- a/updatecli/updatecli.d/git-inbound-ips.yml +++ b/updatecli/updatecli.d/git-inbound-ips.yml @@ -31,6 +31,7 @@ targets: spec: file: terraform/modules/azure-jenkinsinfra-azurevm-agents/locals.tf path: locals.github_destination_address_prefixes + scmid: default actions: default: