-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbitbucket-pipelines.yml
80 lines (79 loc) · 3.8 KB
/
bitbucket-pipelines.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
# This is a sample build configuration for JavaScript.
# Check our guides at https://confluence.atlassian.com/x/14UWN for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: node:12.10.0
pipelines:
default:
- step:
caches:
- node
script: # Modify the commands below to build your repository.
- yarn run global
- yarn install
- mkdir -p .docs
- yarn lint
- yarn test:integration
- mkdir test-report
- mv test-report.html test-report/index.html
- apt-get update && apt-get install -y python-dev
- apt-get install -y python-dev
- curl -O https://bootstrap.pypa.io/get-pip.py
- python get-pip.py
- pip install awscli
- yarn build
- yarn build-storybook
- aws s3 sync --delete ./coverage s3://reports.qa.youngapp.co/uikit/$BITBUCKET_BRANCH/coverage --acl bucket-owner-full-control --acl public-read
- aws s3 sync --delete ./test-report s3://reports.qa.youngapp.co/uikit/$BITBUCKET_BRANCH/report --acl bucket-owner-full-control --acl public-read
- aws s3 sync --delete ./storybook-static s3://reports.qa.youngapp.co/uikit/$BITBUCKET_BRANCH/storybook --acl bucket-owner-full-control --acl public-read
branches:
develop:
- step:
deployment: test
caches:
- node
script: # Modify the commands below to build your repository.
- yarn run global
- yarn install
- mkdir -p .docs
- yarn lint
- yarn test:integration
- mkdir test-report
- mv test-report.html test-report/index.html
- apt-get update && apt-get install -y python-dev
- apt-get install -y python-dev
- curl -O https://bootstrap.pypa.io/get-pip.py
- python get-pip.py
- pip install awscli
- yarn build
- yarn build-storybook
- aws s3 sync --delete ./coverage s3://reports.qa.youngapp.co/uikit/$BITBUCKET_BRANCH/coverage --acl bucket-owner-full-control --acl public-read
- aws s3 sync --delete ./test-report s3://reports.qa.youngapp.co/uikit/$BITBUCKET_BRANCH/report --acl bucket-owner-full-control --acl public-read
- aws s3 sync --delete ./storybook-static s3://reports.qa.youngapp.co/uikit/$BITBUCKET_BRANCH/storybook --acl bucket-owner-full-control --acl public-read
# - yarn global add renovate
# - renovate --platform=bitbucket --username youngapp-devops --password 72%mK9DV youngapp/ui-kit
master:
- step:
deployment: production
caches:
- node
script: # Modify the commands below to build your repository.
- yarn run global
- yarn install
- yarn lint
- yarn test:integration
- yarn build
- yarn release
- printf "//`node -p \"require('url').parse(process.env.NPM_REGISTRY_URL || 'https://registry.npmjs.org').host\"`/:_authToken=${NPM_TOKEN}\nregistry=${NPM_REGISTRY_URL:-https://registry.npmjs.org}\n" >> ~/.npmrc
- export NPM_TOKEN="3a1110a3-6ce8-4b2a-bca6-f786d217fb4c"
- 'echo "//registry.npmjs.org/:_authToken=3a1110a3-6ce8-4b2a-bca6-f786d217fb4c" > ~/.npmrc'
- npm publish
- git push --follow-tags https://youngapp-devops:72%[email protected]/youngapp/ui-kit.git master
- git fetch --unshallow
- git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
- git fetch origin
- git checkout --track origin/develop
- git merge --no-ff master
- git commit --amend -m "chore(release) - [skip ci]"
- git push https://youngapp-devops:72%[email protected]/youngapp/ui-kit.git develop