2019-04-05 16:25:10 +04:00
|
|
|
image: romanov73/is:ng-tracker-container
|
2018-05-04 17:54:46 +04:00
|
|
|
|
|
|
|
cache:
|
|
|
|
key: "$CI_PROJECT_ID"
|
|
|
|
paths:
|
|
|
|
- .gradle/
|
|
|
|
|
|
|
|
variables:
|
|
|
|
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
|
|
|
|
|
2018-09-06 22:50:34 +04:00
|
|
|
before_script:
|
2019-04-05 16:37:03 +04:00
|
|
|
# - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
|
|
|
|
# - apt-get install openjdk-8-jdk git -y
|
2018-09-06 22:50:34 +04:00
|
|
|
- eval $(ssh-agent -s)
|
|
|
|
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
|
|
|
|
- mkdir -p ~/.ssh
|
|
|
|
- chmod 700 ~/.ssh
|
2019-03-28 16:53:31 +04:00
|
|
|
- git log --pretty="%cn;%cd;%s" > src/main/resources/commits.log
|
2018-09-06 22:50:34 +04:00
|
|
|
|
2018-05-04 17:54:46 +04:00
|
|
|
build:
|
|
|
|
stage: build
|
2018-09-06 22:50:34 +04:00
|
|
|
script: ./gradlew assemble
|
2018-05-04 17:54:46 +04:00
|
|
|
cache:
|
|
|
|
key: "$CI_PROJECT_ID"
|
|
|
|
policy: push
|
2018-04-28 22:50:26 +04:00
|
|
|
paths:
|
2018-05-04 17:54:46 +04:00
|
|
|
- build
|
|
|
|
- .gradle
|
|
|
|
|
2019-04-05 17:35:17 +04:00
|
|
|
checkRun:
|
|
|
|
stage: test
|
|
|
|
script: ./gradlew bootRun -Dng-tracker.check-run=true
|
|
|
|
cache:
|
|
|
|
key: "$CI_PROJECT_ID"
|
|
|
|
policy: push
|
|
|
|
paths:
|
|
|
|
- build
|
|
|
|
- .gradle
|
|
|
|
|
|
|
|
checkStyle:
|
|
|
|
stage: test
|
|
|
|
script: ./gradlew check
|
|
|
|
cache:
|
|
|
|
key: "$CI_PROJECT_ID"
|
|
|
|
policy: push
|
|
|
|
paths:
|
|
|
|
- build
|
|
|
|
- .gradle
|
|
|
|
|
2018-09-06 22:50:34 +04:00
|
|
|
deploy:
|
|
|
|
stage: deploy
|
|
|
|
script:
|
|
|
|
- sh deploy/gdccloud/deploy.sh
|
|
|
|
only:
|
2019-03-18 22:35:01 +04:00
|
|
|
- dev
|
2018-09-06 22:50:34 +04:00
|
|
|
cache:
|
|
|
|
key: "$CI_PROJECT_ID"
|
|
|
|
policy: pull
|
|
|
|
paths:
|
|
|
|
- build
|
2019-03-18 22:25:28 +04:00
|
|
|
- .gradle
|
|
|
|
environment:
|
|
|
|
name: staging
|
|
|
|
url: http://193.110.3.124:8080
|