Skip to content

Commit

Permalink
feat!: repo transfer and ci setup
Browse files Browse the repository at this point in the history
  • Loading branch information
eshepelyuk committed May 13, 2022
1 parent d4b7312 commit a9a43d3
Show file tree
Hide file tree
Showing 13 changed files with 10,896 additions and 46 deletions.
15 changes: 15 additions & 0 deletions .commitlintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
extends:
- '@commitlint/config-conventional'

rules:
body-max-line-length:
- 1
- always
- 120
type-enum:
- 2
- always
-
- chore
- feat
- fix
31 changes: 31 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build
on:
push:
paths-ignore:
- "examples/*.*"
- "*.md"
branches:
- "master"
pull_request:
branches:
- "master"
jobs:
build_job:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 20
- uses: wagoid/commitlint-github-action@v4
with:
configFile: .commitlintrc.yml
token: ${{ secrets.GITHUB_TOKEN }}
- run: |
docker run -d -p 5000:5000 registry:2
- uses: volesen/[email protected]
with:
version: v1.38.0
- uses: extractions/setup-just@v1
- run: |
just build
24 changes: 24 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Publish release
on:
workflow_dispatch
jobs:
rel_job:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: volesen/[email protected]
with:
version: v1.38.0
- uses: extractions/setup-just@v1
- uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: bahmutov/npm-install@v1
- name: semantic-release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14 changes: 2 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,11 @@ out/
.classpath
.project

# Generated
target/
javadoc/
bin/
log/
classes/

# Misc.
.DS_Store
*.swp
*.swo

# externalized configuration file
cyber.markets.properties
tags.json
node_modules/

# Gradle
.gradle/
build
22 changes: 22 additions & 0 deletions .releaserc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
branches:
- master

tagFormat: "${version}"

preset: "conventionalcommits"

plugins:
- "@semantic-release/commit-analyzer"
- "semantic-release-commitlint"
- "@semantic-release/release-notes-generator"
-
- "@semantic-release/git"
- assets: []
messsage: false
-
- "@semantic-release/github"
- successComment: false
failComment: false
-
- "@semantic-release/exec"
- publishCmd: "just publish ${nextRelease.version}"
20 changes: 9 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
# syntax=docker/dockerfile:1.3-labs
FROM openjdk:11-jre as build

ARG CMAK_VERSION="3.0.0.5"
ARG CMAK_VERSION

RUN curl -L https://github.com/yahoo/CMAK/releases/download/${CMAK_VERSION}/cmak-${CMAK_VERSION}.zip -o /tmp/cmak.zip \
&& unzip /tmp/cmak.zip -d / \
&& ln -s /cmak-$CMAK_VERSION /cmak \
&& rm -rf /tmp/cmak.zip
RUN <<EOF
set -e
curl -L https://github.com/yahoo/CMAK/releases/download/${CMAK_VERSION}/cmak-${CMAK_VERSION}.zip -o /tmp/cmak.zip
unzip /tmp/cmak.zip -d /
ln -s /cmak-$CMAK_VERSION /cmak
rm -rf /tmp/cmak.zip
EOF

FROM openjdk:11-jre-slim
MAINTAINER Hleb Albau <[email protected]>

COPY --from=build /cmak /cmak

VOLUME /cmak/conf

ENV JAVA_OPTS=-XX:MaxRAMPercentage=80

WORKDIR /cmak

ENTRYPOINT ["/cmak/bin/cmak", "-Dpidfile.path=/dev/null", "-Dapplication.home=/cmak", ""]

25 changes: 4 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,6 @@
# kafka-manager-docker (CMAK)
# cmak-docker (CMAK)

[![Docker Stars](https://img.shields.io/docker/stars/hlebalbau/kafka-manager.svg?style=flat-square)](https://registry.hub.docker.com/v2/repositories/hlebalbau/kafka-manager/)
[![Docker pulls](https://img.shields.io/docker/pulls/hlebalbau/kafka-manager.svg?style=flat-square)](https://registry.hub.docker.com/v2/repositories/hlebalbau/kafka-manager/)
[![Docker Automated build](https://img.shields.io/docker/automated/hlebalbau/kafka-manager.svg?maxAge=31536000&style=flat-square)](https://github.com/hlebalbau/kafka-manager/)

You are invited to contribute [new features, fixes, or updates](https://github.com/hleb-albau/kafka-manager-docker/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22), large or small; I am always thrilled to receive pull requests, and do my best to process them as fast as I can.

## Tags

Kafka Manager images come in two flavors:

- **stable:** Build from latest Kafka Manager repository release.
- **latest:** Periodically assembled master builds. Better not to use in production.

## How to use this image
## Usage

[CMAK](https://github.com/yahoo/CMAK) uses Zookeeper only as storage for own settings.
I.e. Zookeeper only plays role of a local database.
Expand All @@ -33,7 +20,7 @@ services:
environment:
ZOO_SERVERS: server.1=0.0.0.0:2888:3888;2181
cmak:
image: hlebalbau/kafka-manager:stable
image: ghcr.io/eshepelyuk/dckr/cmak-3.0.0.5:latest
restart: always
ports:
- "9000:9000"
Expand Down Expand Up @@ -67,7 +54,7 @@ services:
environment:
ZOO_SERVERS: server.1=0.0.0.0:2888:3888;2181
cmak:
image: hlebalbau/kafka-manager:stable
image: ghcr.io/eshepelyuk/dckr/cmak-3.0.0.5:latest
restart: always
command:
- "-Dcmak.zkhosts=zk:2181"
Expand Down Expand Up @@ -101,7 +88,3 @@ That operator uses this docker image as one of its component.

Installation instructions available at [CMAK operator homepage](https://github.com/eshepelyuk/cmak-operator).

## Issues

If you have any problems with or questions about this image, please contact us
through a [GitHub issue](https://github.com/hleb-albau/kafka-manager-docker/issues).
2 changes: 1 addition & 1 deletion examples/docker-compose-override.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
environment:
ZOO_SERVERS: server.1=0.0.0.0:2888:3888;2181
cmak:
image: hlebalbau/kafka-manager:stable
image: ghcr.io/eshepelyuk/dckr/cmak-3.0.0.5:latest
restart: always
command:
- "-Dcmak.zkhosts=zk:2181"
Expand Down
2 changes: 1 addition & 1 deletion examples/docker-compose-sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
environment:
ZOO_SERVERS: server.1=0.0.0.0:2888:3888;2181
cmak:
image: hlebalbau/kafka-manager:stable
image: ghcr.io/eshepelyuk/dckr/cmak-3.0.0.5:latest
restart: always
ports:
- "9000:9000"
Expand Down
20 changes: 20 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
skaffoldTags := "tags.json"

# list available receipes
default:
just --list

build:
skaffold build -d localhost:5000

publish version:
#!/usr/bin/env bash
set -euxo pipefail
skaffold build -t {{version}} --file-output={{skaffoldTags}}

LATEST="$(jq -r .builds[0].imageName {{skaffoldTags}}):latest"
CURRENT="$(jq -r .builds[0].tag {{skaffoldTags}})"

docker tag $CURRENT $LATEST
docker push $LATEST
Loading

0 comments on commit a9a43d3

Please sign in to comment.