redhat-developer / openshift-vsts

OpenShift Extension for Azure DevOps.
Apache License 2.0
15 stars 20 forks source link

Select namespace in oc tasks #192

Open dnperfors opened 1 year ago

dnperfors commented 1 year ago

I use these oc tasks in a pipeline that deploys to different namespaces in different stages, so first to my_project-dev, my_project_test, etc. It would be great if it would be possible to select the namespace in the different tasks, this is especially useful in the OcConditionalCmd: Current situation:

- task: OcConditionalCommand@2
  inputs:
    openshiftService: 'my_connection'
    cmd: 'rollout restart deployment/my_service --namespace my_project-dev'
    condition: 'exists'
    resource: 'deployment/my_service --namespace my_project-dev'

Desired situation:

- task: OcConditionalCommand@2
  inputs:
    openshiftService: 'my_connection'
    namespace: 'my_project-dev'
    cmd: 'rollout restart deployment/my_service'
    condition: 'exists'
    resource: 'deployment/my_service'

In this case especially I basically make use of a command injection issue to inject the namespace for the conditional check.

Other solutions would be to select the project in the oc-setup task

lstocchi commented 1 year ago

Hi @dnperfors, thanks for the suggestion. Unfortunately this plugin is in maintainance mode atm and we are not planning to add new features. I'll keep this open as the situation could change soon. Just to let you know. And sorry for the late reply.