Permalink
Browse files

Added circleci build config.

  • Loading branch information...
dshienok-sc committed Feb 16, 2018
1 parent 9c11308 commit 240805523db2e724d42fdad057de86397c40ca3d
Showing with 92 additions and 0 deletions.
  1. +92 −0 .circleci/config.yml
View
@@ -0,0 +1,92 @@
defaults: &defaults
docker:
- image: opuscapita/minsk-core-ci:grails-2.4.4-jdk-8u131-nodejs-8.9.4-maven-3.3.9
working_directory: ~/build
version: 2
jobs:
build:
<<: *defaults
steps:
- run:
name: Environment inject.
command: env_inject.sh
- checkout
- restore_cache:
keys:
- grails-core-plugin-{{ .Branch }}-{{ checksum "grails-app/conf/BuildConfig.groovy" }}
- grails-core-plugin-{{ .Branch }}
- grails-core-plugin
- run:
name: "Refresh grails dependencies."
command: grails refresh-dependencies --non-interactive
- run:
name: "Grails tests."
command: "grails test-app --stacktrace --offline"
- run:
name: "Save grails test results."
command: |
mkdir -p ~/test-xml-reports/
find . -type f -regex ".*/target/test-reports/.*xml" -exec cp -v {} ~/test-xml-reports/ \;
when: always
- store_test_results:
path: ~/test-xml-reports
- store_artifacts:
path: ~/test-xml-reports
- run:
name: "Deploy."
command: grails maven-deploy -Dgrails.env=prod -verbose
# - run:
# name: "Build docs."
# command: |
# rm -rf plugin.xml
# grails doc --offline
# - run:
# name: "Deploy docs."
# command: grails DocDeploy --offline --upload-zip-to-google-drive
- save_cache:
key: grails-core-plugin-{{ .Branch }}-{{ checksum "grails-app/conf/BuildConfig.groovy" }}
paths:
- /root/.grails/.m2
- /root/.m2
release:
<<: *defaults
steps:
- run:
name: Environment inject
command: env_inject.sh
- checkout
- run:
name: Executing release scrtipt.
command: .circleci/release.sh
workflows:
version: 2
release-and-build:
jobs:
- release:
filters:
branches:
only: release
- build:
filters:
tags:
only: /.*/
branches:
ignore: release

0 comments on commit 2408055

Please sign in to comment.