Skip to content

Commit ffbb372

Browse files
gountharclaude
andcommitted
feat(updatecli): add Android SDK version monitoring to weekly branch
Add the android.yaml Updatecli manifest to monitor and update: - Android command-line tools version in Dockerfile URL - Android build-tools version in Dockerfile ARG Uses Python stdlib for reliable XML parsing of Google's official SDK repository at dl.google.com/android/repository/repository2-3.xml Includes proper error handling for: - HTTP request failures - Missing version data - Malformed version strings Synced from main branch after PR jenkins-docs#1962. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 026e573 commit ffbb372

1 file changed

Lines changed: 77 additions & 0 deletions

File tree

updatecli/updatecli.d/android.yaml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
---
2+
name: Bump Android SDK components in android agent
3+
4+
scms:
5+
default:
6+
kind: github
7+
spec:
8+
user: "{{ .github.user }}"
9+
email: "{{ .github.email }}"
10+
owner: "{{ .github.owner }}"
11+
repository: "{{ .github.repository }}"
12+
token: "{{ requiredEnv .github.token }}"
13+
username: "{{ .github.username }}"
14+
branch: "{{ .github.branch }}"
15+
16+
sources:
17+
# Uses official Google SDK repository XML (not JS-rendered website)
18+
androidCommandLineTools:
19+
kind: shell
20+
spec:
21+
command: >-
22+
curl -sL "https://dl.google.com/android/repository/repository2-3.xml" |
23+
grep 'commandlinetools-linux' |
24+
sed 's/.*commandlinetools-linux-\([0-9]*\).*/\1/' |
25+
sort -n |
26+
tail -1
27+
environments:
28+
- name: PATH
29+
30+
# Uses official Google SDK repository XML to get latest stable build-tools
31+
# Excludes release candidates (-rc versions) and sorts by version number
32+
androidBuildTools:
33+
kind: shell
34+
spec:
35+
command: >-
36+
curl -sL "https://dl.google.com/android/repository/repository2-3.xml" |
37+
grep 'remotePackage path="build-tools;' |
38+
grep -v '-rc' |
39+
sed 's/.*build-tools;\([^"]*\)".*/\1/' |
40+
sort -V |
41+
tail -1
42+
environments:
43+
- name: PATH
44+
45+
conditions:
46+
47+
targets:
48+
androidCommandLineToolsURL:
49+
name: "[android-agent] Update command-line tools version in Dockerfile"
50+
kind: file
51+
spec:
52+
file: dockerfiles/android/Dockerfile
53+
matchpattern: 'commandlinetools-linux-(\d+)_latest\.zip'
54+
replacepattern: 'commandlinetools-linux-{{ source "androidCommandLineTools" }}_latest.zip'
55+
sourceid: androidCommandLineTools
56+
scmid: default
57+
58+
androidBuildToolsVersion:
59+
name: "[android-agent] Update build tools version in Dockerfile"
60+
kind: dockerfile
61+
spec:
62+
file: dockerfiles/android/Dockerfile
63+
instruction:
64+
keyword: "ARG"
65+
matcher: "ANDROID_BUILD_TOOLS_VERSION"
66+
sourceid: androidBuildTools
67+
scmid: default
68+
69+
actions:
70+
default:
71+
kind: github/pullrequest
72+
scmid: default
73+
title: '[Android] Bump Android SDK components to latest versions'
74+
spec:
75+
labels:
76+
- dependencies
77+
- android

0 commit comments

Comments
 (0)