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/savecontainer.yaml
Oliver Nocon d5bff20b10
Create step to save container image (#1554)
* Create step to save container image

* add error handling for directory creation

* Update permissions

* remove indirection and add tests

* finalize tests

* Fix test to also run on linux environments

* Update cmd/containerSaveImage.go

Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>

* Update resources/metadata/savecontainer.yaml

Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>

* Update cmd/containerSaveImage.go

Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>

* Update cmd/containerSaveImage_test.go

Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>

* Update generated file

Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
2020-05-18 08:55:25 +02:00

54 lines
1.5 KiB
YAML

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:
params:
- name: containerRegistryUrl
aliases:
- name: dockerRegistryUrl
type: string
description: The reference to the container registry where the image is located.
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: filePath
type: string
description: The path to the file to which the image should be saved. Defaults to `containerImage.tar`
scope:
- PARAMETERS
- STAGES
- STEPS
- name: includeLayers
type: bool
description: Flag if the docker layers should be included
scope:
- PARAMETERS
- STAGES
- STEPS