Closed Kami closed 8 years ago
@lakshmi-kannan I said the same thing last time, but you said is fine.
Now i'm sure it doesn't work because I tested it like 5 times and I had a look at the output to see which branch and code is actually used.
In short, one of the easiest solutions is for this script to simply set ENV=current_working_directory
if -r
is provided.
As mentioned on Slack, "-r" option is broken. In fact, it looks like "-r" ever worked correctly (either that or these was a regression at some point, but unlikely).
"-r" flag simply makes it checkout out the provided SHA, but it doesn't actually make it use it. To actually use it,
ENV
would need to be set tocurrent_working_directory
(this way it will use correctly checked out version) or
ENV=<branch / revision name>`.This is the same if you manually checked out SHA in
/opt/puppet
this won't do anything if you don't actually setENV=current_working_directory
, I believe we had instructions on that and everyone was aware of it.Doesn't work aka it won't use the provided revision (it will just check it out which again != using it).
Works fine - branch is checked out and also used, because ENV is set.
Reproducing the issue is easy - simply create a new branch with some obvious change and run the script with the
-r
flag - you will see the branch is checked out, but not used (the change you made in a branch won't be used and the used environment will be production and not the branch name).