-
Notifications
You must be signed in to change notification settings - Fork 541
/
Copy pathinclude-publish-npm-package-deployment.yml
113 lines (96 loc) · 3.41 KB
/
include-publish-npm-package-deployment.yml
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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
# Copyright (c) Microsoft Corporation and contributors. All rights reserved.
# Licensed under the MIT License.
# include-publish-npm-package-deployment
parameters:
- name: feedKind
type: string
- name: feedUrl
type: string
- name: environment
type: string
- name: pool
type: object
default: Small-eastus2
- name: publishFlags
type: string
default:
- name: customEndPoint
type: string
default:
- name: tagName
type: string
default:
- name: buildDirectory
type: string
- name: buildToolsVersionToInstall
type: string
default: repo
# The path to the pnpm store.
- name: pnpmStorePath
type: string
default: $(Pipeline.Workspace)/.pnpm-store
jobs:
- deployment: publish_${{ replace(parameters.environment, '-', '_') }}
# Depend on the build job
# dependsOn: checkoutAndUploadThisRepoAsArtifact
displayName: Publish ${{ parameters.environment }}
pool: ${{ parameters.pool }}
environment: ${{ parameters.environment }}
# This templateContext section is necessary for 1ES compliance for deployment jobs.
# see https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/1es-pipeline-templates/features/releasepipelines/releaseworkflows/releasejob?tabs=combined-pipeline for more info.
templateContext:
type: releaseJob
isProduction: true
# Inputs here are automatically downloaded at the beginning of the job.
inputs:
- input: pipelineArtifact
artifactName: pack
buildType: current
targetPath: $(Pipeline.Workspace)/pack
workspace:
clean: all
variables:
version: $[ stageDependencies.build.build.outputs['SetVersion.version']]
isLatest: $[ stageDependencies.build.build.outputs['SetVersion.isLatest']]
strategy:
runOnce:
deploy:
steps:
- template: /tools/pipelines/templates/include-use-node-version.yml@self
- task: Bash@3
name: listFilesInWorkspace
displayName: List files in worksspace
inputs:
targetType: 'inline'
workingDirectory: '$(Pipeline.Workspace)'
script: |
echo "Listing files in directory: $(pwd)"
ls -la
- task: Bash@3
name: InstallBuildToolsFromTarball
displayName: Install Fluid Build Tools from Artifact Tarball
inputs:
targetType: 'inline'
workingDirectory: '$(Pipeline.Workspace)/buildTools-resource/pack/tarballs'
script: |
echo "Listing files in directory: $(pwd)"
ls -la
echo "attempting tarball install"
npm i -g ./*.tgz
# - template: /tools/pipelines/templates/include-publish-npm-package-steps.yml@self
# parameters:
# artifactPath: tarballs
# feedUrl: ${{ parameters.feedUrl }}
# customEndPoint: ${{ parameters.customEndPoint }}
# feedKind: ${{ parameters.feedKind }}
# publishFlags: ${{ parameters.publishFlags }}
# - job: gitTagForBuild
# displayName: Push Git Tag for Build
# dependsOn: publish_${{ replace(parameters.environment, '-', '_') }}
# steps:
# - checkout: self
# clean: true
# persistCredentials: true # Necessary for creation of git tags to work
# - template: /tools/pipelines/templates/include-git-tag-steps.yml@self
# parameters:
# tagName: ${{ parameters.tagName }}