Open jinty opened 9 years ago
Hi Brian,
Thank you for the feedback. We are working this (the Revision
of an Artifact
from a GitHub source action will be the git commit id), and we'll update this issue when it's ready.
I'm affected as well. Our healthcheck used to contain the current commit hash and message, now it doesn't :(
Thank you for the feedback. The revisionId (Git SHA of GitHub or CodeCommit) is now returned in Artifact instance for all input artifacts in JobData of the Build or Deployment action. If your source action is of type Amazon S3, the revisionId is going to be Amazon S3 object VersionId. http://docs.aws.amazon.com/codepipeline/latest/APIReference/API_Artifact.html http://docs.aws.amazon.com/codepipeline/latest/APIReference/API_JobData.html
Thanks,
Now that PollForJobs
and GetJobDetails
return the revisionId (jobDetails.data.inputArtifacts[].revisionId
), the plugin should expose them as environment variables, so they can be used when the job executes. For example:
# Input artifact names
CODE_PIPELINE_INPUT_ARTIFACTS=(InputOne InputTwo)
# Revision IDs
CODE_PIPELINE_REVISION_ID_InputOne=f018e28d56a5dae955b75eb1ea238304a6829f33
CODE_PIPELINE_REVISION_ID_InputTwo=8b1dfbce24c311df06c2c1b921de75e2db236338
For jobs with a single input artifact (most common use case), it might be convenient to use a fixed variable name:
CODE_PIPELINE_REVISION_ID=f018e28d56a5dae955b75eb1ea238304a6829f33
Hi, Any chance to get Commit_ID inside Jenkins job? Looks like it is still not implemented...
Hi,
I've just started using CodePipeline with Github as source and Jenkins to build. However I find it impossible to get the git commit id from within the jenkins builder. I have a few uses for this:
It would be great if I could access in the job, as an environment variable, the git commit id (or revision as it is called here: http://docs.aws.amazon.com/codepipeline/latest/APIReference/API_Artifact.html)