Warm tip: This article is reproduced from stackoverflow.com, please click
jenkins-pipeline ucd

UrbanCode Deploy

发布于 2020-04-08 23:41:39

From what I can tell after reading IBM documentation is that, after creating a component in UCD, you'd have to manually map that component to an available Resource/Agents that you had already setup.

The way I have my pipeline setup is that, my Jenkins job is the one that's creating components. So in other words, on UCD, I have the application, environment, agents, etc... all that set up, but no components are created -- because my Jenkins job (it's really a Jenkinsfile) is the one that's creating components.

But in order to do a successful deployment, one of the things you have to do is map this component to an Agent. I don't want to have to log back into UCD to manually map this recently created component to one of the available Agents.

When Jenkins is creating the components, it's referring to an already-defined Component Template in UCD to create the components. In the Component Template, I can specify a Component Process. I'm suspecting that in this process, I can specify a step to map the current component to an Agent, but I'm not able to figure this out.

Questioner
AlphaNumerical
Viewed
63
AlphaNumerical 2020-02-01 09:40

I may have found the answer - you can set a component tag during jenkins deploy job (you can pass these properties as a parameter).

You can setup component tags in agents. If the value of the component tag in agent matches with the tag in the component, that component can be deployed to a VM using that agent with the matching component-tag.