product-build-win32.yml 4.8 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:
8
    versionSpec: "1.10.1"
J
Joao Moreno 已提交
9

J
Joao Moreno 已提交
10 11 12 13 14
- task: UsePythonVersion@0
  inputs:
    versionSpec: '2.x'
    addToPath: true

J
Joao Moreno 已提交
15
- powershell: |
J
Joao Moreno 已提交
16
    . build/azure-pipelines/win32/exec.ps1
J
Joao Moreno 已提交
17
    $ErrorActionPreference = "Stop"
J
Joao Moreno 已提交
18
    "machine monacotools.visualstudio.com`npassword $(VSO_PAT)`nmachine github.com`nlogin vscode`npassword $(VSCODE_MIXIN_PASSWORD)" | Out-File "$env:USERPROFILE\_netrc" -Encoding ASCII
J
Joao Moreno 已提交
19 20
    $env:npm_config_arch="$(VSCODE_ARCH)"
    $env:CHILD_CONCURRENCY="1"
J
Joao Moreno 已提交
21 22 23 24 25 26 27

    exec { git config user.email "vscode@microsoft.com" }
    exec { git config user.name "VSCode" }
    exec { git remote add distro "https://github.com/$(VSCODE_MIXIN_REPO).git" }
    exec { git fetch distro }
    exec { git merge $(node -p "require('./package.json').distro") }

J
Joao Moreno 已提交
28
    exec { yarn }
J
Joao Moreno 已提交
29 30 31
    exec { yarn gulp mixin }
    exec { yarn gulp hygiene }
    exec { yarn monaco-compile-check }
J
Joao Moreno 已提交
32
    exec { node build/azure-pipelines/common/installDistro.js }
J
Joao Moreno 已提交
33
    exec { node build/lib/builtInExtensions.js }
J
Joao Moreno 已提交
34
  displayName: Prepare build
J
Joao Moreno 已提交
35

J
Joao Moreno 已提交
36 37 38 39
- powershell: |
    . build/azure-pipelines/win32/exec.ps1
    $ErrorActionPreference = "Stop"
    $env:VSCODE_MIXIN_PASSWORD="$(VSCODE_MIXIN_PASSWORD)"
J
Joao Moreno 已提交
40 41
    .\build\azure-pipelines\win32\build.ps1
  displayName: Build
J
Joao Moreno 已提交
42 43 44 45

- powershell: |
    . build/azure-pipelines/win32/exec.ps1
    $ErrorActionPreference = "Stop"
J
Joao Moreno 已提交
46
    exec { yarn gulp "electron-$(VSCODE_ARCH)" }
J
Joao Moreno 已提交
47 48
    exec { .\scripts\test.bat --build --tfs "Unit Tests" }
    # yarn smoketest -- --build "$(agent.builddirectory)\VSCode-win32-$(VSCODE_ARCH)"
J
Joao Moreno 已提交
49
  displayName: Run unit tests
D
Daniel Imms 已提交
50 51 52 53

- powershell: |
    . build/azure-pipelines/win32/exec.ps1
    $ErrorActionPreference = "Stop"
J
Joao Moreno 已提交
54
    exec { yarn gulp "electron-$(VSCODE_ARCH)" }
D
Daniel Imms 已提交
55
    exec { .\scripts\test-integration.bat --build --tfs "Integration Tests" }
J
Joao Moreno 已提交
56
  displayName: Run integration tests
J
Joao Moreno 已提交
57 58 59 60

- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
  inputs:
    ConnectedServiceName: 'ESRP CodeSign'
A
Alex Dima 已提交
61
    FolderPath: '$(agent.builddirectory)/VSCode-win32-$(VSCODE_ARCH),$(agent.builddirectory)/vscode-reh-win32-$(VSCODE_ARCH)'
J
Joao Moreno 已提交
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
    Pattern: '*.dll,*.exe,*.node'
    signConfigType: inlineSignParams
    inlineOperation: |
      [
        {
          "keyCode": "CP-230012",
          "operationSetCode": "SigntoolSign",
          "parameters": [
            {
              "parameterName": "OpusName",
              "parameterValue": "VS Code"
            },
            {
              "parameterName": "OpusInfo",
              "parameterValue": "https://code.visualstudio.com/"
            },
            {
              "parameterName": "Append",
              "parameterValue": "/as"
            },
            {
              "parameterName": "FileDigest",
              "parameterValue": "/fd \"SHA256\""
            },
            {
              "parameterName": "PageHash",
              "parameterValue": "/NPH"
            },
            {
              "parameterName": "TimeStamp",
              "parameterValue": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
            }
          ],
          "toolName": "sign",
          "toolVersion": "1.0"
        },
        {
          "keyCode": "CP-230012",
          "operationSetCode": "SigntoolVerify",
          "parameters": [
            {
              "parameterName": "VerifyAll",
              "parameterValue": "/all"
            }
          ],
          "toolName": "sign",
          "toolVersion": "1.0"
        }
      ]
    SessionTimeout: 120

- task: NuGetCommand@2
  displayName: Install ESRPClient.exe
  inputs:
    restoreSolution: 'build\azure-pipelines\win32\ESRPClient\packages.config'
    feedsToUse: config
    nugetConfigPath: 'build\azure-pipelines\win32\ESRPClient\NuGet.config'
    externalFeedCredentials: 3fc0b7f7-da09-4ae7-a9c8-d69824b1819b
    restoreDirectory: packages

- task: ESRPImportCertTask@1
  displayName: Import ESRP Request Signing Certificate
  inputs:
    ESRP: 'ESRP CodeSign'

- powershell: |
    $ErrorActionPreference = "Stop"
    .\build\azure-pipelines\win32\import-esrp-auth-cert.ps1 -AuthCertificateBase64 $(ESRP_AUTH_CERTIFICATE) -AuthCertificateKey $(ESRP_AUTH_CERTIFICATE_KEY)
  displayName: Import ESRP Auth Certificate

- powershell: |
    . build/azure-pipelines/win32/exec.ps1
    $ErrorActionPreference = "Stop"
    $env:AZURE_STORAGE_ACCESS_KEY_2 = "$(AZURE_STORAGE_ACCESS_KEY_2)"
    $env:AZURE_DOCUMENTDB_MASTERKEY = "$(AZURE_DOCUMENTDB_MASTERKEY)"
J
Joao Moreno 已提交
137 138 139
    $env:VSCODE_HOCKEYAPP_TOKEN = "$(VSCODE_HOCKEYAPP_TOKEN)"
    .\build\azure-pipelines\win32\publish.ps1
  displayName: Publish
J
Joao Moreno 已提交
140 141 142 143

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