Skip to content

Commit f808212

Browse files
Attempt 19
1 parent 1702aed commit f808212

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

Jenkinsfile

+28
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,34 @@ def SetGithubStatus(githubToken, context, targetUrl, desc, status, repoOwner, re
2626

2727
def CheckNightlyTag(githubToken, repoOwner, repoName, expectedHash)
2828
{
29+
// Install jq and zip if not already installed
30+
bash """
31+
if ! command -v jq &> /dev/null; then
32+
echo "Installing jq..."
33+
apt-get update
34+
apt-get install -y jq zip
35+
fi
36+
"""
37+
38+
def response = bash """
39+
curl -L \
40+
-X PATCH \
41+
-H "Accept: application/vnd.github+json" \\
42+
-H "Authorization: Bearer ${githubToken}" \\
43+
-H "X-GitHub-Api-Version: 2022-11-28" \\
44+
-d '{
45+
"sha":"${expectedHash}",
46+
"force":true
47+
}' \\
48+
https://api.github.com/repos/${repoOwner}/${repoName}/git/refs/tags/nightly
49+
"""
50+
51+
if(true)
52+
{
53+
echo "response: ${response}"
54+
return true;
55+
}
56+
2957
//def maxAttempts = 30 // 5 minutes with 10-second intervals
3058
def maxAttempts = 2 // 5 minutes with 10-second intervals
3159
def attempt = 0

0 commit comments

Comments
 (0)