Compare commits
11 Commits
6d8109d9a0
...
398b2be01a
Author | SHA1 | Date |
---|---|---|
Ricard Illa | 398b2be01a | |
Ricard Illa | c1554f21b5 | |
Ricard Illa | fc4acc71c1 | |
Ricard Illa | 0d4aab0aaa | |
Ricard Illa | 46e5c50b4b | |
Ricard Illa | 4b044f988d | |
Ricard Illa | 6f4329f002 | |
Ricard Illa | 20ba0467d1 | |
Ricard Illa | 84fd65767b | |
Ricard Illa | c1ebc2578f | |
Ricard Illa | 6bbe478ef1 |
|
@ -1,3 +1,4 @@
|
|||
gitolite/.env
|
||||
ansible/.env
|
||||
ansible/known_hosts
|
||||
*/out/image-id
|
||||
|
|
11
Makefile
11
Makefile
|
@ -1,7 +1,7 @@
|
|||
REGISTRY=registry.monotremata.xyz
|
||||
PLATFORMS=linux/amd64,linux/arm64
|
||||
|
||||
IMAGES=agate buildx-qemu mpd pleroma rainloop tor transmission webdav
|
||||
IMAGES=agate buildx-qemu mpd pleroma rainloop rsync xmpp-ci static-page-builder tor transmission webdav
|
||||
|
||||
.PHONY: all $(IMAGES)
|
||||
|
||||
|
@ -24,6 +24,15 @@ pleroma:
|
|||
rainloop:
|
||||
$(BUILDX)
|
||||
|
||||
rsync:
|
||||
$(BUILDX)
|
||||
|
||||
xmpp-ci:
|
||||
$(BUILDX)
|
||||
|
||||
static-page-builder:
|
||||
$(BUILDX)
|
||||
|
||||
tor:
|
||||
$(BUILDX)
|
||||
|
||||
|
|
|
@ -3,12 +3,14 @@ REGISTRY=registry.monotremata.xyz
|
|||
IMG=$(REGISTRY)/$(IMG_NAME)
|
||||
PLATFORMS=linux/amd64
|
||||
|
||||
.PHONY: build push buildx
|
||||
.PHONY: push buildx clean
|
||||
|
||||
build: Dockerfile
|
||||
out/image-id: Dockerfile
|
||||
mkdir -p $(@D)
|
||||
docker build -t $(IMG) .
|
||||
echo $(IMG) > $@
|
||||
|
||||
push: build
|
||||
push: out/image-id
|
||||
docker image push $(IMG)
|
||||
|
||||
buildx: Dockerfile
|
||||
|
@ -17,3 +19,6 @@ buildx: Dockerfile
|
|||
--tag $(IMG) \
|
||||
--push \
|
||||
.
|
||||
|
||||
clean:
|
||||
rm -rf out
|
||||
|
|
|
@ -3,7 +3,7 @@ REGISTRY=registry.monotremata.xyz
|
|||
IMG=$(REGISTRY)/$(IMG_NAME)
|
||||
PLATFORMS=linux/amd64,linux/arm64
|
||||
|
||||
.PHONY: build push buildx
|
||||
.PHONY: push buildx clean
|
||||
|
||||
ARCH=$(shell uname -m)
|
||||
|
||||
|
@ -15,10 +15,12 @@ else
|
|||
TARGETARCH=amd64
|
||||
endif
|
||||
|
||||
build: Dockerfile entrypoint.sh
|
||||
out/image-id: Dockerfile entrypoint.sh
|
||||
mkdir -p $(@D)
|
||||
docker build -t $(IMG) --build-arg TARGETARCH=$(TARGETARCH) .
|
||||
echo $(IMG) > $@
|
||||
|
||||
push: build
|
||||
push: out/image-id
|
||||
docker image push $(IMG)
|
||||
|
||||
buildx: Dockerfile entrypoint.sh
|
||||
|
@ -27,3 +29,6 @@ buildx: Dockerfile entrypoint.sh
|
|||
--tag $(IMG) \
|
||||
--push \
|
||||
.
|
||||
|
||||
clean:
|
||||
rm -rf out
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
# Kind of sad that I need to make this trivial image. But the gitleaks docker
|
||||
# image by default uses a user named `gitleaks` with uid 1000, and it doesn't
|
||||
# work correctly unless the gitleaks is run with the user that owns the files
|
||||
# in the repo. And in my CI (woodpecker) the files in the repo are owned by
|
||||
# root and I can't configure the user running the container in its yaml config.
|
||||
# So yeah...
|
||||
FROM zricethezav/gitleaks
|
||||
USER root
|
|
@ -0,0 +1,24 @@
|
|||
IMG_NAME=gitleaks
|
||||
REGISTRY=registry.monotremata.xyz
|
||||
IMG=$(REGISTRY)/$(IMG_NAME)
|
||||
PLATFORMS=linux/amd64,linux/arm64
|
||||
|
||||
.PHONY: push buildx clean
|
||||
|
||||
out/image-id: Dockerfile
|
||||
mkdir -p $(@D)
|
||||
docker build -t $(IMG) .
|
||||
echo $(IMG) > $@
|
||||
|
||||
push: out/image-id
|
||||
docker image push $(IMG)
|
||||
|
||||
buildx: Dockerfile
|
||||
docker buildx build \
|
||||
--platform $(PLATFORMS) \
|
||||
--tag $(IMG) \
|
||||
--push \
|
||||
.
|
||||
|
||||
clean:
|
||||
rm -rf out
|
11
mpd/Makefile
11
mpd/Makefile
|
@ -3,12 +3,14 @@ REGISTRY=registry.monotremata.xyz
|
|||
IMG=$(REGISTRY)/$(IMG_NAME)
|
||||
PLATFORMS=linux/arm64
|
||||
|
||||
.PHONY: build push buildx
|
||||
.PHONY: push buildx clean
|
||||
|
||||
build: Dockerfile
|
||||
out/image-id: Dockerfile
|
||||
mkdir -p $(@D)
|
||||
docker build -t $(IMG) .
|
||||
echo $(IMG) > $@
|
||||
|
||||
push: build
|
||||
push: out/image-id
|
||||
docker image push $(IMG)
|
||||
|
||||
buildx: Dockerfile
|
||||
|
@ -17,3 +19,6 @@ buildx: Dockerfile
|
|||
--tag $(IMG) \
|
||||
--push \
|
||||
.
|
||||
|
||||
clean:
|
||||
rm -rf out
|
||||
|
|
|
@ -15,8 +15,9 @@ RUN apk add \
|
|||
https://git.pleroma.social/pleroma/pleroma.git \
|
||||
/pleroma
|
||||
|
||||
WORKDIR /pleroma
|
||||
|
||||
RUN echo "import Mix.Config" > /pleroma/config/prod.secret.exs && \
|
||||
cd /pleroma && \
|
||||
mix local.hex --force && \
|
||||
mix local.rebar --force && \
|
||||
mix deps.get --only prod && \
|
||||
|
|
|
@ -3,12 +3,14 @@ REGISTRY=registry.monotremata.xyz
|
|||
IMG=$(REGISTRY)/$(IMG_NAME)
|
||||
PLATFORMS=linux/amd64
|
||||
|
||||
.PHONY: build push buildx
|
||||
.PHONY: push buildx clean
|
||||
|
||||
build: Dockerfile entrypoint.sh
|
||||
out/image-id: Dockerfile entrypoint.sh
|
||||
mkdir -p $(@D)
|
||||
docker build -t $(IMG) .
|
||||
echo $(IMG) > $@
|
||||
|
||||
push: build
|
||||
push: out/image-id
|
||||
docker image push $(IMG)
|
||||
|
||||
buildx: Dockerfile entrypoint.sh
|
||||
|
@ -17,3 +19,6 @@ buildx: Dockerfile entrypoint.sh
|
|||
--tag $(IMG) \
|
||||
--push \
|
||||
.
|
||||
|
||||
clean:
|
||||
rm -rf out
|
||||
|
|
|
@ -13,9 +13,12 @@ RUN addgroup \
|
|||
--shell /sbin/nologin \
|
||||
rainloop
|
||||
|
||||
RUN mkdir -p /var/www/rainloop && \
|
||||
cd /var/www/rainloop && \
|
||||
curl -sL https://repository.rainloop.net/installer.php | php && \
|
||||
|
||||
RUN mkdir -p /var/www/rainloop
|
||||
|
||||
WORKDIR /var/www/rainloop
|
||||
|
||||
RUN curl -sL https://repository.rainloop.net/installer.php | php && \
|
||||
mkdir -p /run/nginx /var/run && \
|
||||
touch /var/run/nginx.pid && \
|
||||
chown -R rainloop:rainloop /var/www/rainloop
|
||||
|
@ -28,6 +31,4 @@ COPY nginx.conf /etc/nginx/nginx.conf
|
|||
COPY entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
WORKDIR /var/www/rainloop
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
|
|
@ -3,12 +3,14 @@ REGISTRY=registry.monotremata.xyz
|
|||
IMG=$(REGISTRY)/$(IMG_NAME)
|
||||
PLATFORMS=linux/arm64
|
||||
|
||||
.PHONY: build push buildx
|
||||
.PHONY: push buildx clean
|
||||
|
||||
build: Dockerfile entrypoint.sh nginx.conf
|
||||
out/image-id: Dockerfile entrypoint.sh nginx.conf
|
||||
mkdir -p $(@D)
|
||||
docker build -t $(IMG) .
|
||||
echo $(IMG) > $@
|
||||
|
||||
push: build
|
||||
push: out/image-id
|
||||
docker image push $(IMG)
|
||||
|
||||
buildx: Dockerfile entrypoint.sh nginx.conf
|
||||
|
@ -17,3 +19,6 @@ buildx: Dockerfile entrypoint.sh nginx.conf
|
|||
--tag $(IMG) \
|
||||
--push \
|
||||
.
|
||||
|
||||
clean:
|
||||
rm -rf out
|
||||
|
|
|
@ -3,12 +3,14 @@ REGISTRY=registry.monotremata.xyz
|
|||
IMG=$(REGISTRY)/$(IMG_NAME)
|
||||
PLATFORMS=linux/amd64,linux/arm64
|
||||
|
||||
.PHONY: build push buildx
|
||||
.PHONY: push buildx clean
|
||||
|
||||
build: Dockerfile entrypoint.sh
|
||||
out/image-id: Dockerfile entrypoint.sh
|
||||
mkdir -p $(@D)
|
||||
docker build -t $(IMG) .
|
||||
echo $(IMG) > $@
|
||||
|
||||
push: build
|
||||
push: out/image-id
|
||||
docker image push $(IMG)
|
||||
|
||||
buildx: Dockerfile entrypoint.sh
|
||||
|
@ -17,3 +19,6 @@ buildx: Dockerfile entrypoint.sh
|
|||
--tag $(IMG) \
|
||||
--push \
|
||||
.
|
||||
|
||||
clean:
|
||||
rm -rf out
|
||||
|
|
|
@ -20,9 +20,10 @@ fi
|
|||
|
||||
KNOWN_HOSTS="${KNOWN_HOSTS:=${PLUGIN_KNOWN_HOSTS}}"
|
||||
|
||||
SOURCE="${SOURCE:-${PLUGIN_SOURCE}}"
|
||||
if [ -z "$SOURCE" ]; then
|
||||
echo "'source' must be specified"
|
||||
SOURCES="${SOURCES:-${PLUGIN_SOURCES}}"
|
||||
SOURCES=$(echo "$SOURCES" | tr ',' ' ')
|
||||
if [ -z "$SOURCES" ]; then
|
||||
echo "specify at least one source"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -48,4 +49,7 @@ known_hosts_file="${HOME}/.ssh/known_hosts"
|
|||
# run rsync
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
exec rsync $ARGS "${SOURCE}" "${USER}"@"${HOST}":"${TARGET}"
|
||||
for SOURCE in $SOURCES; do
|
||||
echo "copying '$SOURCE' to '$TARGET'"
|
||||
rsync $ARGS "${SOURCE}" "${USER}"@"${HOST}":"${TARGET}"
|
||||
done
|
||||
|
|
|
@ -3,12 +3,14 @@ REGISTRY=registry.monotremata.xyz
|
|||
IMG=$(REGISTRY)/$(IMG_NAME)
|
||||
PLATFORMS=linux/amd64,linux/arm64
|
||||
|
||||
.PHONY: build push buildx
|
||||
.PHONY: push buildx clean
|
||||
|
||||
build: Dockerfile
|
||||
out/image-id: Dockerfile
|
||||
mkdir -p $(@D)
|
||||
docker build -t $(IMG) .
|
||||
echo $(IMG) > $@
|
||||
|
||||
push: build
|
||||
push: out/image-id
|
||||
docker image push $(IMG)
|
||||
|
||||
buildx: Dockerfile
|
||||
|
@ -17,3 +19,6 @@ buildx: Dockerfile
|
|||
--tag $(IMG) \
|
||||
--push \
|
||||
.
|
||||
|
||||
clean:
|
||||
rm -rf out
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
FROM alpine:3.16
|
||||
|
||||
RUN apk add --no-cache terraform
|
||||
|
||||
ENTRYPOINT ["terraform"]
|
|
@ -0,0 +1,24 @@
|
|||
IMG_NAME=terraform
|
||||
REGISTRY=registry.monotremata.xyz
|
||||
IMG=$(REGISTRY)/$(IMG_NAME)
|
||||
PLATFORMS=linux/amd64,linux/arm64
|
||||
|
||||
.PHONY: push buildx clean
|
||||
|
||||
out/image-id: Dockerfile
|
||||
mkdir -p $(@D)
|
||||
docker build -t $(IMG) .
|
||||
echo $(IMG) > $@
|
||||
|
||||
push: out/image-id
|
||||
docker image push $(IMG)
|
||||
|
||||
buildx: Dockerfile
|
||||
docker buildx build \
|
||||
--platform $(PLATFORMS) \
|
||||
--tag $(IMG) \
|
||||
--push \
|
||||
.
|
||||
|
||||
clean:
|
||||
rm -rf out
|
11
tor/Makefile
11
tor/Makefile
|
@ -3,12 +3,14 @@ REGISTRY=registry.monotremata.xyz
|
|||
IMG=$(REGISTRY)/$(IMG_NAME)
|
||||
PLATFORMS=linux/amd64
|
||||
|
||||
.PHONY: build push buildx
|
||||
.PHONY: push buildx clean
|
||||
|
||||
build: Dockerfile entrypoint.sh
|
||||
out/image-id: Dockerfile entrypoint.sh
|
||||
mkdir -p $(@D)
|
||||
docker build -t $(IMG) .
|
||||
echo $(IMG) > $@
|
||||
|
||||
push: build
|
||||
push: out/image-id
|
||||
docker image push $(IMG)
|
||||
|
||||
buildx: Dockerfile entrypoint.sh
|
||||
|
@ -17,3 +19,6 @@ buildx: Dockerfile entrypoint.sh
|
|||
--tag $(IMG) \
|
||||
--push \
|
||||
.
|
||||
|
||||
clean:
|
||||
rm -rf out
|
||||
|
|
|
@ -3,12 +3,14 @@ REGISTRY=registry.monotremata.xyz
|
|||
IMG=$(REGISTRY)/$(IMG_NAME)
|
||||
PLATFORMS=linux/amd64,linux/arm64
|
||||
|
||||
.PHONY: build push buildx
|
||||
.PHONY: push buildx clean
|
||||
|
||||
build: Dockerfile
|
||||
out/image-id: Dockerfile
|
||||
mkdir -p $(@D)
|
||||
docker build -t $(IMG) .
|
||||
echo $(IMG) > $@
|
||||
|
||||
push: build
|
||||
push: out/image-id
|
||||
docker image push $(IMG)
|
||||
|
||||
buildx: Dockerfile
|
||||
|
@ -17,3 +19,6 @@ buildx: Dockerfile
|
|||
--tag $(IMG) \
|
||||
--push \
|
||||
.
|
||||
|
||||
clean:
|
||||
rm -rf out
|
||||
|
|
|
@ -3,12 +3,14 @@ REGISTRY=registry.monotremata.xyz
|
|||
IMG=$(REGISTRY)/$(IMG_NAME)
|
||||
PLATFORMS=linux/amd64,linux/arm64
|
||||
|
||||
.PHONY: build push buildx
|
||||
.PHONY: push buildx clean
|
||||
|
||||
build: Dockerfile nginx.conf
|
||||
out/image-id: Dockerfile nginx.conf
|
||||
mkdir -p $(@D)
|
||||
docker build -t $(IMG) .
|
||||
echo $(IMG) > $@
|
||||
|
||||
push: build
|
||||
push: out/image-id
|
||||
docker image push $(IMG)
|
||||
|
||||
buildx: Dockerfile nginx.conf
|
||||
|
@ -17,3 +19,6 @@ buildx: Dockerfile nginx.conf
|
|||
--tag $(IMG) \
|
||||
--push \
|
||||
.
|
||||
|
||||
clean:
|
||||
rm -rf out
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
FROM alpine:3.16
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
|
||||
RUN chmod +x /entrypoint.sh && \
|
||||
apk add --no-cache go-sendxmpp && \
|
||||
addgroup \
|
||||
--gid 10001 \
|
||||
sendxmpp && \
|
||||
adduser \
|
||||
--uid 10000 \
|
||||
--ingroup sendxmpp \
|
||||
--disabled-password \
|
||||
--shell /sbin/nologin \
|
||||
sendxmpp
|
||||
|
||||
USER sendxmpp
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
|
@ -0,0 +1,24 @@
|
|||
IMG_NAME=xmpp-ci
|
||||
REGISTRY=registry.monotremata.xyz
|
||||
IMG=$(REGISTRY)/$(IMG_NAME)
|
||||
PLATFORMS=linux/amd64,linux/arm64
|
||||
|
||||
.PHONY: push buildx clean
|
||||
|
||||
out/image-id: Dockerfile entrypoint.sh
|
||||
mkdir -p $(@D)
|
||||
docker build -t $(IMG) .
|
||||
echo $(IMG) > $@
|
||||
|
||||
push: out/image-id
|
||||
docker image push $(IMG)
|
||||
|
||||
buildx: Dockerfile entrypoint.sh
|
||||
docker buildx build \
|
||||
--platform $(PLATFORMS) \
|
||||
--tag $(IMG) \
|
||||
--push \
|
||||
.
|
||||
|
||||
clean:
|
||||
rm -rf out
|
|
@ -0,0 +1,55 @@
|
|||
#!/bin/sh
|
||||
|
||||
USERNAME="${USERNAME:-${PLUGIN_USERNAME}}"
|
||||
if [ -z "$USERNAME" ]; then
|
||||
echo "'username' must specified"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PASSWORD="${PASSWORD:-${PLUGIN_PASSWORD}}"
|
||||
if [ -z "$PASSWORD" ]; then
|
||||
echo "'password' must specified"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
RECIPIENT="${RECIPIENT:-${PLUGIN_RECIPIENT}}"
|
||||
if [ -z "$RECIPIENT" ]; then
|
||||
echo "'recipient' must specified"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
em () {
|
||||
echo "_${1}_"
|
||||
}
|
||||
|
||||
monospace () {
|
||||
echo '`'"${1}"'`'
|
||||
}
|
||||
|
||||
strong () {
|
||||
echo "*${1}*"
|
||||
}
|
||||
|
||||
strike () {
|
||||
echo "~${1}~"
|
||||
}
|
||||
|
||||
build_line () {
|
||||
echo "$1: $2"
|
||||
}
|
||||
|
||||
message () {
|
||||
echo status: "${CI_BUILD_STATUS}"
|
||||
echo repo: "${CI_REPO_NAME}"
|
||||
echo branch: "${CI_REPO_DEFAULT_BRANCH}"
|
||||
echo ""
|
||||
echo commit msg:
|
||||
echo "${CI_COMMIT_MESSAGE}"
|
||||
}
|
||||
|
||||
message
|
||||
message | \
|
||||
go-sendxmpp \
|
||||
--username="${USERNAME}"\
|
||||
--password="${PASSWORD}" \
|
||||
"${RECIPIENT}"
|
Loading…
Reference in New Issue