Skip to content

Commit 39c4f37

Browse files
homerrthelamer
authored andcommitted
fixed paths and jq query
1 parent 4ab5b1a commit 39c4f37

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

roles/generate-jenkins/templates/Jenkinsfile.j2

+2-2
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ pipeline {
207207
steps{
208208
script{
209209
env.EXT_RELEASE = sh(
210-
script: '''curl -s https://gitlab.com/api/v4/${EXT_GITLAB_ID}/repository/commits/${EXT_GIT_BRANCH} | jq -r '. | .sha' | cut -c1-8 ''',
210+
script: '''curl -s https://gitlab.com/api/v4/projects/${EXT_GITLAB_ID}/repository/commits/${EXT_GIT_BRANCH} | jq -r '. | .id' | cut -c1-8 ''',
211211
returnStdout: true).trim()
212212
}
213213
}
@@ -690,7 +690,7 @@ pipeline {
690690
{% elif external_type == "github_commit" %}
691691
curl -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/commits/${EXT_GIT_BRANCH} | jq '. | .commit.message' | sed 's:^.\\(.*\\).$:\\1:' > releasebody.json
692692
{% elif external_type == "gitlab_commit" %}
693-
curl -s https://gitlab.com/api/v4/${EXT_GITLAB_ID}/repository/commits/${EXT_GIT_BRANCH} | jq '. | .title' | sed 's:^.\\(.*\\).$:\\1:' > releasebody.json
693+
curl -s https://gitlab.com/api/v4/projects/${EXT_GITLAB_ID}/repository/commits/${EXT_GIT_BRANCH} | jq '. | .title' | sed 's:^.\\(.*\\).$:\\1:' > releasebody.json
694694
{% elif external_type == "npm_version" %}
695695
echo "Updating NPM version of ${EXT_NPM} to ${EXT_RELEASE}" > releasebody.json
696696
{% elif external_type == "os" %}

0 commit comments

Comments
 (0)