ng-tracker/.gitlab-ci.yml

40 lines
740 B
YAML
Raw Normal View History

2018-09-06 22:50:34 +04:00
image: ubuntu:18.04
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:
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
- apt-get install openjdk-8-jdk git -y
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
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
2018-09-06 22:50:34 +04:00
deploy:
stage: deploy
script:
- sh deploy/gdccloud/deploy.sh
only:
2019-03-01 11:27:57 +04:00
- dev
2018-09-06 22:50:34 +04:00
cache:
key: "$CI_PROJECT_ID"
policy: pull
paths:
- build
- .gradle