Support batch build in AWS codebuild#1369
Conversation
|
Ah, I don't know enough about codebuild to know if this is a breaking change - can people self host? |
Yes, we can. |
|
If you can self-host then there may be cases where this new code breaks old builds - any chance you can make it backwards compatible? e.g. prioritise the new ENV vars but still keep the old ones working |
|
@orta
|
|
@orta If so, what is the better name for the new environment variable? |
|
Yep, keep |
|
@orta
I implement it has backward compatibility depending on the present |
ac1330b to
cbfe3c2
Compare
cbfe3c2 to
95a05ae
Compare
|
Looks great, sorry of the delay! |
CODEBUILD_SOURCE_VERSIONenvironment variable returns commit hash(example:6548dbc49fe57e1fe7507a7a4b815639a62e9f90) in a batch build when triggered by a pull request.CODEBUILD_WEBHOOK_TRIGGERenvironment variable rerurns{event_name}/{event_variable}(examplepr/123) in both normal build and batch build.https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-env-vars.html
Therefore, use
CODEBUILD_WEBHOOK_TRIGGERenvironment variable so that danger works only when event_type is pr.