Hello,
I am trying to get the SHA Commit of my PR in my pipeline once I merge with the env variable DRONE_COMMIT_BEFORE
however I am not having any luck and unsure if this is possible. Here is my pipeline process:
- Push change to branch repo
- Create Merge Request
- Pipeline kicks off, builds artifacts, stores artifacts externally to a folder that uses the
DRONE_COMMIT
sha in its name. - Once pipeline succeeds, merge to
master
. - This kicks off another pipeline that will do a copy of the contents from the prior SHA folder name.
Right now, I am trying to do this by using the variable DRONE_COMMIT_BEFORE
which I believe should give me this information however when I echo it in my pipeline the variable is empty. Is there a way I can accomplish this?
Thanks again for all of the help.