The following plugin provides functionality available through Pipeline-compatible steps. Read more about how to integrate steps into your Pipeline in the Steps section of the Pipeline Syntax page.

For a list of other such plugins, see the Pipeline Steps Reference page.

Redeploy Rancher2.x Workload Plugin

rancherRedeploy: Redeploy Rancher2.x Workload

  • credential
    • Type: String
  • workload
    you can find your workload API path in Rancher2.x web UI-->Cluster->Project->Resources->Workloads,
    copy the workload link address, eg: http://localhost/p/c-h4hxd:p-dwqfr/workload/deployment:jenkins:jenkins
    or click the menu icon and select "View in API", will open in new browser tab. copy that url to here.

    since endpoint part has bean set in Credential, you only need specify path from "/p/" or "/project", eg:
    /project/c-h4hxd:p-c9j8z/workloads/deployment:default:busybox
    or /p/c-h4hxd:p-dwqfr/workload/deployment:jenkins:jenkins

    • Type: String
  • images
    update image version to your excepted. optional if you use latest as image version or imagePullPolicy="Always"
    you can use semicolon(;) to split multiple images, eg:

    nginx;nginx:1.0;myteam/myproject:v2.0;docker.io/team/image:v1.0.${BUILD_NUMBER}

    this plugin will update all images in this workload by match the name part exactly, and simply set version part as you specified. so you may need Jenkins variables to dynamic generate new version number.
    • Type: String
  • alwaysPull
    set imagePullPolicy to "Always"
    • Type: boolean

Was this page helpful?

Please submit your feedback about this page through this quick form.

Alternatively, if you don't wish to complete the quick form, you can simply indicate if you found this page helpful?

    


See existing feedback here.