Skip to content

Commit

Permalink
Merge pull request #208 from dduportal/chore/updatecli/track-git-windows
Browse files Browse the repository at this point in the history
chore(updatecli) track Git for Windows version
  • Loading branch information
dduportal authored Feb 15, 2023
2 parents 03519e2 + 0de2095 commit 19f6861
Show file tree
Hide file tree
Showing 3 changed files with 188 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/updatecli.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: updatecli
on:
# Allow to be run manually
workflow_dispatch:
schedule:
# Run once per week (to avoid alert fatigue)
- cron: '0 2 * * 1' # Every Monday at 2am UTC
push:
pull_request:
jobs:
updatecli:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Updatecli in the runner
uses: updatecli/[email protected]

- name: Run Updatecli in Dry Run mode
run: updatecli diff --config ./updatecli/updatecli.d --values ./updatecli/values.github-action.yaml
env:
UPDATECLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Run Updatecli in Apply mode
if: github.ref == 'refs/heads/master'
run: updatecli apply --config ./updatecli/updatecli.d --values ./updatecli/values.github-action.yaml
env:
UPDATECLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
151 changes: 151 additions & 0 deletions updatecli/updatecli.d/git-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
---
name: Bump Git version on Windows

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:
lastVersion:
kind: githubrelease
name: Get the latest Git version
spec:
owner: "git-for-windows"
repository: "git"
token: "{{ requiredEnv .github.token }}"
username: "{{ .github.username }}"
versionfilter:
kind: regex
## Latest stable v{x.y.z}.windows.<patch>
pattern: 'v(\d*)\.(\d*)\.(\d*)\.windows\.(\d*)$'
transformers:
- trimprefix: "v"

targets:
############# JDK11 Nanoserver 18.09
setGitVersionJDK11WindowsNanoserver1809:
name: Update the Git Windows version for JDK11 Windows Nanoserver 1809
transformers:
- findsubmatch:
pattern: '(.*).windows\.(\d*)$'
captureindex: 1
kind: dockerfile
spec:
file: 11/windows/nanoserver-ltsc2019/Dockerfile
instruction:
keyword: ARG
matcher: GIT_VERSION
scmid: default
setGitPackagePatchJDK11WindowsNanoserver1809:
name: Update the Git Package Windows patch for JDK11 Windows Nanoserver 1809
transformers:
- findsubmatch:
pattern: '(.*).windows\.(\d*)$'
captureindex: 2
kind: dockerfile
spec:
file: 11/windows/nanoserver-ltsc2019/Dockerfile
instruction:
keyword: ARG
matcher: GIT_PATCH_VERSION
scmid: default
############# JDK11 Windows Server Core LTSC2019
setGitVersionJDK11WindowsServer2019:
name: Update the Git Windows version for JDK11 Windows Server Core LTSC2019
transformers:
- findsubmatch:
pattern: '(.*).windows\.(\d*)$'
captureindex: 1
kind: dockerfile
spec:
file: 11/windows/windowsservercore-ltsc2019/Dockerfile
instruction:
keyword: ARG
matcher: GIT_VERSION
scmid: default
setGitPackagePatchJDK11WindowsServer2019:
name: Update the Git Package Windows patch for Windows Server Core LTSC2019
transformers:
- findsubmatch:
pattern: '(.*).windows\.(\d*)$'
captureindex: 2
kind: dockerfile
spec:
file: 11/windows/windowsservercore-ltsc2019/Dockerfile
instruction:
keyword: ARG
matcher: GIT_PATCH_VERSION
scmid: default
############# JDK8 Nanoserver 18.09
setGitVersionJDK8WindowsNanoserver1809:
name: Update the Git Windows version for JDK8 Windows Nanoserver 1809
transformers:
- findsubmatch:
pattern: '(.*).windows\.(\d*)$'
captureindex: 1
kind: dockerfile
spec:
file: 8/windows/nanoserver-ltsc2019/Dockerfile
instruction:
keyword: ARG
matcher: GIT_VERSION
scmid: default
setGitPackagePatchJDK8WindowsNanoserver1809:
name: Update the Git Package Windows patch for JDK8 Windows Nanoserver 1809
transformers:
- findsubmatch:
pattern: '(.*).windows\.(\d*)$'
captureindex: 2
kind: dockerfile
spec:
file: 8/windows/nanoserver-ltsc2019/Dockerfile
instruction:
keyword: ARG
matcher: GIT_PATCH_VERSION
scmid: default
############# JDK8 Windows Server Core LTSC2019
setGitVersionJDK8WindowsServer2019:
name: Update the Git Windows version for JDK8 Windows Server Core LTSC2019
transformers:
- findsubmatch:
pattern: '(.*).windows\.(\d*)$'
captureindex: 1
kind: dockerfile
spec:
file: 8/windows/windowsservercore-ltsc2019/Dockerfile
instruction:
keyword: ARG
matcher: GIT_VERSION
scmid: default
setGitPackagePatchJDK8WindowsServer2019:
name: Update the Git Package Windows patch for JDK8 Windows Server Core LTSC2019
transformers:
- findsubmatch:
pattern: '(.*).windows\.(\d*)$'
captureindex: 2
kind: dockerfile
spec:
file: 8/windows/windowsservercore-ltsc2019/Dockerfile
instruction:
keyword: ARG
matcher: GIT_PATCH_VERSION
scmid: default

actions:
default:
kind: github/pullrequest
title: Bump Git version on Windows to {{ source "lastVersion" }}
scmid: default
spec:
labels:
- enhancement
- git
- windows
8 changes: 8 additions & 0 deletions updatecli/values.github-action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
github:
user: "GitHub Actions"
email: "41898282+github-actions[bot]@users.noreply.github.com"
username: "github-actions"
token: "UPDATECLI_GITHUB_TOKEN"
branch: "master"
owner: "jenkinsci"
repository: "docker-ssh-agent"

0 comments on commit 19f6861

Please sign in to comment.