
Jenkins.io is a DevOps tool for continuous integration and delivery workflows. It manages and controls several stages of the software delivery process, including build, documentation, automated testing, packaging, and static code analysis.
While we don’t have an official Jenkins plugin – as it is not the most recommended way to handle Jenkins at scale – you can use the following reference code that uses httpRequest Jenkins standard plugin and our Upload API to easily deploy your apps from Jenkins into Applivery, including all the repository metadata.
stage('Applivery Upload') {
def response = httpRequest(
url: 'https://upload.applivery.io/v1/integrations/builds',
httpMode: 'POST',
consoleLogResponseBody: true,
wrapAsMultipart: true, // Send as multipart/form-data
customHeaders: [
[
maskValue: true,
name: 'Authorization',
value: "Bearer ${env.APPLIVERY_TOKEN}"
]
],
formData: [
[
name: 'build',
fileName: 'app.ipa',
uploadFile: './app.ipa',
contentType: 'application/octet-stream'
],
[name: 'versionName', value: 'My awesome app version'],
[name: 'tags', value: 'tag1, tag2, tag3'],
[name: 'changelog', value: 'Bug fixing'],
[name: 'notifyCollaborators', value: 'false'],
[name: 'notifyEmployees', value: 'false'],
[name: 'notifyMessage', value: 'Enjoy the App'],
[name: 'notifyLanguage', value: 'en'],
[name: 'filter[0][0]', value: 'group1'],
[name: 'filter[0][1]', value: 'group2'],
[name: 'filter[1][0]', value: 'group3'],
[name: 'deployer.name', value: 'Custom CI Platform'],
[name: 'deployer.info.commitMessage', value: 'Fixed issue 123'],
[name: 'deployer.info.commit', value: 'f52ace0'],
[name: 'deployer.info.branch', value: 'develop'],
[name: 'deployer.info.tag', value: 'RC-1'],
[name: 'deployer.info.triggerTimestamp', value: '1558359012580'],
[name: 'deployer.info.buildUrl', value: 'http://www.applivery.io/build/73'],
[name: 'deployer.info.ciUrl', value: 'http://www.applivery.io/ci'],
[name: 'deployer.info.repositoryUrl', value: 'https://github.com/applivery/applivery-ios-sdk'],
[name: 'deployer.info.buildNumber', value: '173']
]
)
echo "response: ${response}"
}