mygithub.libinneed.workers.dev/stackitcloud/stackit-cli
Advanced tools
@@ -13,4 +13,3 @@ #!/bin/bash | ||
| PUBLIC_KEY_FILE="key.gpg" | ||
| CUSTOM_KEYRING_PIPELINE_FOLDER="/Users/runner/.gnupg" | ||
| CUSTOM_KEYRING_FILE="custom-keyring.gpg" | ||
| CUSTOM_KEYRING_FILE="aptly-keyring.gpg" | ||
| DISTRIBUTION="stackit" | ||
@@ -20,13 +19,15 @@ APTLY_CONFIG_FILE_PATH="./.aptly.conf" | ||
| # We need to disable the key database daemon (keyboxd) | ||
| # This can be done by removing "use-keyboxd" from ~/.gnupg/common.conf (see https://github.com/gpg/gnupg/blob/master/README) | ||
| echo -n >~/.gnupg/common.conf | ||
| # Create a local mirror of the current state of the remote APT repository | ||
| printf ">>> Creating mirror \n" | ||
| # curl ${OBJECT_STORAGE_ENDPOINT}/${PUBLIC_KEY_BUCKET_NAME}/${PUBLIC_KEY_FILE} >public.asc | ||
| # gpg --no-default-keyring --keyring=${CUSTOM_KEYRING_PIPELINE_FOLDER}/${CUSTOM_KEYRING_FILE} --import public.asc | ||
| # aptly mirror create -keyring="${CUSTOM_KEYRING_FILE}" current "${OBJECT_STORAGE_ENDPOINT}/${APT_BUCKET_NAME}" ${DISTRIBUTION} # Folder (CUSTOM_KEYRING_PIPELINE_FOLDER) is appended automatic in the aptly command | ||
| aptly mirror create current "${OBJECT_STORAGE_ENDPOINT}/${APT_BUCKET_NAME}" ${DISTRIBUTION} | ||
| curl ${OBJECT_STORAGE_ENDPOINT}/${PUBLIC_KEY_BUCKET_NAME}/${PUBLIC_KEY_FILE} >public.asc | ||
| gpg -v --no-default-keyring --keyring=${CUSTOM_KEYRING_FILE} --import public.asc | ||
| aptly mirror create -keyring="${CUSTOM_KEYRING_FILE}" current "${OBJECT_STORAGE_ENDPOINT}/${APT_BUCKET_NAME}" ${DISTRIBUTION} # Folder (CUSTOM_KEYRING_PIPELINE_FOLDER) is appended automatic in the aptly command | ||
| # Update the mirror to the latest state | ||
| printf "\n>>> Updating mirror \n" | ||
| # aptly mirror update -keyring="${CUSTOM_KEYRING_FILE}" current | ||
| aptly mirror update current | ||
| aptly mirror update -keyring="${CUSTOM_KEYRING_FILE}" current | ||
@@ -33,0 +34,0 @@ # Create a snapshot of the mirror |
Sorry, the diff of this file is not supported yet