Dockerize
Some checks reported errors
continuous-integration/drone/push Build encountered an error

This commit is contained in:
2025-03-29 20:20:36 +03:00
parent 0443ac83d9
commit fb975b1a71
4 changed files with 50 additions and 1 deletions

View File

@@ -7,6 +7,10 @@ parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)
serialize = {major}.{minor}.{patch}
message = [skip ci] Bump version: {current_version} → {new_version}
[bumpversion:file:.drone.yml]
[bumpversion:file:VERSION]
[bumpversion:file:README.md]
[bumpversion:file:src/main.go]

30
.drone.yml Normal file
View File

@@ -0,0 +1,30 @@
---
kind: pipeline
type: docker
name: bumpversion
platform:
os: linux
arch: amd64
steps:
- name: image-build
image: plugins/docker
volumes:
- name: docker-sock
path: /var/run/docker.sock
settings:
dockerfile: Dockerfile
tags: bumpversion-0.1.0
force_tag: true
registry: registry.halfakop.ru
repo: registry.halfakop.ru/docker/golang
username:
from_secret: DOCKER_USERNAME
password:
from_secret: DOCKER_PASSWORD
volumes:
- name: docker-sock
host:
path: /var/run/docker.sock

13
Dockerfile Normal file
View File

@@ -0,0 +1,13 @@
FROM golang:1.24-alpine-3.21 AS builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o app src/main.go
FROM gcr.io/distroless/static
WORKDIR /
COPY --from=builder /app/app .
CMD ["./app"]

View File

@@ -1,4 +1,6 @@
# BumpVersion
# BumpVersion v0.1.0
[![Build Status](https://drone.halfakop.ru/api/badges/rad/bumpversion/status.svg)](https://drone.halfakop.ru/rad/bumpversion)
Утилита для управления версией проекта, аналог утилиты Python.