1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-14 11:03:09 +02:00
sap-jenkins-library/resources/metadata/containerSaveImage.yaml

108 lines
3.8 KiB
YAML
Raw Normal View History

metadata:
name: containerSaveImage
description: Saves a container image as a tar file
longDescription: |-
This step allows you to save a container image, for example a Docker image into a tar file.
It can be used no matter if a Docker daemon is available or not. It will also work inside a Kubernetes cluster without access to a daemon.
spec:
inputs:
secrets:
- name: dockerConfigJsonCredentialsId
description: Jenkins 'Secret file' credentials ID containing Docker config.json (with registry credential(s)). You can find more details about the Docker credentials in the [Docker documentation](https://docs.docker.com/engine/reference/commandline/login/).
type: jenkins
aliases:
- name: dockerCredentialsId
deprecated: true
params:
2020-08-31 16:10:28 +02:00
- name: containerRegistryUrl
aliases:
- name: dockerRegistryUrl
type: string
description: "For `buildTool: docker`: Url of the container registry - typically provided by the CI/CD environment."
2020-08-31 16:10:28 +02:00
mandatory: true
resourceRef:
- name: commonPipelineEnvironment
param: container/registryUrl
scope:
- GENERAL
- PARAMETERS
- STAGES
- STEPS
- name: containerImage
aliases:
- name: dockerImage
- name: scanImage
type: string
description: Container image to be saved.
mandatory: true
resourceRef:
- name: commonPipelineEnvironment
param: container/imageNameTag
scope:
- GENERAL
- PARAMETERS
- STAGES
- STEPS
- name: containerRegistryPassword
description: "For `buildTool: docker`: Password for container registry access - typically provided by the CI/CD environment."
type: string
scope:
- PARAMETERS
- STAGES
- STEPS
secret: true
resourceRef:
- name: commonPipelineEnvironment
param: container/repositoryPassword
- name: commonPipelineEnvironment
param: custom/repositoryPassword
- name: containerRegistryUser
description: "For `buildTool: docker`: Username for container registry access - typically provided by the CI/CD environment."
type: string
scope:
- PARAMETERS
- STAGES
- STEPS
secret: true
resourceRef:
- name: commonPipelineEnvironment
param: container/repositoryUsername
- name: commonPipelineEnvironment
param: custom/repositoryUsername
2020-08-31 16:10:28 +02:00
- name: filePath
type: string
description: The path to the file to which the image should be saved.
2020-08-31 16:10:28 +02:00
scope:
- PARAMETERS
- STAGES
- STEPS
- name: dockerConfigJSON
type: string
description: Path to the file `.docker/config.json` - this is typically provided by your CI/CD system. You can find more details about the Docker credentials in the [Docker documentation](https://docs.docker.com/engine/reference/commandline/login/).
scope:
- PARAMETERS
- STAGES
- STEPS
secret: true
resourceRef:
- name: commonPipelineEnvironment
param: custom/dockerConfigJSON
- name: dockerConfigJsonCredentialsId
type: secret
- type: vaultSecretFile
name: dockerConfigFileVaultSecretName
default: docker-config
- name: imageFormat
type: string
description: Format of the image when saving the docker image locally.
scope:
- PARAMETERS
- STAGES
- STEPS
default: legacy
possibleValues:
- tarball
- oci
- legacy