use the nexus api to create the apt-hosted apt repository
This commit is contained in:
parent
07553f6c30
commit
43584e1089
|
|
@ -4,6 +4,7 @@ This will:
|
||||||
|
|
||||||
* Configure Nexus through the API.
|
* Configure Nexus through the API.
|
||||||
* Create the `adhoc-package` repository.
|
* Create the `adhoc-package` repository.
|
||||||
|
* Create the `apt-hosted` repository.
|
||||||
* Configure the NuGet `nuget-hosted` repository to accept pushing with an API key.
|
* Configure the NuGet `nuget-hosted` repository to accept pushing with an API key.
|
||||||
* Configure Nexus through Groovy scripts.
|
* Configure Nexus through Groovy scripts.
|
||||||
* Create the `npm-group`, `npm-hosted` and `npmjs.org-proxy` repositories.
|
* Create the `npm-group`, `npm-hosted` and `npmjs.org-proxy` repositories.
|
||||||
|
|
|
||||||
|
|
@ -191,6 +191,34 @@ http \
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
||||||
|
# create the apt-hosted apt repository.
|
||||||
|
# see https://help.sonatype.com/repomanager3/formats/apt-repositories
|
||||||
|
http \
|
||||||
|
--check-status \
|
||||||
|
--auth "$api_auth" \
|
||||||
|
POST \
|
||||||
|
https://$nexus_domain/service/rest/v1/repositories/apt/hosted \
|
||||||
|
<<EOF
|
||||||
|
{
|
||||||
|
"name": "apt-hosted",
|
||||||
|
"online": true,
|
||||||
|
"storage": {
|
||||||
|
"blobStoreName": "default",
|
||||||
|
"strictContentTypeValidation": true,
|
||||||
|
"writePolicy": "allow_once"
|
||||||
|
},
|
||||||
|
"component": {
|
||||||
|
"proprietaryComponents": true
|
||||||
|
},
|
||||||
|
"apt": {
|
||||||
|
"distribution": "jammy"
|
||||||
|
},
|
||||||
|
"aptSigning": {
|
||||||
|
"keypair": $(cat /vagrant/shared/apt-hosted-private.key | jq --slurp --raw-input .),
|
||||||
|
"passphrase": "abracadabra"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EOF
|
||||||
# create the pypi-hosted repository.
|
# create the pypi-hosted repository.
|
||||||
http \
|
http \
|
||||||
--check-status \
|
--check-status \
|
||||||
|
|
|
||||||
|
|
@ -25,11 +25,6 @@ capabilityRegistry.all.findAll {it.context().type().toString().startsWith("Outre
|
||||||
// ]}
|
// ]}
|
||||||
//])
|
//])
|
||||||
|
|
||||||
// create a apt repository backed by the default blob store.
|
|
||||||
// see https://help.sonatype.com/repomanager3/formats/apt-repositories
|
|
||||||
pgpPrivateKey = new File('/vagrant/shared/apt-hosted-private.key').getText('UTF-8')
|
|
||||||
repository.createAptHosted("apt-hosted", "jammy", pgpPrivateKey, "abracadabra", "default", WritePolicy.ALLOW_ONCE, true)
|
|
||||||
|
|
||||||
|
|
||||||
// create a npm repository backed by the default blob store.
|
// create a npm repository backed by the default blob store.
|
||||||
repository.createNpmHosted("npm-hosted", "default", true, WritePolicy.ALLOW_ONCE)
|
repository.createNpmHosted("npm-hosted", "default", true, WritePolicy.ALLOW_ONCE)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue