Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add redis-sentinel-6.2 #3670

Merged
merged 1 commit into from
Jul 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions redis-sentinel-6.2-compat.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
#nolint:valid-pipeline-git-checkout-commit,valid-pipeline-git-checkout-tag
package:
name: redis-sentinel-6.2-compat
version: 6.2.13
epoch: 0
description: "Redis Sentinel provides high availability for Redis."
copyright:
- license: Apache-2.0
dependencies:
runtime:
- redis-cli-6.2
- redis-sentinel-6.2
- bash
- busybox
- coreutils
- posix-libc-utils

environment:
contents:
packages:
- build-base
- busybox
- ca-certificates-bundle
- bash
- curl
- openssl
- procps

pipeline:
- uses: git-checkout
with:
branch: main
repository: https://github.com/bitnami/containers

# am_i_root && ensure_user_exists functions are not needed for our case.
- uses: patch
with:
patches: remove-user-check.patch

- runs: |
mkdir -p "${{targets.destdir}}"/opt/bitnami
mkdir -p "${{targets.destdir}}"/opt/bitnami/licenses
mkdir -p "${{targets.destdir}}"/opt/bitnami/scripts
mkdir -p "${{targets.destdir}}"/opt/bitnami/etc
mkdir -p "${{targets.destdir}}"/opt/bitnami/redis-sentinel/bin
mkdir -p "${{targets.destdir}}"/opt/bitnami/redis-sentinel/logs
mkdir -p "${{targets.destdir}}"/opt/bitnami/redis-sentinel/tmp
mkdir -p "${{targets.destdir}}"/bitnami/redis-sentinel/conf

cd bitnami/redis-sentinel/6.2/debian-11

cp -R ./prebuildfs/opt/bitnami/* ${{targets.destdir}}/opt/bitnami/
cp -R ./rootfs/opt/bitnami/scripts ${{targets.destdir}}/opt/bitnami/
chmod g+rwX "${{targets.destdir}}"/opt/bitnami

- runs: |
mkdir -p "${{targets.destdir}}"/opt/bitnami/redis-sentinel/etc
cp /home/build/sentinel.conf "${{targets.destdir}}"/opt/bitnami/redis-sentinel/etc/sentinel.conf

- runs: |
ln -sf /usr/bin/redis-cli "${{targets.destdir}}"/opt/bitnami/redis-sentinel/bin/redis-cli

- uses: strip

update:
enabled: false
manual: true # This requires manual updates because of the upstream repo does not release tags and branches.
github:
identifier: bitnami/containers
14 changes: 14 additions & 0 deletions redis-sentinel-6.2-compat/remove-user-check.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/bitnami/redis-sentinel/6.2/debian-11/rootfs/opt/bitnami/scripts/redis-sentinel/setup.sh b/bitnami/redis-sentinel/6.2/debian-11/rootfs/opt/bitnami/scripts/redis-sentinel/setup.sh
index d870e24..711bc13 100755
--- a/bitnami/redis-sentinel/6.2/debian-11/rootfs/opt/bitnami/scripts/redis-sentinel/setup.sh
+++ b/bitnami/redis-sentinel/6.2/debian-11/rootfs/opt/bitnami/scripts/redis-sentinel/setup.sh
@@ -16,9 +16,6 @@ set -o pipefail
. /opt/bitnami/scripts/libredissentinel.sh
. /opt/bitnami/scripts/libos.sh

-# Create daemon user if needed
-am_i_root && ensure_user_exists "$REDIS_SENTINEL_DAEMON_USER" --group "$REDIS_SENTINEL_DAEMON_GROUP"
-
# Ensure redis environment variables are valid
redis_validate

Loading