2023-03-03 08:50:18 +00:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
name: default
|
|
|
|
type: docker
|
|
|
|
|
|
|
|
steps:
|
2023-03-03 13:12:47 +00:00
|
|
|
- name: test
|
|
|
|
image: eclipse-temurin:17-jdk
|
|
|
|
commands:
|
|
|
|
- ./gradlew test
|
|
|
|
- name: push
|
|
|
|
image: docker:dind
|
|
|
|
environment:
|
|
|
|
AUTH_TOKEN: # Gitea access token ENV variable
|
|
|
|
from_secret: auth # Name of DroneCI secret exposed above
|
|
|
|
commands:
|
2023-03-03 13:30:27 +00:00
|
|
|
- "sleep 5"
|
|
|
|
- "docker ps -a"
|
|
|
|
- "docker build -t git.data.coop/${DRONE_REPO_NAME}:${DRONE_TAG} ."
|
|
|
|
- "docker push git.data.coop/${DRONE_REPO_OWNER}/${DRONE_REPO_NAME}:${DRONE_TAG}"
|
|
|
|
- "docker tag git.data.coop/${DRONE_REPO_NAME}:${DRONE_TAG} git.data.coop/${DRONE_REPO_NAME}:latest"
|
|
|
|
- "docker push git.data.coop/${DRONE_REPO_OWNER}/${DRONE_REPO_NAME}:latest"
|
2023-03-03 13:12:47 +00:00
|
|
|
when:
|
|
|
|
event:
|
|
|
|
- tag
|
2023-03-03 08:50:18 +00:00
|
|
|
|
|
|
|
services:
|
2023-03-03 13:12:47 +00:00
|
|
|
- name: docker
|
|
|
|
image: docker:dind
|
|
|
|
privileged: true
|
|
|
|
volumes:
|
|
|
|
- name: dockersock
|
|
|
|
path: /var/run
|
2023-03-03 08:50:18 +00:00
|
|
|
|
|
|
|
volumes:
|
2023-03-03 13:12:47 +00:00
|
|
|
- name: dockersock
|
|
|
|
temp: {}
|