Open dyroberts opened 5 years ago
@pivotal-dylan-roberts I had lazily decided to keep the apt-get stuff in the packaging
script because I was putting pre-compiled releases in the manifests/gogs.yml
via CI; so packaging
was never used by end operators, only by developers (you) and CI.
But if its not actually installing good packages, then that's no good at all! :)
Steps to reproduce:
set -ex
export GOGS_ADMIN_USER=
export GOGS_ADMIN_UID=1
export GOGS_ADMIN_PASSWORD=
export GOGS_HOST=
export GOGS_PORT=
export REMOTE_REPO_URL=https://github.com/habuma/myapp-config export MIRROR_REPO_NAME=config-mirror-3
export GOGS_TOKEN=
cat token-response.json | jq --raw-output '.sha1'
export GOGS_TOKEN=
curl $GOGS_HOST:$GOGS_PORT/api/v1/users/$GOGS_ADMIN_USER/tokens -H"Content-type: application/json" -d'{"name":"admintoken"}' -u$GOGS_ADMIN_USER:$GOGS_ADMIN_PASSWORD | jq --raw-output '.sha1'
echo $GOGS_TOKENexport GOGS_ADMIN_UID=
curl "$GOGS_HOST:$GOGS_PORT/api/v1/user" -H"Authorization: token $GOGS_TOKEN" | jq --raw-output '.id'
export CREATE_MIRROR_JSON="{\"clone_addr\": \"$REMOTE_REPO_URL\",\"uid\": $GOGS_ADMIN_UID,\"repo_name\": \"$MIRROR_REPO_NAME\",\"mirror\": true}"curl "$GOGS_HOST:$GOGS_PORT/api/v1/repos/migrate" -d"$CREATE_MIRROR_JSON" -H"Content-type: application/json" -H"Authorization: token $GOGS_TOKEN"