Migrating from Gitlab and Gitlab CI to Forgejo and Drone #1

Merged
skobkin merged 2 commits from forgejo_drone into master 2024-11-21 20:48:51 +00:00
4 changed files with 41 additions and 58 deletions
Showing only changes of commit 505f9b69cd - Show all commits

35
.drone.yml Normal file
View file

@ -0,0 +1,35 @@
kind: pipeline
type: docker
name: build-pr
steps:
- name: build
image: plugins/docker
settings:
dry_run: true
purge: true
when:
event:
- pull_request
---
kind: pipeline
type: docker
name: build-and-publish
steps:
- name: publish
image: plugins/docker
settings:
username:
from_secret: DOCKER_LOGIN
password:
from_secret: DOCKER_TOKEN
repo:
from_secret: DOCKER_REPO
tags:
- ${DRONE_TAG}
- latest
when:
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).