This commit is contained in:
parent
1dfeb16d03
commit
dfda86f557
2 changed files with 8 additions and 7 deletions
|
@ -3,9 +3,9 @@ type: kubernetes
|
||||||
name: deploy
|
name: deploy
|
||||||
steps:
|
steps:
|
||||||
- name: patch
|
- name: patch
|
||||||
image: git.ar21.de/aaron/kustomize-ci
|
image: debian
|
||||||
commands:
|
entrypoint:
|
||||||
- "sh patch-nextcloud.sh"
|
- /drone/src/patch-nextcloud.sh
|
||||||
- name: docker
|
- name: docker
|
||||||
image: thegeeklab/drone-docker-buildx
|
image: thegeeklab/drone-docker-buildx
|
||||||
privileged: true
|
privileged: true
|
||||||
|
|
9
patch-nextcloud.sh
Normal file → Executable file
9
patch-nextcloud.sh
Normal file → Executable file
|
@ -1,12 +1,13 @@
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
set -e
|
set -e
|
||||||
set -x
|
|
||||||
echo "starting patch script"
|
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"
|
echo "clone nextcloud/docker"
|
||||||
git clone https://git.ar21.de/aaron/nextcloud-docker.git
|
git clone https://git.ar21.de/aaron/nextcloud-docker.git
|
||||||
echo "get latest major version"
|
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)
|
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."
|
echo "Could not determine version."
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
|
@ -18,7 +19,7 @@ sed -i "$(awk '/^ENTRYPOINT /{line=NR} END{print line}' Dockerfile)s+^+# begin o
|
||||||
echo "determine tags"
|
echo "determine tags"
|
||||||
full_version=$(grep -oP '(?<=^ENV NEXTCLOUD_VERSION ).*' Dockerfile)
|
full_version=$(grep -oP '(?<=^ENV NEXTCLOUD_VERSION ).*' Dockerfile)
|
||||||
echo "found $full_version"
|
echo "found $full_version"
|
||||||
cd ~
|
cd /drone/src
|
||||||
echo $full_version > .tags
|
echo $full_version > .tags
|
||||||
echo "move Dockerfile to workdir"
|
echo "move Dockerfile to workdir"
|
||||||
cp nextcloud-docker/$major_version/fpm/Dockerfile .
|
cp -r nextcloud-docker/$major_version/fpm/* .
|
Loading…
Reference in a new issue