-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integrate mbx-ci with mapbox-gl-directions (#280)
* add in blank line to test * Attempt adding in mbx-ci * Attempt to fix schema error in config.yml * fixed yml formatting * fix yml formatting * removed blank line to test circle ci * bumped aws-cli back to 0.1.16, receiving aws related errors * Fix unit test fail * Remove blank line to trigger circle ci run * potential unit test fix * remove changes to unit tests * Sometimes request does not have responseText and needs to return dispatch 'error' to continue tests * formatting
- Loading branch information
Showing
2 changed files
with
55 additions
and
22 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 |
---|---|---|
@@ -1,7 +1,6 @@ | ||
version: 2.1 | ||
orbs: | ||
aws-cli: circleci/[email protected] | ||
|
||
workflows: | ||
version: 2 | ||
default: | ||
|
@@ -10,6 +9,14 @@ workflows: | |
filters: | ||
tags: | ||
only: /.*/ | ||
- install-mbx-ci: | ||
requires: | ||
- prepare | ||
filters: | ||
tags: | ||
only: /.*/ | ||
branches: | ||
ignore: '/pull\/[0-9]*/' | ||
- build: | ||
requires: | ||
- prepare | ||
|
@@ -33,68 +40,93 @@ workflows: | |
- build | ||
filters: | ||
tags: | ||
only: /v[0-9]+\.[0-9]+\.[0-9]+(\-dev)?/ | ||
only: '/v[0-9]+\.[0-9]+\.[0-9]+(\-dev)?/' | ||
branches: | ||
ignore: /.*/ | ||
|
||
defaults: &defaults | ||
docker: | ||
- image: circleci/node:10.16-browsers | ||
defaults: | ||
docker: &ref_0 | ||
- image: 'circleci/node:10.16-browsers' | ||
working_directory: ~/mapbox-gl-directions | ||
|
||
jobs: | ||
prepare: | ||
<<: *defaults | ||
docker: *ref_0 | ||
working_directory: ~/mapbox-gl-directions | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
keys: v1-yarn-{{ checksum "yarn.lock" }} | ||
keys: 'v1-yarn-{{ checksum "yarn.lock" }}' | ||
- run: yarn | ||
- save_cache: | ||
key: v1-yarn-{{ checksum "yarn.lock" }} | ||
key: 'v1-yarn-{{ checksum "yarn.lock" }}' | ||
paths: | ||
- "~/.yarn" | ||
- "node_modules" | ||
- ~/.yarn | ||
- node_modules | ||
- persist_to_workspace: | ||
root: . | ||
paths: | ||
- . | ||
install-mbx-ci: | ||
docker: *ref_0 | ||
working_directory: ~/mapbox-gl-directions | ||
steps: | ||
- run: | ||
name: Install mbx-ci | ||
command: > | ||
curl -Ls | ||
https://mapbox-release-engineering.s3.amazonaws.com/mbx-ci/latest/mbx-ci-linux-amd64 | ||
> ~/mbx-ci && | ||
chmod 755 ~/mbx-ci && | ||
~/mbx-ci aws setup | ||
- persist_to_workspace: | ||
root: ~/ | ||
paths: | ||
- .ssh | ||
- .aws | ||
- mbx-ci | ||
build: | ||
<<: *defaults | ||
docker: *ref_0 | ||
working_directory: ~/mapbox-gl-directions | ||
steps: | ||
- attach_workspace: | ||
at: . | ||
- run: yarn run build | ||
- store_artifacts: | ||
path: "dist" | ||
path: dist | ||
- persist_to_workspace: | ||
root: . | ||
paths: | ||
- dist | ||
lint: | ||
<<: *defaults | ||
docker: *ref_0 | ||
working_directory: ~/mapbox-gl-directions | ||
steps: | ||
- attach_workspace: | ||
at: . | ||
- restore_cache: | ||
keys: | ||
- v2-lint-{{ .Branch }} | ||
- 'v2-lint-{{ .Branch }}' | ||
- v2-lint | ||
- run: yarn run lint | ||
- save_cache: | ||
key: v2-lint-{{ .Branch }}-{{ .Revision }} | ||
key: 'v2-lint-{{ .Branch }}-{{ .Revision }}' | ||
paths: | ||
- ".eslintcache" | ||
- .eslintcache | ||
test: | ||
<<: *defaults | ||
docker: *ref_0 | ||
working_directory: ~/mapbox-gl-directions | ||
steps: | ||
- attach_workspace: | ||
at: . | ||
- run: yarn run test | ||
publish: | ||
<<: *defaults | ||
docker: *ref_0 | ||
working_directory: ~/mapbox-gl-directions | ||
steps: | ||
- attach_workspace: | ||
at: . | ||
- aws-cli/install | ||
- run: aws s3 cp --recursive --acl public-read dist s3://mapbox-gl-js/plugins/mapbox-gl-directions/$CIRCLE_TAG | ||
- run: >- | ||
aws s3 cp --recursive --acl public-read dist | ||
s3://mapbox-gl-js/plugins/mapbox-gl-directions/$CIRCLE_TAG |
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