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

chore(updatecli) tracks GitHub git end-points #161

Merged
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
43 changes: 43 additions & 0 deletions updatecli/updatecli.d/git-inbound-ips.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
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
scmid: default

actions:
default:
kind: github/pullrequest
scmid: default
title: Update allowed GitHub `git` endpoints for VM agents
spec:
labels:
- github-git-ips