-
Notifications
You must be signed in to change notification settings - Fork 12
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
1 parent
184c4f8
commit 5623797
Showing
6 changed files
with
314 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
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,93 @@ | ||
--- | ||
version: 2 | ||
plan: | ||
project-key: AJL | ||
key: CSSTOKENIZERBUILD | ||
name: CSS Tokenizer - build | ||
variables: | ||
dockerContainer: adguard/node-ssh:16.17--1 | ||
|
||
stages: | ||
- Build: | ||
manual: 'false' | ||
final: 'false' | ||
jobs: | ||
- Build | ||
|
||
Build: | ||
key: BUILD | ||
other: | ||
clean-working-dir: true | ||
docker: | ||
image: "${bamboo.dockerContainer}" | ||
volumes: | ||
"${system.YARN_DIR}": "${bamboo.cacheYarn}" | ||
tasks: | ||
- checkout: | ||
force-clean-build: 'true' | ||
- script: | ||
interpreter: SHELL | ||
scripts: | ||
- |- | ||
set -e | ||
set -x | ||
# Fix mixed logs | ||
exec 2>&1 | ||
ls -alt | ||
# Bootstrap the package with Lerna | ||
npx lerna@6 bootstrap --scope @adguard/css-tokenizer --include-dependencies | ||
# Build CSS Tokenizer with Rollup | ||
npx lerna@6 run --scope @adguard/css-tokenizer build | ||
# Pack the CSS Tokenizer package into a tarball | ||
cd packages/css-tokenizer/ | ||
yarn pack --filename css-tokenizer.tgz | ||
cd ../../ | ||
# Cleanup parent | ||
rm -rf node_modules | ||
# Cleanup child packages | ||
npx lerna@6 clean -y | ||
- inject-variables: | ||
file: ./packages/css-tokenizer/dist/build.txt | ||
scope: RESULT | ||
namespace: inject | ||
- any-task: | ||
plugin-key: com.atlassian.bamboo.plugins.vcs:task.vcs.tagging | ||
configuration: | ||
selectedRepository: defaultRepository | ||
tagName: css-tokenizer-v${bamboo.inject.version} | ||
# Store the CSS Tokenizer package tarball as an artifact | ||
artifacts: | ||
- name: css-tokenizer.tgz | ||
location: packages/css-tokenizer/ | ||
pattern: css-tokenizer.tgz | ||
shared: true | ||
required: true | ||
requirements: | ||
- adg-docker: 'true' | ||
|
||
triggers: [] | ||
|
||
branches: | ||
create: manually | ||
delete: never | ||
link-to-jira: 'true' | ||
|
||
notifications: | ||
- events: | ||
- plan-status-changed | ||
recipients: | ||
- webhook: | ||
name: Build webhook | ||
url: http://prod.jirahub.service.eu.consul/v1/webhook/bamboo | ||
|
||
labels: [] | ||
|
||
other: | ||
concurrent-build-plugin: system-default |
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,47 @@ | ||
--- | ||
version: 2 | ||
deployment: | ||
name: CSS Tokenizer - deploy | ||
source-plan: AJL-CSSTOKENIZERBUILD | ||
release-naming: ${bamboo.inject.version} | ||
environments: | ||
- npmjs | ||
|
||
npmjs: | ||
docker: | ||
image: adguard/node-ssh:16.17--1 | ||
volumes: | ||
${system.YARN_DIR}: "${bamboo.cacheYarn}" | ||
triggers: [ ] | ||
tasks: | ||
- checkout: | ||
force-clean-build: 'true' | ||
# Download previously built tarball from Bamboo artifacts | ||
- artifact-download: | ||
artifacts: | ||
- name: css-tokenizer.tgz | ||
- script: | ||
interpreter: SHELL | ||
scripts: | ||
- |- | ||
set -e | ||
set -x | ||
# Fix mixed logs | ||
exec 2>&1 | ||
ls -alt | ||
# Publish tarball to NPM package registry | ||
export NPM_TOKEN=${bamboo.npmSecretToken} | ||
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc | ||
npm publish css-tokenizer.tgz --access public | ||
requirements: | ||
- adg-docker: 'true' | ||
notifications: | ||
- events: | ||
- deployment-started-and-finished | ||
recipients: | ||
- webhook: | ||
name: Deploy webhook | ||
url: http://prod.jirahub.service.eu.consul/v1/webhook/bamboo |
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,65 @@ | ||
--- | ||
version: 2 | ||
plan: | ||
project-key: AJL | ||
key: CSSTOKENIZERINCR | ||
name: CSS Tokenizer - increment | ||
variables: | ||
dockerContainer: adguard/node-ssh:16.17--1 | ||
|
||
stages: | ||
- Increment: | ||
manual: 'true' | ||
final: 'false' | ||
jobs: | ||
- Increment | ||
|
||
Increment: | ||
key: INCRCSSTOKENIZER | ||
docker: | ||
image: "${bamboo.dockerContainer}" | ||
volumes: | ||
"${system.YARN_DIR}": "${bamboo.cacheYarn}" | ||
tasks: | ||
- checkout: | ||
force-clean-build: 'true' | ||
- script: | ||
interpreter: SHELL | ||
scripts: | ||
- |- | ||
branch="${bamboo.planRepository.branchName}" | ||
# Throw error if current branch is not "master", | ||
# because we do not deploy changes from other branches | ||
if [ $branch != "master" ] | ||
then | ||
echo "increment is not supported on branch ${branch}" | ||
exit 1; | ||
fi | ||
set -e | ||
set -x | ||
# Fix mixed logs | ||
exec 2>&1 | ||
ls -alt | ||
npx lerna@6 run --scope @adguard/css-tokenizer increment | ||
- any-task: | ||
plugin-key: com.atlassian.bamboo.plugins.vcs:task.vcs.commit | ||
configuration: | ||
commitMessage: 'skipci: Automatic increment build number' | ||
selectedRepository: defaultRepository | ||
requirements: | ||
- adg-docker: 'true' | ||
|
||
branches: | ||
create: manually | ||
delete: never | ||
link-to-jira: 'true' | ||
|
||
labels: [ ] | ||
|
||
other: | ||
concurrent-build-plugin: system-default |
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,16 @@ | ||
--- | ||
version: 2 | ||
deployment: | ||
name: CSS Tokenizer - deploy | ||
deployment-permissions: | ||
- groups: | ||
- extensions-developers | ||
permissions: | ||
- view | ||
environment-permissions: | ||
- npmjs: | ||
- groups: | ||
- extensions-developers | ||
permissions: | ||
- view | ||
- deploy |
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,78 @@ | ||
--- | ||
version: 2 | ||
plan: | ||
project-key: AJL | ||
key: CSSTOKENIZERTEST | ||
name: CSS Tokenizer - tests | ||
variables: | ||
dockerContainer: adguard/node-ssh:16.17--1 | ||
|
||
stages: | ||
- Test: | ||
manual: 'false' | ||
final: 'false' | ||
jobs: | ||
- Test | ||
|
||
Test: | ||
key: TEST | ||
docker: | ||
image: "${bamboo.dockerContainer}" | ||
volumes: | ||
"${system.YARN_DIR}": "${bamboo.cacheYarn}" | ||
tasks: | ||
- checkout: | ||
force-clean-build: 'true' | ||
- script: | ||
interpreter: SHELL | ||
scripts: | ||
- |- | ||
set -e | ||
set -x | ||
# Fix mixed logs | ||
exec 2>&1 | ||
ls -alt | ||
# Bootstrap the package | ||
npx lerna@6 bootstrap --scope @adguard/css-tokenizer --include-dependencies | ||
# Check TypeScript types with TSC | ||
npx lerna@6 run --scope @adguard/css-tokenizer check-types | ||
# ESLint & Markdownlint | ||
npx lerna@6 run --scope @adguard/css-tokenizer lint | ||
# Run tests with Jest | ||
npx lerna@6 run --scope @adguard/css-tokenizer test | ||
# cleanup parent | ||
rm -rf node_modules | ||
# cleanup child packages | ||
npx lerna@6 clean -y | ||
final-tasks: | ||
- clean | ||
requirements: | ||
- adg-docker: 'true' | ||
|
||
branches: | ||
create: for-pull-request | ||
delete: | ||
after-deleted-days: '1' | ||
after-inactive-days: '5' | ||
link-to-jira: 'true' | ||
|
||
notifications: | ||
- events: | ||
- plan-status-changed | ||
recipients: | ||
- webhook: | ||
name: Build webhook | ||
url: http://prod.jirahub.service.eu.consul/v1/webhook/bamboo | ||
|
||
labels: [ ] | ||
|
||
other: | ||
concurrent-build-plugin: system-default |