product-build-linux-multiarch.yml 3.5 KB
Newer Older
1
steps:
J
Joao Moreno 已提交
2 3 4 5 6 7 8 9
- script: |
    mkdir -p .build
    echo -n $BUILD_SOURCEVERSION > .build/commit
  displayName: Prepare cache flag

- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
  inputs:
    keyfile: '.build/commit'
B
Benjamin Pasero 已提交
10
    targetfolder: '.build, **/out-build, **/out-vscode-min, **/out-vscode-reh-min, **/out-vscode-reh-web-min'
J
Joao Moreno 已提交
11 12 13 14 15 16 17 18 19 20
    vstsFeed: 'npm-vscode'
    platformIndependent: true
    alias: 'Compilation'

- script: |
    set -e
    exit 1
  displayName: Check RestoreCache
  condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'))

21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
- task: NodeTool@0
  inputs:
    versionSpec: "10.15.1"

- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
  inputs:
    versionSpec: "1.10.1"

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

- task: Docker@1
  displayName: 'Pull image'
  inputs:
    azureSubscriptionEndpoint: 'vscode-builds-subscription'
    azureContainerRegistry: vscodehub.azurecr.io
    command: 'Run an image'
J
Joao Moreno 已提交
41
    imageName: 'vscode-linux-build-agent:$(VSCODE_ARCH)'
42 43 44 45 46 47 48 49 50 51 52 53 54
    containerCommand: uname

- 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"
J
Joao Moreno 已提交
55 56 57 58
  displayName: Prepare tooling

- script: |
    set -e
59 60 61
    git remote add distro "https://github.com/$(VSCODE_MIXIN_REPO).git"
    git fetch distro
    git merge $(node -p "require('./package.json').distro")
J
Joao Moreno 已提交
62
  displayName: Merge distro
63

J
Joao Moreno 已提交
64 65
- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
  inputs:
66
    keyfile: 'build/.cachesalt, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
J
Joao Moreno 已提交
67 68
    targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
    vstsFeed: 'npm-vscode'
J
Joao Moreno 已提交
69

J
Joao Moreno 已提交
70 71
- script: |
    set -e
J
Joao Moreno 已提交
72
    CHILD_CONCURRENCY=1 yarn --frozen-lockfile
J
Joao Moreno 已提交
73
  displayName: Install dependencies
J
Joao Moreno 已提交
74
  condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
J
Joao Moreno 已提交
75

J
Joao Moreno 已提交
76 77
- task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
  inputs:
78
    keyfile: 'build/.cachesalt, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
J
Joao Moreno 已提交
79 80 81
    targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
    vstsFeed: 'npm-vscode'
  condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
J
Joao Moreno 已提交
82

J
Joao Moreno 已提交
83 84
- script: |
    set -e
J
Joao Moreno 已提交
85 86 87
    yarn postinstall
  displayName: Run postinstall scripts
  condition: and(succeeded(), eq(variables['CacheRestored'], 'true'))
J
Joao Moreno 已提交
88 89 90

- script: |
    set -e
J
Joao Moreno 已提交
91
    node build/azure-pipelines/mixin
J
Joao Moreno 已提交
92
  displayName: Mix in quality
J
Joao Moreno 已提交
93 94 95

- script: |
    set -e
J
Joao Moreno 已提交
96
    CHILD_CONCURRENCY=1 ./build/azure-pipelines/linux/multiarch/$(VSCODE_ARCH)/prebuild.sh
J
Joao Moreno 已提交
97
  displayName: Prebuild
98 99 100

- script: |
    set -e
J
Joao Moreno 已提交
101
    ./build/azure-pipelines/linux/multiarch/$(VSCODE_ARCH)/build.sh
102 103
  displayName: Build

J
Joao Moreno 已提交
104 105 106 107 108 109
- script: |
    set -e
    AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \
    AZURE_STORAGE_ACCESS_KEY_2="$(vscode-storage-key)" \
    VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
    VSCODE_HOCKEYAPP_TOKEN="$(vscode-hockeyapp-token)" \
J
Joao Moreno 已提交
110
    ./build/azure-pipelines/linux/multiarch/$(VSCODE_ARCH)/publish.sh
J
Joao Moreno 已提交
111
  displayName: Publish
112 113 114 115

- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
  displayName: 'Component Detection'
  continueOnError: true