jenkins-library icon indicating copy to clipboard operation
jenkins-library copied to clipboard

dockerExecuteOnKubernetes ignores stashExcludes and stashIncludes parameter in code

Open radianer opened this issue 2 years ago • 4 comments

Hello,

the command dockerExecuteOnKubernetes ignores the parameter stashExcludes and stashIncludes if the parameters are set at call in code. E.g.

dockerExecuteOnKubernetes(script:this, dockerImage:'someImage',
  stashExcludes:[workspace:'**' ,stashBack:''],
  stashIncludes:[workspace:'foo', stashBack:'bar']
) {...}

but it use */** that are set as default in the default_pipeline_environment.yml

i can see in the dockerExecuteOnKubernetes that the parameters are removed from the config keys

@Field Set PARAMETER_KEYS = STEP_CONFIG_KEYS.minus([
    'stashIncludes',
    'stashExcludes'
])

is that intended?

radianer avatar Jun 23 '22 10:06 radianer

Thank you for your contribution! This issue is stale because it has been open 60 days with no activity. In order to keep it open, please remove stale label or add a comment within the next 10 days. If you need a Piper team member to remove the stale label make sure to add @SAP/jenkins-library-team to your comment.

github-actions[bot] avatar Aug 23 '22 00:08 github-actions[bot]

its not stale @SAP/jenkins-library-team

radianer avatar Aug 23 '22 09:08 radianer

@OliverNocon any thoughts about this? Can we allow specifying them on parameter level?

CCFenner avatar Sep 13 '22 12:09 CCFenner

I know that this has been like that from the very beginning. I cannot judge the side-effects since this will be a rather incompatible change.

AFAIK dockerExecuteOnKubernetes was never intended to be used directly but rather behind dockerExecute in order to make pipelines run in either case (non-Kubernetes & Kubernetes)

My personal recommendation is to use the provided config option via config.yml.

OliverNocon avatar Sep 13 '22 13:09 OliverNocon

Thank you for your contribution! This issue is stale because it has been open 60 days with no activity. In order to keep it open, please remove stale label or add a comment within the next 10 days. If you need a Piper team member to remove the stale label make sure to add @SAP/jenkins-library-team to your comment.

github-actions[bot] avatar Nov 13 '22 00:11 github-actions[bot]

Issue got stale and no further activity happened. It has automatically been closed. Please re-open in case you still consider it relevant.

github-actions[bot] avatar Nov 24 '22 00:11 github-actions[bot]