You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ng-tracker/.gitlab-ci.yml

40 lines
743 B
YAML

image: ubuntu:18.04
cache:
key: "$CI_PROJECT_ID"
paths:
- .gradle/
variables:
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
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
build:
stage: build
script: ./gradlew assemble
cache:
key: "$CI_PROJECT_ID"
policy: push
paths:
- build
- .gradle
deploy:
stage: deploy
script:
- sh deploy/gdccloud/deploy.sh
only:
- master
cache:
key: "$CI_PROJECT_ID"
policy: pull
paths:
- build
- .gradle