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

Make it a OneBranch build #139

Merged
merged 1 commit into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 0 additions & 54 deletions .azure-pipelines/1esmain.yml

This file was deleted.

35 changes: 35 additions & 0 deletions .azure-pipelines/OneBranch.Official.yml
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
54 changes: 54 additions & 0 deletions .azure-pipelines/common-build.yml
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'))
Loading