Closed lukelloyd1985 closed 1 month ago
@nvuillam will that new env car be passed to the docker image on azure DevOps without further changes?
@lukelloyd1985 Will existing projects on Azure DevOps stop working if they had to pass the old env var (or it is passed without any user-specific changes)?
@nvuillam will that new env car be passed to the docker image on azure DevOps without further changes?
@lukelloyd1985 Will existing projects on Azure DevOps stop working if they had to pass the old env var (or it is passed without any user-specific changes)?
@echoix good catch, that would be indeed a breaking change ^^
@lukelloyd1985 please can you implement the following behavior:
Note: I think the default azure pipelines from documentation are ok, because they use --env-file <(env | grep -e SYSTEM_ -e BUILD_ -e TF_ -e AGENT_) \
, so SYSTEM_PULLREQUEST_SOURCEREPOSITORYURI should be available
All (SYSTEM, BUILD etc) variables are passed by the --env-file line in the pipeline as you've noted.
SYSTEM & BUILD variables are already being utilised.
I've already added an if statement to log if the variable happens to be empty (following the logic elsewhere in the script). Should that be sufficient?
It is the PR reporter so needs to reference the correct PR branch which BUILD_REPOSITORY_ID doesn't do (unless the PR and build pipeline happen to be the same repository).
@lukelloyd1985 there are many custom pipelines using MegaLinter, probably without --env-file <(env | grep -e SYSTEM_ -e BUILD_ -e TF_ -e AGENT_)
but with a given list of variables, like in the previous versions of MegaLinter azure-pipelines default workflow, and I don't want them to crash if they have BUILD_REPOSITORY_ID and not SYSTEM_PULLREQUEST_SOURCEREPOSITORYURI ^^
That's why I'd like your updates to have a "fallback" with just BUILD_REPOSITORY_ID if it's the onlly one available :)
Righto 👌🏻 will action that
How's that?
How's that?
Looks good :)
I added a last comment :)
Fixes #4132
Proposed Changes
Use
SYSTEM_PULLREQUEST_SOURCEREPOSITORYURI
instead ofBUILD_REPOSITORY_ID
to locate the correct repository referenced in the PRReadiness Checklist
Author/Contributor
Reviewing Maintainer
breaking
if this is a large fundamental changeautomation
,bug
,documentation
,enhancement
,infrastructure
, orperformance