This repository has been archived by the owner on Nov 19, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Showing
3 changed files
with
26 additions
and
1,491 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,75 +1,36 @@ | ||
version: 2 | ||
|
||
# References to reduce duplication in the rest of the config | ||
references: | ||
container: &container_config | ||
docker: | ||
- image: circleci/node:8 | ||
cache_key: &cache_key | ||
dependency-cache-{{ checksum "package.json" }} | ||
cache_node_modules: &cache_node_modules | ||
save_cache: | ||
key: *cache_key | ||
paths: | ||
- node_modules | ||
restore_node_modules: &restore_node_modules | ||
restore_cache: | ||
keys: | ||
- *cache_key | ||
|
||
# Circle jobs | ||
jobs: | ||
|
||
# Ensure that the image set manifest is in place | ||
manifest: | ||
<<: *container_config | ||
test: | ||
docker: | ||
- image: circleci/node:10-browsers | ||
steps: | ||
- checkout | ||
- *restore_node_modules | ||
- run: | ||
name: Install dependencies | ||
command: npm install | ||
- *cache_node_modules | ||
- run: | ||
name: Build the image set manifest | ||
command: ./node_modules/.bin/oist build-manifest --scheme ${IMAGESET_SCHEME} --source-directory=${IMAGESET_SOURCE_DIRECTORY} | ||
- run: | ||
name: Commit and push the manifest changes | ||
command: > | ||
if [ ! "$(git status --porcelain)" == "" ]; then | ||
git config --global user.email "origami.support@ft.com"; | ||
git config --global user.name "origamiserviceuser [bot]"; | ||
git commit imageset.json -m 'Update image manifest [ci skip]'; | ||
git push origin master; | ||
fi | ||
# Publish the image set to S3 | ||
publish: | ||
<<: *container_config | ||
- run: npm config set prefix "$HOME/.local" | ||
- run: npm i -g origami-build-tools@^7 | ||
- run: $HOME/.local/bin/obt install | ||
- run: $HOME/.local/bin/obt demo --demo-filter pa11y --suppress-errors | ||
- run: $HOME/.local/bin/obt verify | ||
- run: $HOME/.local/bin/obt test | ||
- run: git clean -fxd | ||
- run: npx occ 0.0.0 | ||
- run: $HOME/.local/bin/obt install --ignore-bower | ||
- run: $HOME/.local/bin/obt test --ignore-bower | ||
publish_to_npm: | ||
docker: | ||
- image: circleci/node:10 | ||
steps: | ||
- checkout | ||
- *restore_node_modules | ||
- run: | ||
name: Publish to EU bucket | ||
command: ./node_modules/.bin/oist publish-s3 --bucket origami-imageset-data-eu --scheme ${IMAGESET_SCHEME} --source-directory=${IMAGESET_SOURCE_DIRECTORY} --scheme-version $CIRCLE_TAG | ||
- run: | ||
name: Publish to US bucket | ||
command: ./node_modules/.bin/oist publish-s3 --bucket origami-imageset-data-us --scheme ${IMAGESET_SCHEME} --source-directory=${IMAGESET_SOURCE_DIRECTORY} --scheme-version $CIRCLE_TAG | ||
|
||
# Circle workflows | ||
- run: npx occ ${CIRCLE_TAG##v} | ||
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > $HOME/.npmrc | ||
- run: npm publish --access public | ||
workflows: | ||
version: 2 | ||
manifest-and-publish: | ||
test: | ||
jobs: | ||
- manifest: | ||
- test | ||
- publish_to_npm: | ||
filters: | ||
branches: | ||
only: master | ||
tags: | ||
ignore: /.*/ | ||
- publish: | ||
filters: | ||
only: /^v.*/ | ||
branches: | ||
ignore: /.*/ | ||
tags: | ||
only: /v.*/ |
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,3 @@ | ||
{ | ||
"name": "logo-images" | ||
} |
Oops, something went wrong.