2020-05-22 02:40:51 +02:00
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: default
|
|
|
|
|
|
|
|
steps:
|
2020-05-22 03:29:28 +02:00
|
|
|
- name: restore-cache-with-filesystem
|
|
|
|
image: meltwater/drone-cache
|
|
|
|
settings:
|
|
|
|
backend: "filesystem"
|
|
|
|
restore: true
|
|
|
|
cache_key: "{{ .Repo.Name }}"
|
|
|
|
archive_format: "gzip"
|
|
|
|
filesystem_cache_root: "/tmp/cache"
|
|
|
|
mount:
|
|
|
|
- 'build'
|
|
|
|
- '.gradle'
|
|
|
|
volumes:
|
|
|
|
- name: cache
|
|
|
|
path: /tmp/cache
|
|
|
|
|
2020-05-22 02:40:51 +02:00
|
|
|
- name: build_application
|
|
|
|
image: openjdk:11-jdk
|
|
|
|
commands:
|
|
|
|
- ./gradlew build -x test
|
|
|
|
|
2020-05-22 03:29:28 +02:00
|
|
|
- name: rebuild-cache-with-filesystem
|
|
|
|
image: meltwater/drone-cache:dev
|
|
|
|
pull: true
|
|
|
|
settings:
|
|
|
|
backend: "filesystem"
|
|
|
|
rebuild: true
|
|
|
|
cache_key: "{{ .Repo.Name }}"
|
|
|
|
archive_format: "gzip"
|
|
|
|
filesystem_cache_root: "/tmp/cache"
|
|
|
|
mount:
|
|
|
|
- 'build'
|
|
|
|
- '.gradle'
|
|
|
|
volumes:
|
|
|
|
- name: cache
|
|
|
|
path: /tmp/cache
|
|
|
|
|
2020-05-22 02:40:51 +02:00
|
|
|
- name: kaniko
|
|
|
|
image: banzaicloud/drone-kaniko
|
|
|
|
settings:
|
|
|
|
registry: registry.kmlabz.com
|
|
|
|
repo: tormakris/${DRONE_REPO_NAME}
|
|
|
|
username:
|
|
|
|
from_secret: DOCKER_USERNAME
|
|
|
|
password:
|
|
|
|
from_secret: DOCKER_PASSWORD
|
|
|
|
tags:
|
|
|
|
- latest
|
|
|
|
- ${DRONE_BUILD_NUMBER}
|
2020-05-22 03:29:28 +02:00
|
|
|
|
|
|
|
volumes:
|
|
|
|
- name: cache
|
|
|
|
host:
|
|
|
|
path: "/tmp/cache"
|