make xmpp image more ci-specific
parent
20ba0467d1
commit
6f4329f002
4
Makefile
4
Makefile
|
@ -1,7 +1,7 @@
|
|||
REGISTRY=registry.monotremata.xyz
|
||||
PLATFORMS=linux/amd64,linux/arm64
|
||||
|
||||
IMAGES=agate buildx-qemu mpd pleroma rainloop rsync sendxmpp static-page-builder tor transmission webdav
|
||||
IMAGES=agate buildx-qemu mpd pleroma rainloop rsync xmpp-ci static-page-builder tor transmission webdav
|
||||
|
||||
.PHONY: all $(IMAGES)
|
||||
|
||||
|
@ -27,7 +27,7 @@ rainloop:
|
|||
rsync:
|
||||
$(BUILDX)
|
||||
|
||||
sendxmpp:
|
||||
xmpp-ci:
|
||||
$(BUILDX)
|
||||
|
||||
static-page-builder:
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
MESSAGE="${MESSAGE:-${PLUGIN_MESSAGE}}"
|
||||
if [ -z "$MESSAGE" ]; then
|
||||
echo "'message' must specified"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
USERNAME="${USERNAME:-${PLUGIN_USERNAME}}"
|
||||
if [ -z "$USERNAME" ]; then
|
||||
echo "'username' must specified"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PASSWORD="${PASSWORD:-${PLUGIN_PASSWORD}}"
|
||||
if [ -z "$USERNAME" ]; then
|
||||
echo "'username' must specified"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
RECIPIENT="${RECIPIENT:-${PLUGIN_RECIPIENT}}"
|
||||
if [ -z "$RECIPIENT" ]; then
|
||||
echo "'recipient' must specified"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exec echo "$MESSAGE" | \
|
||||
go-sendxmpp \
|
||||
--username="${USERNAME}"\
|
||||
--password="${PASSWORD}" \
|
||||
"${RECIPIENT}"
|
|
@ -1,4 +1,4 @@
|
|||
IMG_NAME=sendxmpp
|
||||
IMG_NAME=xmpp-ci
|
||||
REGISTRY=registry.monotremata.xyz
|
||||
IMG=$(REGISTRY)/$(IMG_NAME)
|
||||
PLATFORMS=linux/amd64,linux/arm64
|
|
@ -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 repo: "${CI_REPO_NAME}"
|
||||
echo status: "${CI_BUILD_STATUS}"
|
||||
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