Opened 6 years ago

Closed 5 years ago

#2687 closed enhancement (worksforme)

Access ENV variables from factory steps

Reported by: NathanBlack Owned by:
Priority: major Milestone: 0.9.+
Version: 0.8.8 Keywords: sprint, simple
Cc:

Description (last modified by sa2ajj)

It would be nice to be able to use environment variables from build slaves in ShellCommands.

For example if I needed to use an absolute path to the repository, I could use $PWD (or something similar) to get the proper location.

Change History (6)

comment:1 Changed 6 years ago by dustin

  • Keywords sprint simple added; ShellCommand env removed
  • Milestone changed from undecided to 0.8.+

This would be something to add to the Interpolate class, e.g. Interpolate("...%(env:PWD)s..."). The slave environment variables are already available on the master.

comment:2 Changed 6 years ago by NathanBlack

Actually since the variables are platform dependent, it might be better (for my purposes) if there was just an Interpolate option that gave me the absolute path to the buildslave source directory. (or should that be a separate feature request)

comment:3 Changed 6 years ago by NathanBlack

Ah, figured that out, Interpolate("%(prop:builddir)s/path/to/project") does what I need.

comment:4 Changed 5 years ago by dustin

  • Milestone changed from 0.8.+ to 0.9.+

Ticket retargeted after milestone closed

comment:5 Changed 5 years ago by sa2ajj

  • Description modified (diff)

It seems that the original requirement is fulfilled using Interpolate.

Should this ticket be closed then?

comment:6 Changed 5 years ago by dustin

  • Resolution set to worksforme
  • Status changed from new to closed

Yes, I think so. I had been thinking that the env vars from the slave were available on the master, but I don't think this is the case.

Note: See TracTickets for help on using tickets.