@@ -46,16 +46,6 @@ timestamps {
46
46
''' . stripMargin()
47
47
}
48
48
49
- def commit_hash = " main" // default which we want to override
50
- def bptp_tag = " bptp-built"
51
- try {
52
- def response = authenticatedGithubCall(" https://api.github.com/repos/snowflakedb/snowflake/git/ref/tags/${ bptp_tag} " )
53
- commit_hash = response. object. sha
54
- } catch (Exception e) {
55
- println (" error when calling Github API: ${ e.message} " )
56
- e. printStackTrace()
57
- }
58
-
59
49
jdkToParams = [' openjdk8' : ' jdbc-centos7-openjdk8' , ' openjdk11' : ' jdbc-centos7-openjdk11' , ' openjdk17' : ' jdbc-centos7-openjdk17' , ' openjdk21' : ' jdbc-centos7-openjdk21' ]. collectEntries { jdk , image ->
60
50
return [(jdk): [
61
51
string(name : ' client_git_branch' , value : scmInfo. GIT_BRANCH ),
@@ -66,7 +56,7 @@ timestamps {
66
56
string(name : ' parent_build_number' , value : env. BUILD_NUMBER ),
67
57
string(name : ' timeout_value' , value : ' 420' ),
68
58
string(name : ' PR_Key' , value : scmInfo. GIT_BRANCH . substring(3 )),
69
- string(name : ' svn_revision' , value : commit_hash )
59
+ string(name : ' svn_revision' , value : ' bptp-built ' )
70
60
]]
71
61
}
72
62
@@ -108,34 +98,6 @@ timestamps {
108
98
}
109
99
}
110
100
111
- // Generic github API function
112
- // url : API url to call get command
113
- def authenticatedGithubCall (url ) {
114
- withCredentials([
115
- usernamePassword(credentialsId : ' jenkins-snowflakedb-github-app' ,
116
- usernameVariable : ' GITHUB_USER' ,
117
- passwordVariable : ' GITHUB_TOKEN' ),
118
- ]) {
119
- try {
120
- def encodedAuth = Base64 . getEncoder(). encodeToString(
121
- " ${ GITHUB_USER} :${ GITHUB_TOKEN} " . getBytes(java.nio.charset.StandardCharsets . UTF_8 )
122
- )
123
- def authHeaderValue = " Basic ${ encodedAuth} "
124
- def connection = new URL (url). openConnection()
125
- connection. setRequestProperty(" Authorization" , authHeaderValue)
126
- if (connection. getResponseCode() >= 300 ) {
127
- println (" ERROR: Status fetch from ${ url} returned ${ connection.getResponseCode()} " )
128
- println (connection. getErrorStream(). getText())
129
- return null
130
- }
131
- return new groovy.json.JsonSlurperClassic (). parseText(connection. getInputStream(). getText())
132
- } catch (Exception e) {
133
- println (" Exception fetching ${ url} : ${ e} " )
134
- return null
135
- }
136
- }
137
- }
138
-
139
101
def wgetUpdateGithub (String state , String folder , String targetUrl , String seconds ) {
140
102
def ghURL = " https://api.github.com/repos/snowflakedb/snowflake-jdbc/statuses/$COMMIT_SHA_LONG "
141
103
def data = JsonOutput . toJson([state : " ${ state} " , context : " jenkins/${ folder} " ,target_url : " ${ targetUrl} " ])
0 commit comments