You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
1.3 KiB

- name: build-db-and-push
image: archlinux
user: 0
commands:
- pacman -Sy --noconfirm
- cd "$MOUNT_POINT"
- cd "$MOUNT_POINT" && pacman -S wget curl jq --noconfirm
- cd "$MOUNT_POINT" && curl -sSL -k -X GET -G $REPO_API_URL/assets?repository=aur-auto-builder > output
- cd "$MOUNT_POINT" && cat output | jq '.items | map(.downloadUrl)' > jq-output
- cd "$MOUNT_POINT" && for k in $(jq -r ".[]" jq-output); do wget "$k"; done
- cd "$MOUNT_POINT" && cat jq-output && ls -la
- cd "$MOUNT_POINT" && rm -rf jq-output output repo.*
- ls -la "$MOUNT_POINT"
- cd "$MOUNT_POINT" && repo-add auto-builder.db.tar.gz *.pkg.tar.*
- cd "$MOUNT_POINT" && for filename in "$MOUNT_POINT"/*; do curl -X DELETE -v -u "$USERNAME:$PASSWORD" $REPO_URL/$(basename $filename) ; done
- cd "$MOUNT_POINT" && for filename in "$MOUNT_POINT"/*; do curl -v -u "$USERNAME:$PASSWORD" -T $filename $REPO_URL/$(basename $filename) ; done
volumes:
- name: oblivion
path: /oblivion/x86_64
environment:
REPO_API_URL: http://10.0.0.85:8081/service/rest/v1
REPO_URL: http://10.0.0.85:8081/repository/aur-auto-builder
MOUNT_POINT: /oblivion/x86_64
USERNAME:
from_secret: nexus_username
PASSWORD:
from_secret: nexus_password