[JIRA] (JENKINS-42971) Pipeline script from SCM does not expand build parameters/env variables for lightweight checkouts

25 views
Skip to first unread message

rodrigc@FreeBSD.org (JIRA)

unread,
Jul 31, 2018, 8:57:02 PM7/31/18
to jenkinsc...@googlegroups.com

fabian.holler@simplesurance.de (JIRA)

unread,
Apr 25, 2019, 11:01:04 AM4/25/19
to jenkinsc...@googlegroups.com

We have 'Workflow: Job' 2.32 installed with Jenkins 2.173 and it does not work.
It behaves exactly like in the ticket description with GIT as SCM.
("lightweight checkout" is disabled)

This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

fabian.holler@simplesurance.de (JIRA)

unread,
Apr 25, 2019, 11:07:07 AM4/25/19
to jenkinsc...@googlegroups.com
Fabian Holler updated an issue
 
Jenkins / Bug JENKINS-42971
Change By: Fabian Holler
Comment: I can confirm that it works if "lightweight checkout" is disabled for git SCM with 'Workflow: Job' 2.32 and Jenkins 2.173.

Should the ticket be closed?

fabian.holler@simplesurance.de (JIRA)

unread,
Apr 25, 2019, 11:07:07 AM4/25/19
to jenkinsc...@googlegroups.com
Fabian Holler edited a comment on Bug JENKINS-42971
 
Re: Pipeline script from SCM does not expand build parameters/env variables for lightweight checkouts
We have I can confirm that it works if "lightweight checkout" is disabled for git SCM with 'Workflow: Job' 2.32 installed with and Jenkins 2.173 and it does not work .
It behaves exactly like in

Should
the ticket description with GIT as SCM. be closed?
("lightweight checkout" is disabled)

jglick@cloudbees.com (JIRA)

unread,
Apr 25, 2019, 12:15:04 PM4/25/19
to jenkinsc...@googlegroups.com

tdensmore@cloudbees.com (JIRA)

unread,
Jun 13, 2019, 6:12:03 PM6/13/19
to jenkinsc...@googlegroups.com

o.schneider@precitec-optronik.de (JIRA)

unread,
Jun 27, 2019, 4:00:11 AM6/27/19
to jenkinsc...@googlegroups.com

I am also seeing this with Jenkins version 2.176.1 (from the Debian package repo provided by the Jenkins project).

medianick@gmail.com (JIRA)

unread,
Jul 8, 2019, 10:41:12 AM7/8/19
to jenkinsc...@googlegroups.com

medianick@gmail.com (JIRA)

unread,
Jul 8, 2019, 10:41:12 AM7/8/19
to jenkinsc...@googlegroups.com
Nick Jones commented on Bug JENKINS-42971
 
Re: Pipeline script from SCM does not expand build parameters/env variables for lightweight checkouts

We're seeing this same behavior today running Pipeline: Job (workflow-job) 2.32 (on Jenkins 2.176.1 LTS), with the "Lightweight checkout" checkbox unchecked. Is there a possibility that the system is still choosing a lightweight checkout essentially "on the fly", and if so, is there a way to force a heavyweight checkout?

medianick@gmail.com (JIRA)

unread,
Jul 8, 2019, 12:38:03 PM7/8/19
to jenkinsc...@googlegroups.com

Aha – for us the issue was that we were reading a file from the workspace before the start of the the pipeline block, using a command like `def common = evaluate readTrusted('./Common.groovy')`. This seems to have bypassed the variable resolution. Removing this line caused the expected behavior to start again.

medianick@gmail.com (JIRA)

unread,
Jul 8, 2019, 12:39:06 PM7/8/19
to jenkinsc...@googlegroups.com

ms@docware.de (JIRA)

unread,
Nov 20, 2019, 6:14:04 AM11/20/19
to jenkinsc...@googlegroups.com
Michael S. updated an issue
Change By: Michael S.
Attachment: image-2019-11-20-12-13-40-194.png
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

ms@docware.de (JIRA)

unread,
Nov 20, 2019, 6:16:03 AM11/20/19
to jenkinsc...@googlegroups.com

ms@docware.de (JIRA)

unread,
Nov 20, 2019, 6:18:04 AM11/20/19
to jenkinsc...@googlegroups.com

ms@docware.de (JIRA)

unread,
Nov 20, 2019, 6:20:08 AM11/20/19
to jenkinsc...@googlegroups.com
Michael S. commented on Bug JENKINS-42971
 
Re: Pipeline script from SCM does not expand build parameters/env variables for lightweight checkouts

We have still a problem with Pipeline: Job 2.32 (even after upgrade to 2.36) on Jenkins 2.179. "Lightweight checkout" checkbox unchecked. Parameter Expansion does not work if parameter comes from "Properties File Path", It works, however, with parameter from "Properties Content". Too bad.

ms@docware.de (JIRA)

unread,
Nov 20, 2019, 6:20:08 AM11/20/19
to jenkinsc...@googlegroups.com

ms@docware.de (JIRA)

unread,
Nov 20, 2019, 7:22:03 AM11/20/19
to jenkinsc...@googlegroups.com
Michael S. edited a comment on Bug JENKINS-42971
We have still a problem with Pipeline: Job 2.32 (even after upgrade to 2.36) on Jenkins 2.179. "Lightweight checkout" checkbox unchecked. Parameter Expansion does not work if parameter comes from "Properties File Path", It works, however, with parameter from "Properties Content". Too bad.

BTW, our properties file is correct because it previously worked with a freestyle job.

!image-2019-11-20-12-19-41-513.png!

ms@docware.de (JIRA)

unread,
Nov 22, 2019, 2:27:05 PM11/22/19
to jenkinsc...@googlegroups.com
Michael S. edited a comment on Bug JENKINS-42971
We have still a problem with Pipeline: Job 2.32 (even after upgrade to 2.36) on Jenkins 2.179. "Lightweight checkout" checkbox unchecked. Parameter Expansion does not work if parameter comes from "Properties File Path", It works, however, with parameter from "Properties Content". Too bad.

BTW, our properties file is correct because it previously worked with a freestyle job.

I created new issue JENKINS-60250.

!image-2019-11-20-12-19-41-513.png!

tamerlaha@gmail.com (JIRA)

unread,
Jan 15, 2020, 11:43:04 PM1/15/20
to jenkinsc...@googlegroups.com

8kirk8@gmail.com (JIRA)

unread,
Mar 10, 2020, 8:49:04 AM3/10/20
to jenkinsc...@googlegroups.com

We have same problem, but in our case we don't have readTrusted
But we are using kubernetes with kubernetes-plugin, and we were using yaml file for pod configuration

  agent {
    kubernetes {
      yamlFile "pod.yaml"
    }
  }  

seems that underhood it calls readTrusted
we tried to use

  agent {
    kubernetes {
      yaml readFile("./pod.yaml")
    }
  }

but this also didn't work
only inline pod yaml helped to solve this issue

agent {
    kubernetes {
      yaml """
apiVersion: v1
kind: Pod
spec:
  containers:
  - name: jnlp
    image: imagename
    imagePullPolicy: Always

"""
    }
  }    
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages