Using xl-deploy plugin within xl-release gives deployment error

#1

Exception during execution: Exception: Deployment of task: ‘Applications/Folder14167bb513a4414586ecd0ad67469337/Release9dccce40ff0b483da12fd0fcf6b859dd/Phase87154f8e37ba4f6ea225dd87339e5f2e/Task3c2936aa21164d0494a196551fe4799e/Task43e6e153bb84436c96c9c67ef37299fb’ failed : [(<type ‘exceptions.Exception’>, Exception(‘Deployment package or environment is missing’,), <traceback object at 0xb>)] in <script> at line number 3

I’m actually not sure how the deployment package is supposed to be ‘delivered’ to xl-deploy

#2

Hi Kelly,
You’re using the deploy task in XL Release which requires you to provide an application version and environment name that’s already present in XL Deploy in order to automatically kickoff deployment of that application version to that environment. If you already have setup some Environment and Application in XL Deploy then the fields in the Deploy task also support auto complete to populate the list of available applications and environments as you start typing upto 3 letters. You can refer to this doc here. https://docs.xebialabs.com/xl-release/how-to/create-an-xl-deploy-task.html

#3

Thanks amit, yes this is how I’m setup. I actually had this working but uh not sure why it doesn’t now.

I always get a bit confused about how this works. xl-deploy has a url path for getting an artifact from artifactory, but I’m not sure how xl-release plugin creates the new deployment package complete with the proper url. It does seem to do it but not clear how.

#4

Unless I’m missing something I don’t think there is documentation that explains this relationship between the xl-release/xl-deploy plugin and xl-deploy

It’s not very clear how the artifact actually gets copied to xl-deploy and how xl-release/xl-deploy plugin operates on xl-deploy.

I’m guessing xl-release/xl-deploy plugin uses it’s variables to create the xl-deploy package yes? But how does it create the File Uri, and Credentials to pull the artifact down to xl-deploy?

#5

Hi Kelly,

As Amit mentioned, the XL Deploy: Deploy task would handle the deployment of a package that already exists in your XL Deploy instance, so you would not need to provide the file uri or credentials to pull from artifactory.

If you want to create a package in XL Deploy, you should use the XL Deploy: Create CI (version 8.5.0) or XL Deploy CI: Create CI (version 8.6.0) task to create the package + deployable in XL Deploy before referencing it in a XL Deploy: Deploy task. See https://docs.xebialabs.com/xl-release/how-to/xld-plugin.html#add-a-create-ci-task for reference. Do note that if you are creating a new package with multiple deployables, you would need to have a Create CI task for each of them (one for the package, and one for every deployable).

As for the body of the XML Descriptor of the Create CI task, you can use our REST API to get an existing CI in XL Deploy to get a sample of how it should be. The API in question is the GET repository/ci/{ID:.+} (https://docs.xebialabs.com/xl-deploy/8.5.x/rest-api/com.xebialabs.deployit.engine.api.RepositoryService.html#/repository/ci/{ID:.+}:GET).

1 Like