product-build-linux-alpine.yml 2.1 KB
Newer Older
C
Christof Marti 已提交
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
steps:
- 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'
    imageName: 'vscode-linux-build-agent:alpine'
    containerCommand: uname

- script: |
    set -e

    cat << EOF > ~/.netrc
    machine monacotools.visualstudio.com
    password $(devops-pat)
    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 已提交
38 39 40 41
  displayName: Prepare tooling

- script: |
    set -e
C
Christof Marti 已提交
42 43 44
    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 已提交
45
  displayName: Merge distro
C
Christof Marti 已提交
46

J
Joao Moreno 已提交
47 48
- script: |
    set -e
C
Christof Marti 已提交
49
    CHILD_CONCURRENCY=1 yarn
J
Joao Moreno 已提交
50 51 52 53
  displayName: Install dependencies

- script: |
    set -e
C
Christof Marti 已提交
54
    yarn gulp mixin
J
Joao Moreno 已提交
55 56 57 58
  displayName: Mix in quality

- script: |
    set -e
C
Christof Marti 已提交
59 60
    yarn gulp hygiene
    yarn monaco-compile-check
J
Joao Moreno 已提交
61 62 63 64 65
  displayName: Run hygiene checks
  condition: eq(variables['VSCODE_STEP_ON_IT'], 'false')

- script: |
    set -e
C
Christof Marti 已提交
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
    ./build/azure-pipelines/linux/prebuild-alpine.sh
  displayName: Prepare build

- script: |
    set -e
    ./build/azure-pipelines/linux/build-alpine.sh
  displayName: Build

- 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)" \
    ./build/azure-pipelines/linux/publish-alpine.sh
  displayName: Publish

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