-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(*): Add azure pipelines (#5884)
* feat(*): Add azure pipelines * chore(*): improve pipeline and combine templates * chore(*): add zip task combining build folders * chore(*): change pool to ubutu-latest * chore(*): add customCommand ci production false to install also dev deps * chore(*): replace npm ci with npm install * Troubleshooting in progress * Removed silly-level npm logging - no insight from it * Try gulp max logging * chore(*): update copyGitHooks function --------- Co-authored-by: Borislav Traykov <[email protected]>
- Loading branch information
1 parent
912cb31
commit 5aba56c
Showing
4 changed files
with
212 additions
and
36 deletions.
There are no files selected for viewing
This file contains 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,70 @@ | ||
trigger: | ||
branches: | ||
include: | ||
- vnext | ||
- master | ||
paths: | ||
exclude: | ||
- '**/jp/*' | ||
- '**/kr/*' | ||
|
||
# This pipeline is meant to build specific branches for deployment. It's not meant to be a part of PR validation. Ensure that this pipeline is reserved for deployment purposes. | ||
pr: none | ||
|
||
name: $(BuildDefinitionName)_$(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) | ||
|
||
variables: | ||
- name: buildType | ||
${{ if eq(variables['Build.SourceBranchName'], 'master') }}: | ||
value: 'production' | ||
${{ else }}: | ||
value: 'staging' # Intended for the vnext branch, but also available for manually triggering other branches | ||
|
||
parameters: | ||
- name: isVerbose | ||
displayName: 'Get verbose output from steps - where configurable' | ||
type: boolean | ||
default: false | ||
- name: shouldCleanPostExecution | ||
displayName: 'Clean all pipeline dirs after the pipeline finishes?' | ||
type: boolean | ||
default: true | ||
|
||
stages: | ||
- stage: Build | ||
displayName: Build Stage | ||
jobs: | ||
- job: Build | ||
displayName: Build Job | ||
pool: | ||
vmImage: 'ubuntu-latest' | ||
steps: | ||
- checkout: self | ||
clean: true | ||
fetchTags: true | ||
|
||
- task: NodeTool@0 | ||
displayName: Use Node 20.x | ||
inputs: | ||
versionSpec: 20.x | ||
|
||
- task: UseDotNet@2 | ||
displayName: Use .NET Core sdk 6.x | ||
inputs: | ||
version: 6.x | ||
|
||
- template: templates/build-tasks.yml | ||
parameters: | ||
lang: en | ||
isVerbose: ${{ parameters.isVerbose }} | ||
buildType: $(buildType) | ||
|
||
- task: PublishPipelineArtifact@1 | ||
displayName: 'Publish Pipeline Artifact' | ||
inputs: | ||
path: '$(Build.ArtifactStagingDirectory)' | ||
artifactName: 'IgniteUIDocFX' | ||
|
||
- ${{ if eq(parameters.shouldCleanPostExecution, true) }}: | ||
- task: PostBuildCleanup@4 | ||
displayName: Clean Agent Directories |
This file contains 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,75 @@ | ||
trigger: | ||
branches: | ||
include: | ||
- vnext | ||
- master | ||
paths: | ||
exclude: | ||
- '**/en/*' | ||
|
||
# This pipeline is meant to build specific branches for deployment. It's not meant to be a part of PR validation. Ensure that this pipeline is reserved for deployment purposes. | ||
pr: none | ||
|
||
name: $(BuildDefinitionName)_$(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) | ||
|
||
variables: | ||
- name: buildType | ||
${{ if eq(variables['Build.SourceBranchName'], 'master') }}: | ||
value: 'production' | ||
${{ else }}: | ||
value: 'staging' # Intended for the vnext branch, but also available for manually triggering other branches | ||
|
||
parameters: | ||
- name: isVerbose | ||
displayName: 'Get verbose output from steps - where configurable' | ||
type: boolean | ||
default: false | ||
- name: shouldCleanPostExecution | ||
displayName: 'Clean all pipeline dirs after the pipeline finishes?' | ||
type: boolean | ||
default: true | ||
|
||
stages: | ||
- stage: Build | ||
displayName: Build Stage | ||
jobs: | ||
- job: Build | ||
displayName: Build Job | ||
pool: | ||
vmImage: 'ubuntu-latest' | ||
steps: | ||
- checkout: self | ||
clean: true | ||
fetchTags: true | ||
|
||
- task: NodeTool@0 | ||
displayName: Use Node 20.x | ||
inputs: | ||
versionSpec: 20.x | ||
|
||
- task: UseDotNet@2 | ||
displayName: Use .NET Core sdk 6.x | ||
inputs: | ||
version: 6.x | ||
|
||
- template: templates/build-tasks.yml | ||
parameters: | ||
lang: jp | ||
isVerbose: ${{ parameters.isVerbose }} | ||
buildType: $(buildType) | ||
|
||
- template: templates/build-tasks.yml | ||
parameters: | ||
lang: kr | ||
isVerbose: ${{ parameters.isVerbose }} | ||
buildType: $(buildType) | ||
|
||
- task: PublishPipelineArtifact@1 | ||
displayName: 'Publish Pipeline Artifact' | ||
inputs: | ||
path: '$(Build.ArtifactStagingDirectory)' | ||
artifactName: 'IgniteUIDocFX' | ||
|
||
- ${{ if eq(parameters.shouldCleanPostExecution, true) }}: | ||
- task: PostBuildCleanup@4 | ||
displayName: Clean Agent Directories |
This file contains 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,35 @@ | ||
parameters: | ||
- name: lang | ||
type: string | ||
- name: isVerbose | ||
type: boolean | ||
default: false | ||
- name: buildType | ||
type: string | ||
|
||
steps: | ||
- task: Npm@1 | ||
displayName: 'npm ci' | ||
inputs: | ||
command: custom | ||
workingDir: $(Build.SourcesDirectory) | ||
verbose: ${{ parameters.isVerbose }} | ||
customCommand: 'ci --production=false' | ||
|
||
- task: Npm@1 | ||
displayName: npm build ${{ parameters.buildType }} ${{ parameters.lang }} | ||
inputs: | ||
command: custom | ||
workingDir: $(Build.SourcesDirectory) | ||
verbose: ${{ parameters.isVerbose }} | ||
customCommand: run build-${{ parameters.buildType }} -- --lang=${{ parameters.lang }} | ||
|
||
- task: ArchiveFiles@2 | ||
displayName: 'Package ${{ parameters.buildType }} ${{ parameters.lang }} - zip' | ||
inputs: | ||
verbose: ${{ parameters.isVerbose }} | ||
rootFolderOrFile: $(Build.SourcesDirectory)/${{ parameters.lang }}/_site | ||
includeRootFolder: false | ||
archiveType: 'zip' | ||
archiveFile: $(Build.ArtifactStagingDirectory)/${{ parameters.buildType }}_${{ parameters.lang }}.zip | ||
replaceExistingArchive: true |
This file contains 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