cach-radio/inc/themes/castanet/.circleci/config.yml

192 lines
6.4 KiB
YAML

version: 2.1
executors:
castanet-tests:
docker:
- image: cibuilds/hugo:0.91.2
auth:
username: mattstratton
password: $DOCKERHUB_PASSWORD
working_directory: ~/castanet
jobs:
build:
executor: castanet-tests
steps:
- checkout
- run:
name: "Run hugo against default config"
command: cd exampleSite && ls && pwd && HUGO_ENV=production hugo -v -d workspace/public --themesDir ../.. --theme=castanet --buildDrafts=false
test-blue-grid:
executor: castanet-tests
steps:
- checkout
- run:
name: "Test blue-grid"
command: cd exampleSite && ls && pwd && HUGO_ENV=production hugo -v -d workspace/test/blue-grid --config ../test/blue-grid-config.toml --themesDir ../.. --theme=castanet --buildDrafts=false
test-blue-row-jumbo-false:
executor: castanet-tests
steps:
- checkout
- run:
name: "Test blue-row-jumbo-false"
command: cd exampleSite && ls && pwd && HUGO_ENV=production hugo -v -d workspace/test/blue-row-jumbo-false --config ../test/blue-row-jumbo-false-config.toml --themesDir ../.. --theme=castanet --buildDrafts=false
test-blue-row-jumbo-true:
executor: castanet-tests
steps:
- checkout
- run:
name: "Test blue-row-jumbo-true"
command: cd exampleSite && ls && pwd && HUGO_ENV=production hugo -v -d workspace/test/blue-row-jumbo-true --config ../test/blue-row-jumbo-true-config.toml --themesDir ../.. --theme=castanet --buildDrafts=false
test-blue-row-no-jumbo:
executor: castanet-tests
steps:
- checkout
- run:
name: "Test blue-row-no-jumbo"
command: cd exampleSite && ls && pwd && HUGO_ENV=production hugo -v -d workspace/test/blue-row-no-jumbo --config ../test/blue-row-no-jumbo-config.toml --themesDir ../.. --theme=castanet --buildDrafts=false
test-orange-grid:
executor: castanet-tests
steps:
- checkout
- run:
name: "Test orange-grid"
command: cd exampleSite && ls && pwd && HUGO_ENV=production hugo -v -d workspace/test/orange-grid --config ../test/orange-grid-config.toml --themesDir ../.. --theme=castanet --buildDrafts=false
test-orange-row:
executor: castanet-tests
steps:
- checkout
- run:
name: "Test orange-row"
command: cd exampleSite && ls && pwd && HUGO_ENV=production hugo -v -d workspace/test/orange-row --config ../test/orange-row-config.toml --themesDir ../.. --theme=castanet --buildDrafts=false
test-orange-row-jumbo:
executor: castanet-tests
steps:
- checkout
- run:
name: "Test orange-row-jumbo"
command: cd exampleSite && ls && pwd && HUGO_ENV=production hugo -v -d workspace/test/orange-row-jumbo --config ../test/orange-row-jumbo-config.toml --themesDir ../.. --theme=castanet --buildDrafts=false
test-grey-grid:
executor: castanet-tests
steps:
- checkout
- run:
name: "Test grey-grid"
command: cd exampleSite && ls && pwd && HUGO_ENV=production hugo -v -d workspace/test/grey-grid --config ../test/grey-grid-config.toml --themesDir ../.. --theme=castanet --buildDrafts=false
test-grey-row:
executor: castanet-tests
steps:
- checkout
- run:
name: "Test grey-row"
command: cd exampleSite && ls && pwd && HUGO_ENV=production hugo -v -d workspace/test/grey-row --config ../test/grey-row-config.toml --themesDir ../.. --theme=castanet --buildDrafts=false
test-grey-row-jumbo:
executor: castanet-tests
steps:
- checkout
- run:
name: "Test grey-row-jumbo"
command: cd exampleSite && ls && pwd && HUGO_ENV=production hugo -v -d workspace/test/grey-row-jumbo --config ../test/grey-row-jumbo-config.toml --themesDir ../.. --theme=castanet --buildDrafts=false
create-release:
docker:
- image: cibuilds/github:0.13.0
auth:
username: mattstratton
password: $DOCKERHUB_PASSWORD
working_directory: ~/castanet
steps:
- run:
name: Avoid hosts unknown for github
command: mkdir ~/.ssh/ && echo -e "Host github.com\n\tStrictHostKeyChecking no\n" > ~/.ssh/config
- run:
name: "Checkout tag"
command: git clone --branch "${CIRCLE_TAG}" --depth 1 "${CIRCLE_REPOSITORY_URL}"
- run:
name: "Create zip file for release"
command: |
mkdir -p release
ls
pwd
zip -r release/castanet-${CIRCLE_TAG}.zip . -x \*.git\* \*exampleSite\* appveyor.yml \*.circleci\* \*tests\* \*bin\* \*build\* \*release\* config.codekit3 \*node_modules\* gulpfile.js netlify.toml package.json STYLE.md *\node_modules\* \*test\*
- run:
name: "Publish release on GitHub"
command: |
VERSION=${CIRCLE_TAG}
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${VERSION} ./release/
# publish-github-release:
# docker:
# - image: cibuilds/github:0.13.0
# working_directory: castanet
# steps:
# - attach_workspace:
# at: ~/castanet/workspace
# - run:
# name: "List contents"
# command: pwd && ls
# - run:
# name: "Publish release on GitHub"
# command: |
# VERSION=${CIRCLE_TAG}
# ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${VERSION} ~/castanet/workspace/release/
workflows:
version: 2
build-test:
jobs:
- build
- test-blue-grid:
requires:
- build
- test-blue-row-jumbo-false:
requires:
- build
- test-blue-row-jumbo-true:
requires:
- build
- test-blue-row-no-jumbo:
requires:
- build
- test-orange-grid:
requires:
- build
- test-orange-row:
requires:
- build
- test-orange-row-jumbo:
requires:
- build
- test-grey-grid:
requires:
- build
- test-grey-row:
requires:
- build
- test-grey-row-jumbo:
requires:
- build
deploy:
jobs:
- create-release:
filters:
tags:
only: /^\d+\.\d+\.\d+$/
branches:
ignore: /.*/