-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
Linux
We are trying to use a parametrized pipeline passing a string parameter called "REPONAME" and than choosing the "Pipeline script from SCM" and entering as "Repository URL" the following string:
https://gitlab.csi.it/technical-components/tecnologie/container/${REPONAME}.git
in GIT we use the webhook as this:
http://tst-jenkins-master.ecosis.csi.it/project/TEST_DOCKER_PIPELINE/docker-pipeline-globaleaks/buildWithParameters?token=4e9b91e3a3124e8082b443b9d2873a8c&REPONAME=globaleaks
The build console show us that the REPONAME variable is empty and does not get substituted in the process.
We already set the "Lightweight checkout" unchecked (with the option checked on the error is even worse)
The console output is:
Checking out git https://gitlab.csi.it/technical-components/tecnologie/container/${REPONAME}.git into /var/lib/jenkins/workspace/TEST_DOCKER_PIPELINE/docker-pipeline-globaleaks@script to read Jenkinsfile
using credential csi-gitlab
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url https://gitlab.csi.it/technical-components/tecnologie/container/.git # timeout=10
Fetching upstream changes from https://gitlab.csi.it/technical-components/tecnologie/container/.git
> git --version # timeout=10
using GIT_ASKPASS to set credentials csi-gitlab
Setting http proxy: proxy-srv.csi.it:3128
> git fetch --tags --progress https://gitlab.csi.it/technical-components/tecnologie/container/.git +refs/heads/:refs/remotes/origin/
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from https://gitlab.csi.it/technical-components/tecnologie/container/.git
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:894)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1161)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1192)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:124)
at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:149)
at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:67)
at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:299)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress https://gitlab.csi.it/technical-components/tecnologie/container/.git +refs/heads/:refs/remotes/origin/" returned status code 128:
stdout:
stderr: fatal: https://gitlab.csi.it/technical-components/tecnologie/container/.git/info/refs not valid: is this a git repository?