-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New Pipeline for Regular Task Builds #21396
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
Open
dassayantan24
wants to merge
4
commits into
master
Choose a base branch
from
users/dassayantan/enable-CG-regularly
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| # Build all tasks for Component Governance checks | ||
|
|
||
| trigger: none | ||
|
|
||
| resources: | ||
| repositories: | ||
| - repository: 1ESPipelineTemplates | ||
| type: git | ||
| name: 1ESPipelineTemplates/1ESPipelineTemplates | ||
| ref: refs/tags/release | ||
|
|
||
| parameters: | ||
| - name: build_mode | ||
| displayName: 'Choose build mode' | ||
| type: string | ||
| default: 'Build all tasks' | ||
| values: | ||
| - 'Build all tasks' | ||
| - 'Build specific tasks' | ||
| - name: task_names | ||
| displayName: 'Task names to build (e.g. BashV3,AzureCLIV1,PowerShellV2) - only used when "Build specific tasks" is selected' | ||
| type: string | ||
| default: '' | ||
|
|
||
| variables: | ||
| - name: DEPLOY_ALL_TASKSVAR | ||
| ${{ if eq(parameters.build_mode, 'Build all tasks') }}: | ||
| value: 'true' | ||
| ${{ else }}: | ||
| value: 'false' | ||
| - name: taskPattern | ||
| ${{ if eq(parameters.build_mode, 'Build specific tasks') }}: | ||
| value: ${{ parameters.task_names }} | ||
| ${{ else }}: | ||
| value: '' | ||
| - name: includeLocalPackagesBuildConfigParameter | ||
| value: '' | ||
|
|
||
| extends: | ||
| template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates | ||
| parameters: | ||
| stages: | ||
| - stage: main | ||
| jobs: | ||
| - job: build_all_tasks_for_cg_check | ||
| displayName: Build all tasks for CG check | ||
| pool: | ||
| name: 1ES-ABTT-Shared-Pool | ||
| image: abtt-windows-2022 | ||
| os: windows | ||
| steps: | ||
| - template: /ci/ci-build-tasks/common-steps.yml@self | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we use any existing template file for build all taks like https://github.com/microsoft/azure-pipelines-tasks/blob/master/ci/build-all-tasks.yml ?? |
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| parameters: | ||
| - name: task_name | ||
| displayName: 'Task names to build (e.g. BashV3,AzureCLIV1,PowerShellV2) or leave empty to build all tasks' | ||
| type: string | ||
| default: '' | ||
| - name: build_all_tasks | ||
| displayName: 'Build all tasks (ignore task_name parameter)' | ||
| type: boolean | ||
| default: true | ||
|
|
||
| steps: | ||
|
|
||
| # Clean | ||
| - checkout: self | ||
| clean: true | ||
|
|
||
| # Use .NET SDK 8 | ||
| - task: UseDotNet@2 | ||
| displayName: 'Install .NET Core SDK 8.x' | ||
| inputs: | ||
| version: 8.x | ||
|
|
||
| # Use node 20, npm 9 | ||
| - task: NodeTool@0 | ||
| displayName: Use node 20 | ||
| inputs: | ||
| versionSpec: 20.x | ||
|
|
||
| - task: NpmAuthenticate@0 | ||
| inputs: | ||
| workingFile: .npmrc | ||
|
|
||
| # npm ci | ||
| - script: npm ci | ||
| displayName: npm ci | ||
|
|
||
| # Get tasks to build (variables already set at pipeline level) | ||
| - script: node ./ci/filter-tasks.js | ||
| displayName: Determine tasks to build | ||
| name: getTaskPattern | ||
| env: | ||
| PACKAGE_ENDPOINT: $(Package.Endpoint) | ||
| PACKAGE_TOKEN: $(System.AccessToken) | ||
|
|
||
| - script: node ./ci/before-build-check-tasks.js | ||
| displayName: Before build task validation | ||
| condition: | | ||
| and( | ||
| succeeded(), | ||
| eq(variables['build.reason'], 'PullRequest'), | ||
| ne(variables['numTasks'], 0) | ||
| ) | ||
|
|
||
| # Clean tasks | ||
| - script: node make.js clean | ||
| displayName: Clean tasks | ||
|
|
||
| # Build Tasks | ||
| - script: node make.js serverBuild --task "$(getTaskPattern.task_pattern)" $(includeLocalPackagesBuildConfigParameter) | ||
| displayName: Build Tasks | ||
| condition: and(succeeded(), ne(variables['numTasks'], 0)) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not have option here to build specific tasks at all. the only option should be to build all tasks always.
we should instead add option to have list of deprecated tasks that can be skipped if needed, or it should pick the list of deprecated tasks from the repo itself may be, the list is available currently in https://github.com/microsoft/azure-pipelines-tasks/blob/master/DEPRECATION.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
list of deprecated tasks that I can try to add, but can’t we keep the build-specific tasks at least for now? This is because testing the pipeline initially with all tasks will take around 9 hours