2022-12-15 21:38:11 +03:00
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: gitlab-notify
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: package
|
|
|
|
image: maven:3.8.6-eclipse-temurin-17
|
2022-12-15 21:44:44 +03:00
|
|
|
volumes:
|
|
|
|
- name: m2
|
2022-12-17 18:49:38 +03:00
|
|
|
path: /root/.m2/repository
|
|
|
|
commands:
|
|
|
|
- mvn -U clean package
|
|
|
|
|
|
|
|
- name: docker-publish
|
|
|
|
image: upagge/docker-buildx:latest
|
|
|
|
environment:
|
|
|
|
DOCKER_REGISTRY_TOKEN:
|
|
|
|
from_secret: DOCKER_REGISTRY_TOKEN
|
|
|
|
DOCKER_IMAGE_NAME:
|
|
|
|
from_secret: DOCKER_IMAGE_NAME
|
|
|
|
DOCKER_REGISTRY_USER:
|
|
|
|
from_secret: DOCKER_REGISTRY_USER
|
|
|
|
commands:
|
2022-12-18 01:05:30 +03:00
|
|
|
- sleep 15
|
2022-12-17 18:49:38 +03:00
|
|
|
- echo "$DOCKER_REGISTRY_TOKEN" | docker login docker.io --username $DOCKER_REGISTRY_USER --password-stdin
|
|
|
|
- docker buildx create --use
|
|
|
|
- docker buildx build --push --platform linux/amd64,linux/arm64/v8 -t "$DOCKER_IMAGE_NAME:develop" .
|
2022-12-15 21:44:44 +03:00
|
|
|
|
|
|
|
trigger:
|
|
|
|
branch:
|
2022-12-17 18:49:38 +03:00
|
|
|
- develop
|
2022-12-15 21:44:44 +03:00
|
|
|
|
2022-12-18 01:05:30 +03:00
|
|
|
services:
|
|
|
|
- name: docker
|
|
|
|
image: docker:dind
|
|
|
|
privileged: true
|
|
|
|
volumes:
|
|
|
|
- name: dockersock
|
|
|
|
path: /var/run
|
|
|
|
|
2022-12-15 21:44:44 +03:00
|
|
|
volumes:
|
|
|
|
- name: m2
|
|
|
|
host:
|
2022-12-18 01:05:30 +03:00
|
|
|
path: /drone/volume/m2
|
|
|
|
- name: dockersock
|
|
|
|
temp: { }
|