Skip to content

Commit

Permalink
Merge pull request #21 from wiremind/fixports
Browse files Browse the repository at this point in the history
  • Loading branch information
maxime1907 authored Oct 19, 2023
2 parents c1745cc + fbe4110 commit 4ab86b1
Show file tree
Hide file tree
Showing 10 changed files with 184 additions and 86 deletions.
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.dockerignore
Containerfile*
docker-compose.yml
.gitignore
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2
updates:
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "weekly"
labels:
- "dependencies"
- "bot"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
labels:
- "dependencies"
- "bot"
64 changes: 0 additions & 64 deletions .github/workflows/build-containers.yml

This file was deleted.

72 changes: 72 additions & 0 deletions .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Build and push

on:
push:
branches:
- master
tags:
- '*'
pull_request:
branches:
- master

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
container:
name: Containerfile
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-22.04
context:
- target: druid-micro
suffix: -micro
- target: druid-nano
suffix: -nano
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Login to Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata
uses: docker/metadata-action@v5
id: metadata
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
flavor: |
latest=auto
prefix=
suffix=${{ matrix.context.suffix }}
- name: Build Docker image
uses: docker/build-push-action@v5
with:
context: .
file: Containerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
target: ${{ matrix.context.target }}

release:
runs-on: ubuntu-22.04
needs:
- container
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
22 changes: 22 additions & 0 deletions .github/workflows/compliance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Compliance

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
commit:
name: Commit
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Conventional commit check
uses: cocogitto/[email protected]
16 changes: 16 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Lint

on:
pull_request:
branches:
- master

jobs:
container:
name: Containerfile
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: hadolint/[email protected]
with:
dockerfile: Containerfile
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*
28 changes: 28 additions & 0 deletions Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM openjdk:8-jre AS builder

ARG DRUID_VERSION=26.0.0
ENV DRUID_VERSION=$DRUID_VERSION

RUN apt-get update \
&& apt-get install -y --no-install-recommends bash=5.1-2+deb11u1 perl=5.32.1-4+deb11u2 \
&& rm -rf /var/lib/apt/lists/*

RUN wget --progress=dot:giga http://apache.crihan.fr/dist/druid/${DRUID_VERSION}/apache-druid-${DRUID_VERSION}-bin.tar.gz \
&& tar -xzf apache-druid-${DRUID_VERSION}-bin.tar.gz \
&& rm apache-druid-${DRUID_VERSION}-bin.tar.gz

COPY conf/ /apache-druid-${DRUID_VERSION}/conf

RUN mv /apache-druid-${DRUID_VERSION} /app

WORKDIR /app

FROM builder as druid-micro

ENTRYPOINT ["/app/bin/start-micro-quickstart"]

FROM builder as druid-nano

ENTRYPOINT ["/app/bin/start-nano-quickstart"]

EXPOSE 8081 8082 8083 8888 8091
22 changes: 0 additions & 22 deletions Dockerfile

This file was deleted.

2 changes: 2 additions & 0 deletions cog.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ignore_merge_commits = true
from_latest_tag = true

0 comments on commit 4ab86b1

Please sign in to comment.