Automate with Jenkins

Hello everyone,
in an attempt to automate the depoly process from a development environment to a production environment through Jenkins, I am experiencing problems in exporting the zip as I currently do manually by the flowable-modeler.

The modeler for export calls “/flowable-modeler/app/rest/app-definitions/{modelId}/export?Version=${versionId}
I tried calling the same API, and I tried calling “/flowable-task/rest/app-definitions/{modelId}/export” to get the zip of the latest version.
But the answer doesn’t return any zip, and it’s the following:

<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js">
<!--<![endif]-->

<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta name="theme-color" content="#ffffff">

	<title>Flowable IDM</title>

	<link rel="apple-touch-icon" sizes="180x180" href="images/apple-touch-icon.png?v=Om5N75Y123">
	<link rel="icon" type="image/png" href="images/favicon-32x32.png?v=Om5N75Y123" sizes="32x32">
	<link rel="icon" type="image/png" href="images/favicon-16x16.png?v=Om5N75Y123" sizes="16x16">
	<link rel="manifest" href="manifest.json">
	<link rel="mask-icon" href="images/safari-pinned-tab.svg?v=Om5N75Y123" color="#506d75">
	<link rel="shortcut icon" href="favicon.ico?v=Om5N75Y123">

	<!-- build:css styles/common/3thparty.css -->
	<link href="styles/common/bootstrap.min.css" rel="stylesheet">
	<link href="libs/nvd3_1.1.15-beta/nvd3.min.css" rel="stylesheet">
	<link href="libs/bootstrap-daterangepicker_1.3.7/daterangepicker-bs3.css" rel="stylesheet">
	<!-- endbuild -->

	<!-- build:css styles/style.css -->
	<link href="styles/style-idm.css" rel="stylesheet">
	<!-- endbuild -->

	<!-- build:css styles/common/style.css -->
	<link href="styles/common/style.css" rel="stylesheet">
	<!-- endbuild -->

</head>

<body ng-app="flowableApp" ng-cloak>

	<div ng-if="!onLogin">

		<div class="navbar navbar-fixed-top navbar-inverse" role="navigation" id="main-nav" ng-show="authenticated">
			<div class="fixed-container">
				<div class="navbar-header">
					<a ng-click="backToLanding()" class="landing-logo" ng-if="account != null && account != undefined"
						title="{{'IDM.GENERAL.MAIN-TITLE' | translate}}">
						<img ng-src="{{appResourceRoot}}images/flowable-logo.png" ng-srcset="{{appResourceRoot}}images/flowable-logo.png 1x, {{appResourceRoot}}images/flowable-logo@2x.png 2x">
	                </a>
						<ul class="nav navbar-nav">
							<li ng-repeat="item in mainNavigation" id="{{item.id}}"
								ng-show="(authenticated && !item.unauthenticated) || (item.unauthenticated && !authenticated)"
								ng-class="{'active': item.id == mainPage.id}">
								<a ng-click="setMainPage(item)">{{item.title | translate}}</a>
							</li>
						</ul>
				</div>
				<div class="pull-right">
					<div class="dropdown btn-group btn-group-sm">
						<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">{{account.firstName}} {{account.lastName}}
	                        <span class="glyphicon glyphicon-chevron-down" style="font-size: 10px" aria-hidden="true"></span>
	                    </button>
						<ul class="dropdown-menu pull-right">
							<li><a ng-click="logout()" translate="IDM.GENERAL.ACTION.LOGOUT"></a></li>
						</ul>
					</div>
				</div>
			</div>
		</div>


		<div class="wrapper clearfix" ng-view="" ng-cloak ng-style="{height: window.height + 'px'}">
		</div>

	</div>

	<div ng-if="onLogin">
		<div class="alert-wrapper" ng-cloak>
			<div class="alert {{alerts.current.type}}" ng-show="alerts.current" ng-click="dismissAlert()">
				<span>{{alerts.current.message}}</span>
				<span class="badge" ng-show="alerts.queue.length">{{alerts.queue.length + 1}}</span>
			</div>
		</div>
		<div ng-view="" ng-cloak ng-style="{height: window.height + 'px'}"></div>
	</div>

	<!--[if lt IE 9]>
    <div class="unsupported-browser">
        <p class="alert error">You are using an unsupported browser. Please upgrade your browser in order to use the editor.</p>
    </div>
    <![endif]-->

	<!--[if lt IE 9]>
    <script src="libs/es5-shim-15.3.4.5/es5-shim.js"></script>
    <script src="libs/json3_3.2.6/lib/json3.min.js"></script>
    <![endif]-->

	<!-- 3rd party libs -->
	<script src="libs/jquery_1.11.0/jquery.min.js"></script>
	<script src="libs/jquery-ui-1.10.3.custom.min.js"></script>

	<script src="libs/angular_1.3.13/angular.js"></script>
	<script src="libs/angular-animate_1.3.13/angular-animate.min.js"></script>
	<script src="libs/bootstrap_3.1.1/js/bootstrap.min.js"></script>
	<script src="libs/angular-resource_1.3.13/angular-resource.min.js"></script>
	<script src="libs/angular-cookies_1.3.13/angular-cookies.min.js"></script>
	<script src="libs/angular-sanitize_1.3.13/angular-sanitize.min.js"></script>
	<script src="libs/angular-route_1.3.13/angular-route.min.js"></script>
	<script src="libs/angular-translate_2.15.1/angular-translate.min.js"></script>
	<script src="libs/angular-translate-storage-cookie/angular-translate-storage-cookie.js"></script>
	<script src="libs/angular-translate-loader-static-files/angular-translate-loader-static-files.js"></script>
	<script src="libs/angular-strap_2.1.6/angular-strap.min.js"></script>
	<script src="libs/angular-strap_2.1.6/angular-strap.tpl.min.js"></script>
	<script src="libs/ng-file-upload/ng-file-upload-shim.min.js"></script>
	<script src="libs/ng-file-upload/ng-file-upload.min.js"></script>
	<script src="libs/ui-grid_3.0.0/ui-grid.min.js" type="text/javascript"></script>
	<script src="libs/autofill-events_1.0.0/autofill-event.js"></script>
	<script src="libs/momentjs_2.18.1/momentjs.min.js"></script>

	<!-- Configuration -->
	<script src="scripts/app-cfg.js?v=2"></script>

	<!-- build:js scripts/scripts.js -->
	<script src="scripts/idm-app.js"></script>
	<script src="scripts/idm-service.js"></script>
	<script src="scripts/idm-user-mgmt-controller.js"></script>
	<script src="scripts/idm-group-mgmt-controller.js"></script>
	<script src="scripts/idm-profile-mgmt-controller.js"></script>
	<script src="scripts/idm-privilege-mgmt-controller.js"></script>
	<script src="scripts/common/services/authentication-service.js"></script>
	<script src="scripts/common/directives.js"></script>
	<script src="scripts/common/providers-config.js"></script>
	<script src="scripts/common/services/user-service.js"></script>
	<script src="scripts/common/services/group-service.js"></script>
	<script src="scripts/controllers.js"></script>

	<!-- endbuild -->

	<!-- Integration extensions -->
	<script src="scripts/resource-loader.js?v=2" app="landing"></script>

</body>

</html>

How can I do to get the same result as manual export and manual import but automated with Jenkins?

can someone help me?

Hey @digenn,

The API you are using is not a public API which is meant to be consumed in the way you are consuming it. That endpoint is CSRF protected and required authentication via the Flowable IDM application. There is no API which has the functionality you need.

You can provide a PR that would expose this in the Flowable Modeler REST API.

Cheers,
Filip