Skip to content

Commit 56ee13e

Browse files
committed
DEVOPS-194 check git tags
1 parent e50a45c commit 56ee13e

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

Jenkinsfile

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,21 @@ podTemplate(label: "prometheus-${label}", inheritFrom: 'kube-slave-dood') {
1010
node("prometheus-${label}") {
1111
withCredentials([
1212
usernamePassword(credentialsId: '4318b7db-a1af-4775-b871-5a35d3e75c21', passwordVariable: 'GIT_PASSWORD', usernameVariable: 'GIT_USERNAME'),
13-
secretText(credentialsId: 'dd7f75c5-f055-4eb3-9365-e7d04e644211', secretText: 'GIT_TOKEN')
13+
// string(credentialsId: 'dd7f75c5-f055-4eb3-9365-e7d04e644211', variable: 'GIT_TOKEN')
1414
]) {
1515
stage('release') {
1616
def TAG_VERSION = sh(
1717
script: "echo ${TAG_NAME} | tr -d '\\n' | egrep '^v[\\.0-9]*-v[\\.0-9]*\$'",
1818
returnStdout: true
1919
).trim()
2020
if ( TAG_VERSION ) {
21-
stage('get release') {
22-
// sh "curl https://api.github.com/repos/gkirok/prometheus/releases/latest"
23-
sh """
24-
curl -H "Authorization: bearer ${GIT_TOKEN}" -X POST -d '{"query": "query { repository(owner:\"gkirok\", name:\"prometheus\") { releases(last: 5) { nodes { tag { name } } } } }"' https://api.github.com/graphql
25-
"""
26-
}
21+
print TAG_VERSION
22+
// stage('get release') {
23+
// sh "curl https://api.github.com/repos/gkirok/prometheus/releases/latest"
24+
// sh """
25+
// curl -H "Authorization: bearer ${GIT_TOKEN}" -X POST -d '{"query": "query { repository(owner:\"gkirok\", name:\"prometheus\") { releases(last: 5) { nodes { tag { name } } } } }"' https://api.github.com/graphql
26+
// """
27+
// }
2728

2829
stage('prepare sources') {
2930
sh """

0 commit comments

Comments
 (0)