Welcome to mirror list, hosted at ThFree Co, Russian Federation.

distro-build.yml « azure-pipelines « build - github.com/microsoft/vscode.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 74fddcc55a84b09d73936c92a6eff3c003c71a8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
pool:
  vmImage: 'Ubuntu-16.04'

trigger:
  branches:
    include: ['master', 'release/*']
pr:
  branches:
    include: ['master', 'release/*']

steps:
- task: NodeTool@0
  inputs:
    versionSpec: "10.15.1"

- task: AzureKeyVault@1
  displayName: 'Azure Key Vault: Get Secrets'
  inputs:
    azureSubscription: 'vscode-builds-subscription'
    KeyVaultName: vscode

- script: |
    set -e

    cat << EOF > ~/.netrc
    machine github.com
    login vscode
    password $(github-distro-mixin-password)
    EOF

    git config user.email "vscode@microsoft.com"
    git config user.name "VSCode"

    git remote add distro "https://github.com/$VSCODE_MIXIN_REPO.git"
    git fetch distro

    # Push master branch into oss/master
    git push distro origin/master:refs/heads/oss/master

    # Push every release branch into oss/release
    git for-each-ref --format="%(refname:short)" refs/remotes/origin/release/* | sed 's/^origin\/\(.*\)$/\0:refs\/heads\/oss\/\1/' | xargs git push distro

    git merge $(node -p "require('./package.json').distro")

  displayName: Sync & Merge Distro