-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
TomFern
committed
Jun 14, 2021
1 parent
2e5e6d8
commit 40aebab
Showing
2 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
version: v1.0 | ||
name: Pipeline 2 | ||
agent: | ||
machine: | ||
type: e1-standard-2 | ||
os_image: ubuntu1804 | ||
blocks: | ||
- name: Publish | ||
task: | ||
jobs: | ||
- name: Publish | ||
commands: | ||
- npm install --global lerna | ||
- checkout | ||
- 'echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc' | ||
- 'lerna exec -- cache restore node-modules-\$LERNA_PACKAGE_NAME-$SEMAPHORE_GIT_BRANCH,node-modules-\$LERNA_PACKAGE_NAME node_modules' | ||
- lerna bootstrap | ||
- lerna publish from-git --no-git-tag-version --no-push --yes | ||
secrets: | ||
- name: NPM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
version: v1.0 | ||
name: First pipeline | ||
agent: | ||
machine: | ||
type: e1-standard-2 | ||
os_image: ubuntu1804 | ||
auto_cancel: | ||
queued: | ||
when: 'true' | ||
blocks: | ||
- name: Install | ||
task: | ||
jobs: | ||
- name: Bootstrap | ||
commands: | ||
- npm install --global lerna | ||
- checkout | ||
- 'lerna exec -- cache restore node-modules-\$LERNA_PACKAGE_NAME-$SEMAPHORE_GIT_BRANCH,node-modules-\$LERNA_PACKAGE_NAME' | ||
- lerna bootstrap | ||
- 'lerna exec -- cache store node-modules-\$LERNA_PACKAGE_NAME-$SEMAPHORE_GIT_BRANCH,node-modules-\$LERNA_PACKAGE_NAME node_modules' | ||
dependencies: [] | ||
- name: Tests API | ||
task: | ||
prologue: | ||
commands: | ||
- npm install --global lerna | ||
- checkout | ||
- 'lerna exec -- cache restore node-modules-\$LERNA_PACKAGE_NAME-$SEMAPHORE_GIT_BRANCH,node-modules-\$LERNA_PACKAGE_NAME node_modules' | ||
- lerna bootstrap | ||
jobs: | ||
- name: Lint | ||
commands: | ||
- lerna run lint --scope @tomfern/api2 | ||
- name: Unit tests | ||
commands: | ||
- lerna run test --scope @tomfern/api2 | ||
- name: Integration tests | ||
commands: | ||
- lerna run test-integration --scope @tomfern/api2 | ||
run: | ||
when: 'change_in(''/packages/api/'', { default_branch: ''main''})' | ||
dependencies: | ||
- Install | ||
- name: Tests WEB | ||
run: | ||
when: 'change_in(''/packages/web/'', { default_branch: ''main''})' | ||
dependencies: | ||
- Install | ||
task: | ||
prologue: | ||
commands: | ||
- npm install --global lerna | ||
- checkout | ||
- 'lerna exec -- cache restore node-modules-\$LERNA_PACKAGE_NAME-$SEMAPHORE_GIT_BRANCH,node-modules-\$LERNA_PACKAGE_NAME node_modules' | ||
- lerna bootstrap | ||
jobs: | ||
- name: Lint | ||
commands: | ||
- lerna run lint --scope @tomfern/web2 | ||
- name: Unit tests | ||
commands: | ||
- lerna run test --scope @tomfern/web2 | ||
- name: Integration tests | ||
commands: | ||
- lerna run test-integration --scope @tomfern/web2 | ||
promotions: | ||
- name: Publish packages | ||
pipeline_file: pipeline_2.yml | ||
auto_promote: | ||
when: tag =~ '.*' AND result = 'passed' |