-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
78d9074
commit 967ce93
Showing
3 changed files
with
89 additions
and
54 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 @@ | ||
# Trigger the build whenever `main` or `rel/*` is updated | ||
trigger: | ||
- main | ||
- rel/* | ||
|
||
pr: none # Disable PR trigger | ||
|
||
# Scheduled nightly build | ||
schedules: | ||
- cron: "0 0 * * *" | ||
displayName: Nightly scheduled build | ||
always: false # Don't rebuild if there haven't been changes | ||
branches: | ||
include: | ||
- main | ||
|
||
# Grab the base templates from https://github.com/microsoft/vscode-azuretools/tree/main/azure-pipelines and OneBranch | ||
resources: | ||
repositories: | ||
- repository: templates | ||
type: github | ||
name: microsoft/vscode-azuretools | ||
ref: main | ||
endpoint: GitHub | ||
- repository: templates | ||
type: git | ||
name: OneBranch.Pipelines/GovernedTemplates | ||
ref: refs/heads/main | ||
|
||
# Use those templates | ||
extends: | ||
template: v2/OneBranch.Official.CrossPlat.yml@templates | ||
parameters: | ||
stages: | ||
- template: common-build.yml |
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,54 @@ | ||
stages: | ||
- stage: build | ||
jobs: | ||
- job: main | ||
pool: | ||
type: windows | ||
name: OneBranchPipelines | ||
steps: | ||
- task: NodeTool@0 | ||
displayName: Using Node.js | ||
inputs: | ||
versionSource: fromFile | ||
versionFilePath: .nvmrc | ||
|
||
- task: Npm@1 | ||
displayName: Install Dependencies | ||
inputs: | ||
command: custom | ||
customCommand: ci --no-optional | ||
|
||
- bash: | | ||
/usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & | ||
echo ">>> Started xvfb" | ||
displayName: Start X Virtual Frame Buffer | ||
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux')) | ||
- task: Npm@1 | ||
displayName: "Build" | ||
inputs: | ||
command: custom | ||
customCommand: run build | ||
|
||
- task: Npm@1 | ||
displayName: "Package" | ||
inputs: | ||
command: custom | ||
customCommand: run package | ||
|
||
- task: CopyFiles@2 | ||
displayName: "Copy packages and vsix to staging directory" | ||
inputs: | ||
Contents: | | ||
**/*.vsix | ||
**/*.tar.gz | ||
**/*.tgz | ||
TargetFolder: "$(build.artifactstagingdirectory)/build" | ||
condition: and(eq(variables['Agent.OS'], 'Linux'), ne(variables['System.PullRequest.IsFork'], 'True')) | ||
|
||
- task: PublishBuildArtifacts@1 | ||
displayName: "Publish artifacts: packages and vsix" | ||
inputs: | ||
PathtoPublish: "$(build.artifactstagingdirectory)/build" | ||
ArtifactName: $(artifact_name) | ||
condition: and(eq(variables['Agent.OS'], 'Linux'), ne(variables['System.PullRequest.IsFork'], 'True')) |