You've already forked sap-jenkins-library
mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-09-16 09:26:22 +02:00
Improve documentation for protecodeExecuteScan (#3076)
* Improve documentation for protecodeExecuteScan protecodeExecuteScan expects that the docker config file is named 'config.json'. The dockerConfigJSON parameter is used by protecodeExecuteScan to retrieve the directory only (for environment variable DOCKER_CONFIG). * Also improve documentation that is generated * No relative references in generated documentation. * Less complex documentation * Remove irrelevant empty line * Improvements after review * Add blank line after code block * Handle registry URL example as code Markdown format checker does not like raw URLs. Co-authored-by: Sven Merk <33895725+nevskrem@users.noreply.github.com>
This commit is contained in:
@@ -8,7 +8,25 @@
|
||||
1. Look up your Group ID using REST API via `curl -u <username> "https://<protecode host>/api/groups/"`.
|
||||
|
||||
If the image is on a protected registry you can provide a Docker `config.json` file containing the credential information for the registry.
|
||||
You can create it like explained in the Docker Success Center in the article about [how to generate a new auth in the config.json file](https://success.docker.com/article/generate-new-auth-in-config-json-file).
|
||||
You can either use `docker login` (see the [Docker documentation](https://docs.docker.com/engine/reference/commandline/login/) for details) or you can create the file manually using the following script.
|
||||
|
||||
```shell
|
||||
#!/bin/bash
|
||||
auth=$(echo -n "$USER:$PASSWORD" | base64 -w0)
|
||||
cat <<EOF > config.json
|
||||
{
|
||||
"auths": {
|
||||
"$REGISTRY": {
|
||||
"auth": "$auth"
|
||||
}
|
||||
}
|
||||
}
|
||||
EOF
|
||||
```
|
||||
|
||||
`REGISTRY` is the URL of the protected registry (Example: `https://index.docker.io/v1`).
|
||||
|
||||
Attention: If you reference the file in --dockerConfigJSON or upload the file to the Jenkins credential store, the file has to be named `config.json`.
|
||||
|
||||
## ${docGenParameters}
|
||||
|
||||
|
Reference in New Issue
Block a user