Skip to content

Commit

Permalink
[#261] moves scripts to .circleci folder
Browse files Browse the repository at this point in the history
  • Loading branch information
GentlemanHal committed Dec 21, 2018
1 parent 669738d commit efdf401
Show file tree
Hide file tree
Showing 16 changed files with 26 additions and 32 deletions.
File renamed without changes.
36 changes: 18 additions & 18 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ jobs:

- run:
name: update version
command: ./ci/update-version.sh
command: ./.circleci/update-version.sh

- run:
name: install node
command: ./ci/install-node.sh
command: ./.circleci/install-node.sh

- run:
name: build
environment:
BASH_ENV: "~/.nvm/nvm.sh"
command: |
./ci/dependencies.sh
./ci/compile.sh
./.circleci/dependencies.sh
./.circleci/compile.sh
- save_cache:
key: v1-nevergreen-server-{{ checksum "project.clj" }}
Expand All @@ -49,7 +49,7 @@ jobs:
name: test
environment:
BASH_ENV: "~/.nvm/nvm.sh"
command: ./ci/test.sh
command: ./.circleci/test.sh

- store_test_results:
path: ./target/test-reports
Expand All @@ -65,11 +65,11 @@ jobs:
root: .
paths:
- ./resources/*.txt
- ./ci/*
- ./.circleci/*
- ./target/nevergreen-standalone.jar
- ./Dockerfile

functional-tests-cypress:
journey-tests:
working_directory: ~/nevergreen

docker:
Expand All @@ -94,7 +94,7 @@ jobs:
CYPRESS_TRAY_PASSWORD: ""
command: |
npm install
npm run cypress
npm run test:journey
- save_cache:
key: v4-nevergreen-cypress-{{ checksum "package.json" }}
Expand Down Expand Up @@ -131,17 +131,17 @@ jobs:
- run:
name: export version
command: ./ci/export-version.sh
command: ./.circleci/export-version.sh

- run:
name: deploy staging
command: ./ci/deploy.sh
command: ./.circleci/deploy.sh

- run:
name: smoke test
environment:
HOST: "https://staging.nevergreen.io"
command: ./ci/smoke-test.sh
command: ./.circleci/smoke-test.sh

- run:
name: create docker image
Expand Down Expand Up @@ -178,17 +178,17 @@ jobs:

- run:
name: export version
command: ./ci/export-version.sh
command: ./.circleci/export-version.sh

- run:
name: deploy production
command: ./ci/release.sh
command: ./.circleci/release.sh

- run:
name: smoke test
environment:
HOST: "https://nevergreen.io"
command: ./ci/smoke-test.sh
command: ./.circleci/smoke-test.sh

- run:
name: create docker image
Expand All @@ -200,11 +200,11 @@ jobs:
- run:
name: create release on GitHub
command: ./ci/release-github.sh
command: ./.circleci/release-github.sh

- run:
name: tweet release
command: ./ci/release-tweet.sh
command: ./.circleci/release-tweet.sh

workflows:
version: 2
Expand All @@ -214,13 +214,13 @@ workflows:
- deploy-staging:
requires:
- build
- functional-tests-cypress:
- journey-tests:
requires:
- deploy-staging
- hold:
type: approval
requires:
- functional-tests-cypress
- journey-tests
- deploy-prod:
requires:
- hold
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 0 additions & 3 deletions ci/functional-test.sh

This file was deleted.

2 changes: 1 addition & 1 deletion develop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ echo "clean"
npm run clean

echo "fetching node modules and performing first build"
. ./ci/dependencies.sh
. ./.circleci/dependencies.sh

echo "watching the js for changes ..."
npm run watch:js &
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"build:schema-validator": "ajv compile -s src/client/reducers/schema.json -o src/client/reducers/ValidateConfiguration.js --remove-additional --all-errors",
"test": "NODE_ENV=dev mocha --require @babel/polyfill --require ./test/client/Setup.js --require @babel/register -R mocha-circleci-reporter --reporter-options mochaFile=./target/client/test-results.xml --recursive test/client",
"test:coverage": "nyc --reporter=html npm test",
"test:journey": "npm run cypress",
"lint": "npm run lint:js && npm run lint:css",
"lint:js": "eslint ./src/client ./test/client",
"lint:css": "stylelint \"src/client/**/*.scss\" --syntax scss",
Expand Down
16 changes: 6 additions & 10 deletions pre-push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,24 @@ pkill -SIGINT -f ./develop.sh
set -e

echo '[Step 2 of 6] Running the ci dependencies script...'
. ./ci/dependencies.sh
. ./.circleci/dependencies.sh

echo '[Step 3 of 6] Running the ci compile script...'
. ./ci/compile.sh
. ./.circleci/compile.sh

echo '[Step 4 of 6] Running the ci test script...'
. ./ci/test.sh
. ./.circleci/test.sh

echo '[Step 5 of 6] Starting the server...'
./lein.sh run &
npm run start:ci-stub-server &

export HOST="http://localhost:5000"
export FULL_VERSION="$(cat "./resources/version.txt")+$(cat "./resources/version_meta.txt")"
./ci/smoke-test.sh # Don't source as the script calls exit
./.circleci/smoke-test.sh # Don't source as the script calls exit

echo '[Step 6 of 6] Running the functional tests...'
. ./ci/functional-test.sh

# uncomment to also run the functional tests in Firefox
# export BROWSER=firefox
# ./lein.sh test functional.functional-test
echo '[Step 6 of 6] Running the journey tests...'
npm run test:journey

echo
echo 'Everything completed successfully, push away!'
Expand Down

0 comments on commit efdf401

Please sign in to comment.