*Initial version
This commit is contained in:
parent
14c175d7af
commit
f7f014e711
|
@ -0,0 +1,5 @@
|
|||
FROM alpine
|
||||
ADD aptly.sh /bin/
|
||||
RUN chmod +x /bin/aptly.sh
|
||||
RUN apk -Uuv add curl ca-certificates bash jo
|
||||
ENTRYPOINT /bin/aptly.sh
|
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
APT_SERVICE_API="https://apt.lumeweb.com"
|
||||
|
||||
USERNAME="${PLUGIN_APT_USERNAME}"
|
||||
PASSWORD="${PLUGIN_APT_PASSWORD}"
|
||||
|
||||
SNAPSHOT_NAME=$(date -u -%s)
|
||||
|
||||
PACKAGE_NAME="$(basename ${PLUGIN_PACKAGE} .deb)"
|
||||
|
||||
curl -u "${USERNAME}:${PASSWORD}" -X POST -F file=@${PLUGIN_PACKAGE} "http://${APT_SERVICE_API}/api/files/${PACKAGE_NAME}"
|
||||
curl -u "${USERNAME}:${PASSWORD}" -X POST -F file=@${PLUGIN_PACKAGE} "http://${APT_SERVICE_API}/api/repos/${PLUGIN_REPO}/file/${PACKAGE_NAME}"
|
||||
|
||||
JSON=$(jo Name="${SNAPSHOT_NAME}" Passphrase="${PLUGIN_GPG_PASSWORD}")
|
||||
curl -u "${USERNAME}:${PASSWORD}" ${APT_SERVICE_API}/api/repos/${PLUGIN_REPO}/snapshots -d "${JSON}"
|
||||
|
||||
JSON=$(jo Storage="s3" Prefix="." Distribution="ubuntu" Architectures="amd64" Passphrase="${PLUGIN_GPG_PASSWORD}")
|
||||
curl -u "${USERNAME}:${PASSWORD}" ${APT_SERVICE_API}/api/publish -d "${JSON}"
|
Loading…
Reference in New Issue