Compare commits

...

3 commits

Author SHA1 Message Date
Alexey Skobkin b467c41452
Using triggers for pipelines. 2024-11-21 23:59:56 +03:00
Alexey Skobkin 3cffeff5df
Adding 'push' to events for image build. 2024-11-21 23:43:41 +03:00
Alexey Skobkin 505f9b69cd
Gitlab to Drone migration draft. 2024-11-21 23:36:02 +03:00
4 changed files with 43 additions and 58 deletions

37
.drone.yml Normal file
View file

@ -0,0 +1,37 @@
kind: pipeline
type: docker
name: build
steps:
- name: 'docker_build'
image: plugins/docker
settings:
dry_run: true
purge: true
trigger:
event:
- pull_request
- push
---
kind: pipeline
type: docker
name: publish
steps:
- name: 'docker_publish'
image: plugins/docker
settings:
username:
from_secret: DOCKER_LOGIN
password:
from_secret: DOCKER_TOKEN
repo:
from_secret: DOCKER_REPO
tags:
- ${DRONE_TAG}
- latest
trigger:
event:
- tag

View file

@ -1,54 +0,0 @@
stages:
- build
- push
variables:
BUILT_IMAGE_TAG: built_image
IMAGE_TAG: ${CI_REGISTRY_IMAGE}
DOCKER_HUB_IMAGE_TAG: skobkin/murmur
DOCKER_HUB_LOGIN: skobkin
DOCKER_HUB_TOKEN: "xxx"
build:
# https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.14.0#faccessat2
image: docker:23.0.2
services:
- docker:23.0.2-dind
stage: build
script:
- docker build -t $BUILT_IMAGE_TAG --no-cache .
- docker save -o $CI_PROJECT_DIR/images.tar $BUILT_IMAGE_TAG
artifacts:
paths:
- images.tar
push-gitlab-registry:
image: docker:23.0.2
services:
- docker:23.0.2-dind
stage: push
only:
- tags
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker load -i images.tar
- docker tag $BUILT_IMAGE_TAG $IMAGE_TAG
- docker tag $BUILT_IMAGE_TAG $IMAGE_TAG:$CI_COMMIT_TAG
- docker push $IMAGE_TAG
- docker push $IMAGE_TAG:$CI_COMMIT_TAG
push-docker-hub-registry:
image: docker:23.0.2
services:
- docker:23.0.2-dind
stage: push
only:
- tags
script:
- docker login -u $DOCKER_HUB_LOGIN -p $DOCKER_HUB_TOKEN
- docker load -i images.tar
- docker tag $BUILT_IMAGE_TAG $DOCKER_HUB_IMAGE_TAG
- docker tag $BUILT_IMAGE_TAG $DOCKER_HUB_IMAGE_TAG:$CI_COMMIT_TAG
- docker push $DOCKER_HUB_IMAGE_TAG
- docker push $DOCKER_HUB_IMAGE_TAG:$CI_COMMIT_TAG

View file

@ -3,11 +3,11 @@ FROM alpine:3.18 as builder
ARG VERSION=1.5.613
LABEL \
org.label-schema.vendor="Alexey Skobkin - skobkin-ru@ya.ru" \
org.label-schema.url="https://gitlab.com/skobkin/docker-murmur" \
org.label-schema.vendor="Alexey Skobkin - skobkin@proton.me" \
org.label-schema.url="https://git.skobk.in/skobkin/docker-murmur" \
org.label-schema.name="Murmur Server" \
org.label-schema.version=$VERSION \
org.label-schema.vcs-url="https://gitlab.com/skobkin/docker-murmur.git" \
org.label-schema.vcs-url="https://git.skobk.in/skobkin/docker-murmur.git" \
org.label-schema.license="MIT" \
org.label-schema.schema-version="1.0"

View file

@ -1,5 +1,7 @@
# Murmur server docker image
[![Build Status](https://ci.skobk.in/api/badges/skobkin/docker-murmur/status.svg)](https://ci.skobk.in/skobkin/docker-murmur)
## Build
```shell
@ -15,4 +17,4 @@ docker push skobkin/murmur:latest skobkin/murmur:1.4.230
## Usage
See [skobkin/docker-stacks](https://bitbucket.org/skobkin/docker-stacks/src/master/murmur/).
See [docker-stacks](https://git.skobk.in/skobkin/docker-stacks).