Skip to content

Commit

Permalink
OPS-6706-cron-tools (#97)
Browse files Browse the repository at this point in the history
Add cron-tools
  • Loading branch information
YannickEvers authored Aug 16, 2024
1 parent 592ef13 commit d637d08
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/bapontag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
- 'infra-tools-[0-9]+.[0-9]+.[0-9]+'
- 'dbcmetrics-[0-9]+.[0-9]+.[0-9]+'
- 'awx-ee-[0-9]+.[0-9]+.[0-9]+'
- 'cron-tools-[0-9]+.[0-9]+.[0-9]+'

jobs:
pre_build:
Expand All @@ -31,6 +32,8 @@ jobs:
echo "registries=dockerhub" >> $GITHUB_OUTPUT
elif [[ "${{ steps.nameTag.outputs.tag }}" == 'awx-ee' ]]; then
echo "registries=dockerhub" >> $GITHUB_OUTPUT
elif [[ "${{ steps.nameTag.outputs.tag }}" == 'cron-tools' ]]; then
echo "registries=dockerhub,quay.io" >> $GITHUB_OUTPUT
fi
build_and_push:
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/crontoolstoghcr-on-push.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: cron-tools Docker Image on Push to GHCR

on:
push:
branches-ignore:
- master
paths:
- 'cron-tools/**'

jobs:
build_image_on_push:
permissions:
packages: write
security-events: write
actions: read
contents: read
uses: ./.github/workflows/imagetoghcr-on-push.yaml
with:
image_name: "cron-tools"
context: "./cron-tools/"
1 change: 1 addition & 0 deletions .github/workflows/dummytoghcr-on-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- 'awx-ee/**'
- 'dbcmetrics/**'
- 'infra-tools/**'
- 'cron-tools/**'

jobs:
build_image_on_push:
Expand Down
21 changes: 21 additions & 0 deletions cron-tools/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM ubuntu:22.04

ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Berlin

RUN set -x \
&& apt-get -y update \
&& apt-get -y install wget \
&& wget https://dl.k8s.io/release/v1.28.7/bin/linux/amd64/kubectl \
&& chmod +x kubectl \
&& mv ./kubectl /usr/local/bin/kubectl \
&& wget -qO /usr/share/keyrings/mongodb.asc https://www.mongodb.org/static/pgp/server-6.0.asc \
&& echo "deb [signed-by=/usr/share/keyrings/mongodb.asc] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 multiverse" > /etc/apt/sources.list.d/mongodb-org-6.0.list \
&& wget -qO /usr/share/keyrings/postgres.asc https://www.postgresql.org/media/keys/ACCC4CF8.asc \
&& echo "deb [signed-by=/usr/share/keyrings/postgres.asc] https://apt.postgresql.org/pub/repos/apt jammy-pgdg main" > /etc/apt/sources.list.d/pgdg.list \
&& apt-get -y update \
&& apt-get -y install \
mongodb-mongosh \
postgresql-client-15 \
jq \
&& apt-get clean -y
9 changes: 9 additions & 0 deletions cron-tools/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# cron-tools
Minimal image with the tools that are necessary for our Kubernetes CronJobs.

## Provided Tools
* [jq](https://jqlang.github.io/jq/)
* [kubectl](https://kubernetes.io/docs/reference/kubectl/)
* [mongosh](https://www.mongodb.com/docs/mongodb-shell/)
* [psql](https://www.postgresql.org/docs/current/app-psql.html)
* [wget](https://www.gnu.org/software/wget/)

0 comments on commit d637d08

Please sign in to comment.