try to to fix entrypoint
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Aaron Riedel 2024-07-22 15:27:45 +02:00
parent 1dfeb16d03
commit dfda86f557
Signed by: aaron
GPG key ID: 643004654D40D577
2 changed files with 8 additions and 7 deletions

View file

@ -3,9 +3,9 @@ type: kubernetes
name: deploy
steps:
- name: patch
image: git.ar21.de/aaron/kustomize-ci
commands:
- "sh patch-nextcloud.sh"
image: debian
entrypoint:
- /drone/src/patch-nextcloud.sh
- name: docker
image: thegeeklab/drone-docker-buildx
privileged: true

9
patch-nextcloud.sh Normal file → Executable file
View file

@ -1,12 +1,13 @@
#!/usr/bin/env sh
set -e
set -x
echo "starting patch script"
echo "install git"
apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists
echo "clone nextcloud/docker"
git clone https://git.ar21.de/aaron/nextcloud-docker.git
echo "get latest major version"
major_version=$(find nextcloud-docker -maxdepth 1 -type d -printf "%f\n" | grep -E '^[0-9]+$' | sort -n | tail -1)
if [ -z "nextcloud-docker/$major_version" ]; then
if [ -z "$major_version" ]; then
echo "Could not determine version."
exit 1
else
@ -18,7 +19,7 @@ sed -i "$(awk '/^ENTRYPOINT /{line=NR} END{print line}' Dockerfile)s+^+# begin o
echo "determine tags"
full_version=$(grep -oP '(?<=^ENV NEXTCLOUD_VERSION ).*' Dockerfile)
echo "found $full_version"
cd ~
cd /drone/src
echo $full_version > .tags
echo "move Dockerfile to workdir"
cp nextcloud-docker/$major_version/fpm/Dockerfile .
cp -r nextcloud-docker/$major_version/fpm/* .