You've already forked sap-jenkins-library
mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-09-16 09:26:22 +02:00
Update mta yaml file to support cloud MBT mtar deploy to neo. (#1198)
* Update schema and hcp deployer version in mta.yaml file * Add name parameter in mta yaml file * Rename template_mta.yml to template_mta.yaml * Fix indentation Co-authored-by: Oliver Feldmann <oliver.feldmann@sap.com> Co-authored-by: Marcus Holl <marcus.holl@sap.com>
This commit is contained in:
committed by
GitHub
parent
317716cf64
commit
38237eb97b
@@ -1,16 +1,17 @@
|
||||
_schema-version: "2.0.0"
|
||||
_schema-version: "3.1"
|
||||
ID: "<Id of your MTA>"
|
||||
version: <version number of your application>
|
||||
|
||||
parameters:
|
||||
hcp-deployer-version: "1.0.0"
|
||||
hcp-deployer-version: "1.1.0"
|
||||
|
||||
modules:
|
||||
- name: "<Name of your Fiori application>"
|
||||
type: html5
|
||||
path: .
|
||||
parameters:
|
||||
version: <version number of your application>-${timestamp}
|
||||
version: <version number of your application>-${timestamp}
|
||||
name: "<Name of your Fiori application>"
|
||||
build-parameters:
|
||||
builder: grunt
|
||||
build-result: dist
|
@@ -21,7 +21,7 @@ class MtaUtils {
|
||||
|
||||
def dataFromJson = script.readJSON file: srcPackageJson
|
||||
|
||||
def mtaData = script.readYaml text: script.libraryResource('template_mta.yml')
|
||||
def mtaData = script.readYaml text: script.libraryResource('template_mta.yaml')
|
||||
|
||||
if(!dataFromJson.name) throw new AbortException("'name' not set in the given package.json.")
|
||||
mtaData['ID'] = dataFromJson.name
|
||||
@@ -29,6 +29,7 @@ class MtaUtils {
|
||||
if(!dataFromJson.version) throw new AbortException("'version' not set in the given package.json.")
|
||||
mtaData['version'] = dataFromJson.version
|
||||
mtaData['modules'][0]['parameters']['version'] = "${dataFromJson.version}-\${timestamp}"
|
||||
mtaData['modules'][0]['parameters']['name'] = applicationName
|
||||
|
||||
mtaData['modules'][0]['name'] = applicationName
|
||||
|
||||
|
@@ -18,7 +18,7 @@ import util.Rules
|
||||
|
||||
class MtaUtilsTest extends BasePiperTest {
|
||||
private static srcPackageJson = 'test/resources/MtaUtils/package.json'
|
||||
private static mtaTemplate = 'resources/template_mta.yml'
|
||||
private static mtaTemplate = 'resources/template_mta.yaml'
|
||||
private static data
|
||||
private static String generatedFile
|
||||
private static String targetMtaDescriptor
|
||||
@@ -68,6 +68,7 @@ class MtaUtilsTest extends BasePiperTest {
|
||||
assert data.version == '1.0.3'
|
||||
assert data.modules.name[0] == 'testAppName'
|
||||
assert data.modules.parameters.version[0] == '1.0.3-${timestamp}'
|
||||
assert data.modules.parameters.name[0] == 'testAppName'
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Reference in New Issue
Block a user