Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] add prechek logic in job LintModifiedExtension #1334

Merged
merged 36 commits into from
Mar 12, 2020

Conversation

haroldrandom
Copy link
Contributor

@haroldrandom haroldrandom commented Mar 2, 2020

Fix #1028, after approved, I will rename the job to LintModifiedExtension

Scenario 1: User modify other files, instead of source code and src/index.json. CI should pass (Please see the build's output of this PR).

Scenario 2: User modify src/index.json only and metadata item refer to extension not
inside our repo (#1333), CI will pass and job linter will skip and do nothing.

Scenario 3: User modify both src/index.json and extension source code (#1336), CI shall fail with a warning message.

Scenario 4: User modify src/index.json only and metadata item refer to extension inside our repo (#1337). CI will pass and job linter will skip and do nothing.

Scenario 5: User modify extension source code only (#1338), and CI job "CLI Linter on Modified Extensions (New)" should build and linter on modified extensions.

Scenario 6: User delete some files of source code. (#1357),
and CI job "CLI Linter on Modified Extensions (New)" should skip to build with output

----------------------------------------------------------------------------------------------------
no extension source code modified, no extension needs to be linter
----------------------------------------------------------------------------------------------------

the extension and pass. But other CI job will fail as missing some necessary files

Scenario 7: User delete the whole extension source (#1358), and CI job "CLI Linter on Modified Extensions (New)" should skip to do nothing and pass.


This checklist is used to make sure that common guidelines for a pull request are followed.

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally?

For new extensions:

@azuresdkci
Copy link

If this PR is for a new extension or change to an existing extension, use the following to try out the changes in this PR:

docker run -it microsoft/azure-cli:latest
export EXT=<NAME>
pip install --upgrade --target ~/.azure/cliextensions/$EXT "git+https://github.com/Azure/azure-cli-extensions.git@release-pipeline-prechecks#subdirectory=src/$EXT&egg=$EXT"

@yonzhan yonzhan added this to the S166 milestone Mar 2, 2020
@haroldrandom haroldrandom reopened this Mar 2, 2020
@azuresdkci
Copy link

If this PR is for a new extension or change to an existing extension, use the following to try out the changes in this PR:

docker run -it microsoft/azure-cli:latest
export EXT=<NAME>
pip install --upgrade --target ~/.azure/cliextensions/$EXT "git+https://github.com/Azure/azure-cli-extensions.git@release-pipeline-prechecks#subdirectory=src/$EXT&egg=$EXT"

@haroldrandom haroldrandom changed the title [CI] Add Release pipeline Precheks in job Linter [CI] add precheks in job LintModifiedExtension Mar 2, 2020
@haroldrandom haroldrandom marked this pull request as ready for review March 2, 2020 08:48
@haroldrandom
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@yonzhan
Copy link
Collaborator

yonzhan commented Mar 5, 2020

add to S166

@haroldrandom haroldrandom changed the title [CI] add precheks in job LintModifiedExtension [CI] add prechek logic in job LintModifiedExtension Mar 6, 2020
azure-pipelines.yml Outdated Show resolved Hide resolved
azure-pipelines.yml Show resolved Hide resolved
scripts/ci/verify_linter.py Show resolved Hide resolved
scripts/ci/verify_linter.py Show resolved Hide resolved
scripts/ci/verify_linter.py Outdated Show resolved Hide resolved
scripts/ci/verify_linter.py Show resolved Hide resolved
Co-Authored-By: Feng Zhou <55177366+fengzhou-msft@users.noreply.github.com>
@haroldrandom haroldrandom merged commit 7c11da3 into master Mar 12, 2020
@haroldrandom haroldrandom deleted the release-pipeline-prechecks branch March 13, 2020 06:28
ManuInNZ pushed a commit to ManuInNZ/azure-cli-extensions that referenced this pull request Apr 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

We need release pipeline for extensions
5 participants