2020-03-15 10:52:02 +03:00
|
|
|
variables:
|
|
|
|
YARN_CACHE_FOLDER: $(Pipeline.Workspace)/.yarn
|
2021-04-12 15:43:45 +03:00
|
|
|
pr: none
|
2020-03-15 10:52:02 +03:00
|
|
|
trigger:
|
|
|
|
tags:
|
|
|
|
include:
|
|
|
|
- "*"
|
2020-12-13 20:09:03 +03:00
|
|
|
paths:
|
|
|
|
exclude:
|
|
|
|
- .github/*
|
|
|
|
- docs/*
|
|
|
|
- mkdocs/*
|
2020-03-15 10:52:02 +03:00
|
|
|
jobs:
|
|
|
|
- job: Windows
|
|
|
|
pool:
|
|
|
|
vmImage: windows-2019
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-08-26 21:46:46 +03:00
|
|
|
node_14.x:
|
|
|
|
node_version: 14.x
|
2020-03-15 10:52:02 +03:00
|
|
|
steps:
|
2021-06-17 13:25:24 +03:00
|
|
|
- powershell: |
|
2020-03-15 10:52:02 +03:00
|
|
|
$CI_BUILD_TAG = git describe --tags
|
|
|
|
Write-Output ("##vso[task.setvariable variable=CI_BUILD_TAG;]$CI_BUILD_TAG")
|
|
|
|
condition: "and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))"
|
2021-06-17 13:25:24 +03:00
|
|
|
displayName: Set the tag name as an environment variable
|
2021-07-13 18:40:52 +03:00
|
|
|
|
2021-06-17 13:25:24 +03:00
|
|
|
- task: NodeTool@0
|
2020-03-15 10:52:02 +03:00
|
|
|
inputs:
|
|
|
|
versionSpec: $(node_version)
|
2021-06-17 13:25:24 +03:00
|
|
|
displayName: Install Node.js
|
2021-07-13 18:40:52 +03:00
|
|
|
|
2021-06-17 13:25:24 +03:00
|
|
|
- task: Cache@2
|
2020-03-15 10:52:02 +03:00
|
|
|
inputs:
|
2020-11-24 10:54:19 +03:00
|
|
|
key: 'yarn | "$(Agent.OS)"" | yarn.lock'
|
2020-11-13 13:28:04 +03:00
|
|
|
restoreKeys: |
|
|
|
|
yarn | "$(Agent.OS)"
|
2020-03-15 10:52:02 +03:00
|
|
|
path: $(YARN_CACHE_FOLDER)
|
2021-06-17 13:25:24 +03:00
|
|
|
displayName: Cache Yarn packages
|
2021-07-13 18:40:52 +03:00
|
|
|
|
2021-06-17 13:25:24 +03:00
|
|
|
- bash: |
|
2021-04-20 16:35:37 +03:00
|
|
|
set -e
|
|
|
|
git clone "https://${GH_TOKEN}@github.com/lensapp/lens-ide.git" .lens-ide-overlay
|
|
|
|
rm -rf .lens-ide-overlay/.git
|
|
|
|
cp -r .lens-ide-overlay/* ./
|
2021-04-27 20:21:52 +03:00
|
|
|
jq -s '.[0] * .[1]' package.json package.ide.json > package.custom.json && mv package.custom.json package.json
|
2021-04-20 16:35:37 +03:00
|
|
|
env:
|
|
|
|
GH_TOKEN: $(LENS_IDE_GH_TOKEN)
|
2021-06-17 13:25:24 +03:00
|
|
|
displayName: Customize config
|
2021-07-13 18:40:52 +03:00
|
|
|
|
2021-06-17 13:25:24 +03:00
|
|
|
- script: make build
|
2020-06-11 10:56:43 +03:00
|
|
|
condition: "and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))"
|
2020-03-15 10:52:02 +03:00
|
|
|
env:
|
|
|
|
WIN_CSC_LINK: $(WIN_CSC_LINK)
|
|
|
|
WIN_CSC_KEY_PASSWORD: $(WIN_CSC_KEY_PASSWORD)
|
2021-04-12 20:45:10 +03:00
|
|
|
AWS_ACCESS_KEY_ID: $(AWS_ACCESS_KEY_ID)
|
|
|
|
AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY)
|
2021-04-26 16:42:59 +03:00
|
|
|
BUILD_NUMBER: $(Build.BuildNumber)
|
2021-08-31 11:00:27 +03:00
|
|
|
ELECTRON_BUILDER_EXTRA_ARGS: "--x64 --ia32"
|
2021-06-17 13:25:24 +03:00
|
|
|
displayName: Build
|
2021-06-14 07:37:54 +03:00
|
|
|
|
2020-03-15 10:52:02 +03:00
|
|
|
- job: macOS
|
|
|
|
pool:
|
2021-08-31 11:00:27 +03:00
|
|
|
vmImage: macOS-11
|
2020-03-15 10:52:02 +03:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-08-26 21:46:46 +03:00
|
|
|
node_14.x:
|
|
|
|
node_version: 14.x
|
2020-03-15 10:52:02 +03:00
|
|
|
steps:
|
2021-06-17 13:25:24 +03:00
|
|
|
- script: CI_BUILD_TAG=`git describe --tags` && echo "##vso[task.setvariable variable=CI_BUILD_TAG]$CI_BUILD_TAG"
|
2020-06-11 10:56:43 +03:00
|
|
|
condition: "and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))"
|
2021-06-17 13:25:24 +03:00
|
|
|
displayName: Set the tag name as an environment variable
|
2021-07-13 18:40:52 +03:00
|
|
|
|
2021-06-17 13:25:24 +03:00
|
|
|
- task: NodeTool@0
|
2020-03-15 10:52:02 +03:00
|
|
|
inputs:
|
|
|
|
versionSpec: $(node_version)
|
2021-06-17 13:25:24 +03:00
|
|
|
displayName: Install Node.js
|
2021-07-13 18:40:52 +03:00
|
|
|
|
2021-06-17 13:25:24 +03:00
|
|
|
- task: Cache@2
|
2020-03-15 10:52:02 +03:00
|
|
|
inputs:
|
2020-11-24 10:54:19 +03:00
|
|
|
key: 'yarn | "$(Agent.OS)" | yarn.lock'
|
2020-11-13 13:28:04 +03:00
|
|
|
restoreKeys: |
|
|
|
|
yarn | "$(Agent.OS)"
|
|
|
|
path: $(YARN_CACHE_FOLDER)
|
2021-06-17 13:25:24 +03:00
|
|
|
displayName: Cache Yarn packages
|
2021-07-13 18:40:52 +03:00
|
|
|
|
2021-06-17 13:25:24 +03:00
|
|
|
- bash: |
|
2021-04-20 16:35:37 +03:00
|
|
|
set -e
|
|
|
|
git clone "https://${GH_TOKEN}@github.com/lensapp/lens-ide.git" .lens-ide-overlay
|
|
|
|
rm -rf .lens-ide-overlay/.git
|
|
|
|
cp -r .lens-ide-overlay/* ./
|
2021-04-27 20:21:52 +03:00
|
|
|
jq -s '.[0] * .[1]' package.json package.ide.json > package.custom.json && mv package.custom.json package.json
|
2021-04-20 16:35:37 +03:00
|
|
|
env:
|
|
|
|
GH_TOKEN: $(LENS_IDE_GH_TOKEN)
|
2021-06-17 13:25:24 +03:00
|
|
|
displayName: Customize config
|
2021-07-13 18:40:52 +03:00
|
|
|
|
2021-06-17 13:25:24 +03:00
|
|
|
- script: make build
|
2020-06-09 13:18:24 +03:00
|
|
|
condition: "and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))"
|
2020-03-15 10:52:02 +03:00
|
|
|
env:
|
|
|
|
APPLEID: $(APPLEID)
|
|
|
|
APPLEIDPASS: $(APPLEIDPASS)
|
|
|
|
CSC_LINK: $(CSC_LINK)
|
|
|
|
CSC_KEY_PASSWORD: $(CSC_KEY_PASSWORD)
|
2021-04-12 20:45:10 +03:00
|
|
|
AWS_ACCESS_KEY_ID: $(AWS_ACCESS_KEY_ID)
|
|
|
|
AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY)
|
2021-04-26 16:42:59 +03:00
|
|
|
BUILD_NUMBER: $(Build.BuildNumber)
|
2021-08-31 11:00:27 +03:00
|
|
|
ELECTRON_BUILDER_EXTRA_ARGS: "--x64 --arm64"
|
2021-08-26 21:46:46 +03:00
|
|
|
displayName: Build
|
|
|
|
|
|
|
|
- job: Linux
|
|
|
|
pool:
|
2021-09-23 15:14:24 +03:00
|
|
|
vmImage: ubuntu-18.04
|
2021-08-26 21:46:46 +03:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
node_14.x:
|
|
|
|
node_version: 14.x
|
|
|
|
steps:
|
|
|
|
- script: CI_BUILD_TAG=`git describe --tags` && echo "##vso[task.setvariable variable=CI_BUILD_TAG]$CI_BUILD_TAG"
|
|
|
|
condition: "and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))"
|
|
|
|
displayName: Set the tag name as an environment variable
|
|
|
|
|
|
|
|
- task: NodeTool@0
|
|
|
|
inputs:
|
|
|
|
versionSpec: $(node_version)
|
|
|
|
displayName: Install Node.js
|
2021-07-13 18:40:52 +03:00
|
|
|
|
2021-08-26 21:46:46 +03:00
|
|
|
- task: Cache@2
|
|
|
|
inputs:
|
|
|
|
key: 'yarn | "$(Agent.OS)" | yarn.lock'
|
|
|
|
restoreKeys: |
|
|
|
|
yarn | "$(Agent.OS)"
|
|
|
|
path: $(YARN_CACHE_FOLDER)
|
|
|
|
displayName: Cache Yarn packages
|
2021-07-13 18:40:52 +03:00
|
|
|
|
2021-06-17 13:25:24 +03:00
|
|
|
- bash: |
|
2021-08-26 21:46:46 +03:00
|
|
|
set -e
|
|
|
|
git clone "https://${GH_TOKEN}@github.com/lensapp/lens-ide.git" .lens-ide-overlay
|
|
|
|
rm -rf .lens-ide-overlay/.git
|
|
|
|
cp -r .lens-ide-overlay/* ./
|
|
|
|
jq -s '.[0] * .[1]' package.json package.ide.json > package.custom.json && mv package.custom.json package.json
|
2020-03-15 10:52:02 +03:00
|
|
|
env:
|
2021-08-26 21:46:46 +03:00
|
|
|
GH_TOKEN: $(LENS_IDE_GH_TOKEN)
|
|
|
|
displayName: Customize config
|
2021-07-13 18:40:52 +03:00
|
|
|
|
2021-06-17 13:25:24 +03:00
|
|
|
- script: make build
|
2020-06-11 10:56:43 +03:00
|
|
|
condition: "and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))"
|
2020-03-15 10:52:02 +03:00
|
|
|
env:
|
2021-04-12 20:45:10 +03:00
|
|
|
AWS_ACCESS_KEY_ID: $(AWS_ACCESS_KEY_ID)
|
|
|
|
AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY)
|
2021-04-26 16:42:59 +03:00
|
|
|
BUILD_NUMBER: $(Build.BuildNumber)
|
2021-06-17 13:25:24 +03:00
|
|
|
displayName: Build
|