product-build-darwin.yml 2.7 KB
Newer Older
J
Joao Moreno 已提交
1 2 3
steps:
- task: NodeTool@0
  inputs:
A
Alex Dima 已提交
4
    versionSpec: "10.15.1"
J
Joao Moreno 已提交
5 6 7

- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
  inputs:
J
Joao Moreno 已提交
8
    versionSpec: "1.10.1"
J
Joao Moreno 已提交
9

J
build  
Joao Moreno 已提交
10 11 12 13 14 15
- task: AzureKeyVault@1
  displayName: 'Azure Key Vault: Get Secrets'
  inputs:
    azureSubscription: 'vscode-builds-subscription'
    KeyVaultName: vscode

J
Joao Moreno 已提交
16 17
- script: |
    set -e
J
Joao Moreno 已提交
18 19 20

    cat << EOF > ~/.netrc
    machine monacotools.visualstudio.com
J
Joao Moreno 已提交
21
    password $(devops-pat)
J
Joao Moreno 已提交
22
    machine github.com
J
Joao Moreno 已提交
23
    login vscode
J
Joao Moreno 已提交
24
    password $(github-distro-mixin-password)
J
Joao Moreno 已提交
25 26
    EOF

J
Joao Moreno 已提交
27 28 29 30 31 32
    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
    git merge $(node -p "require('./package.json').distro")

J
Joao Moreno 已提交
33
    yarn
J
Joao Moreno 已提交
34 35
    yarn gulp mixin
    yarn gulp hygiene
J
Joao Moreno 已提交
36
    yarn monaco-compile-check
J
Joao Moreno 已提交
37
    node build/azure-pipelines/common/installDistro.js
J
Joao Moreno 已提交
38
    node build/lib/builtInExtensions.js
J
Joao Moreno 已提交
39
  displayName: Prepare build
J
Joao Moreno 已提交
40

J
Joao Moreno 已提交
41 42
- script: |
    set -e
J
Joao Moreno 已提交
43 44
    VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
    AZURE_STORAGE_ACCESS_KEY="$(ticino-storage-key)" \
J
Joao Moreno 已提交
45
    ./build/azure-pipelines/darwin/build.sh
J
Joao Moreno 已提交
46
  displayName: Build
J
Joao Moreno 已提交
47

J
Joao Moreno 已提交
48 49 50 51 52 53
- script: |
    set -e
    ./scripts/test.sh --build --tfs "Unit Tests"
    # APP_NAME="`ls $(agent.builddirectory)/VSCode-darwin | head -n 1`"
    # yarn smoketest -- --build "$(agent.builddirectory)/VSCode-darwin/$APP_NAME"
  displayName: Run unit tests
J
Joao Moreno 已提交
54

D
Daniel Imms 已提交
55 56 57 58 59
- script: |
    set -e
    ./scripts/test-integration.sh --build --tfs "Integration Tests"
  displayName: Run integration tests

J
Joao Moreno 已提交
60 61 62 63
- script: |
    set -e
    pushd ../VSCode-darwin && zip -r -X -y ../VSCode-darwin.zip * && popd
  displayName: Archive build
J
Joao Moreno 已提交
64

J
Joao Moreno 已提交
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
  inputs:
    ConnectedServiceName: 'ESRP CodeSign'
    FolderPath: '$(agent.builddirectory)'
    Pattern: 'VSCode-darwin.zip'
    signConfigType: inlineSignParams
    inlineOperation: |
      [
        {
          "keyCode": "CP-401337-Apple",
          "operationSetCode": "MacAppDeveloperSign",
          "parameters": [ ],
          "toolName": "sign",
          "toolVersion": "1.0"
        }
      ]
    SessionTimeout: 120
  displayName: Codesign
J
Joao Moreno 已提交
83

J
Joao Moreno 已提交
84 85
- script: |
    set -e
J
Joao Moreno 已提交
86
    VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
J
build  
Joao Moreno 已提交
87
    AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \
J
Joao Moreno 已提交
88 89 90
    AZURE_STORAGE_ACCESS_KEY="$(ticino-storage-key)" \
    AZURE_STORAGE_ACCESS_KEY_2="$(vscode-storage-key)" \
    VSCODE_HOCKEYAPP_TOKEN="$(vscode-hockeyapp-token)" \
J
Joao Moreno 已提交
91
    ./build/azure-pipelines/darwin/publish.sh
J
Joao Moreno 已提交
92
  displayName: Publish
93

J
Joao Moreno 已提交
94 95 96
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
  displayName: 'Component Detection'
  continueOnError: true