Skip to content

jerome-benoit/cloud-mta-build-tool

This branch is 12 commits ahead of, 21 commits behind SAP/cloud-mta-build-tool:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

c5c03c7 · Jul 2, 2024
Jul 2, 2024
Jul 21, 2023
Jul 21, 2023
Aug 6, 2020
Aug 9, 2023
Oct 17, 2023
Jul 2, 2024
Oct 17, 2023
Oct 17, 2023
Jul 2, 2024
Jun 3, 2024
Jul 4, 2023
Aug 9, 2023
Jan 19, 2020
Jun 2, 2022
Jan 19, 2020
Jul 2, 2024
Jul 7, 2021
Jul 2, 2024
Jan 19, 2020
Nov 6, 2023
Jul 2, 2024
Oct 27, 2022
Jan 19, 2020
Nov 22, 2023
Nov 22, 2023
Aug 9, 2023
Nov 22, 2023
Jan 19, 2020
Jan 19, 2020
Aug 9, 2023
Jul 2, 2024

Repository files navigation

MBT logo


CircleCI Go Report Card CII Best Practices Coverage Status Beta GitHub stars dependabot REUSE status

Description

Multi-Target Application

Before using this package, make sure that you are familiar with the multi-target application concept and terminology. For background and detailed information, see the Multi-Target Application Model guide.

The Cloud MTA Build Tool Overview

The Cloud MTA Build Tool is a standalone command-line tool that builds a deployment-ready multitarget application (MTA) archive .mtar file from the artifacts of an MTA project according to the project’s MTA development descriptor (mta.yaml file) or from module build artifacts according to the MTA deployment descriptor (mtad.yaml file). Also, it provides commands for running intermediate build process steps; for example, the mta.yaml file validations, building a single module according to the configurations in the development descriptor, generating the deployment descriptor, and so on.

For more information, see the Cloud MTA Build Tool user guide

Demo

This demo shows the basic usage of the tool. For more advanced scenarios, follow the documentation.

Install

For convenience the mbt executable is available via npmjs.com so consumers using a nodejs runtime can simply run:

It is also possible to download and "install" the mbt executable via github releases.

The Cloud MTA Build Tool Images

We supply several images for CI environment containing the Cloud MTA Build Tool. The images are hosted at Github container registry and also at Docker Hub registry.

The images are built from a template docker file which depends on most common technologies (Java and Node) as follows:

And so on.

How to pull the images

You should choose the relevant image type from following list to replace the <TYPE> template in the command/FROM according your MTA project technologies:

  • java8-node14
  • java8-node16
  • java8-node18
  • java11-node14
  • java11-node16
  • java11-node18
  • java17-node14
  • java17-node16
  • java17-node18
  • java19-node14
  • java19-node16
  • java19-node18

From the command line:

$ docker pull devxci/mbtci-<TYPE>:latest

or

$ docker pull ghcr.io/sap/mbtci-<TYPE>:latest

From Dockerfile as a base image:

FROM devxci/mbtci-<TYPE>:latest

or

FROM ghcr.io/sap/mbtci-<TYPE>:latest

E.g. if your MTA project uses Java 11 and Node 14 then you should pull the relevant image as follows:

From the command line:

$ docker pull devxci/mbtci-java11-node14:latest

or

$ docker pull ghcr.io/sap/mbtci-java11-node14:latest

From Dockerfile as a base image:

FROM devxci/mbtci-java11-node14:latest

or

FROM ghcr.io/sap/mbtci-java11-node14:latest
How to use the images

You should choose the relevant image type from following list to replace the <TYPE> template in the command according your MTA project technologies:

  • java8-node14
  • java8-node16
  • java8-node18
  • java11-node14
  • java11-node16
  • java11-node18
  • java17-node14
  • java17-node16
  • java17-node18
  • java19-node14
  • java19-node16
  • java19-node18

On a Linux/Darwin machine you can run:

$ docker run -it --rm -v "$(pwd)/[proj-releative-path]:/project" devxci/mbtci-<TYPE>:latest mbt build -p=cf -t [target-folder-name]

This will build an mtar file for SAP Cloud Platform (Cloud Foundry). The folder containing the project needs to be mounted into the image at /project.

Note: The parameter -p=cf can be omitted as the build for cloud foundry is the default build, this is an example of the MBT build parameters, for further commands see MBT docs.

How to build the images

To build the images, you should run the following shell script:

$ sh ./scripts/build_image <JAVA_VERSION> <NODE_VERSION> <MBT_VERSION>

E.g. to build the image for Java 11 and Node 14 you should run the following command:

$ sh ./scripts/build_image 11.0.17 14.20.1 1.2.20

The Cloud MTA Build Tool published docker images on docker hub with a pre-configured set of runtime tools (nodejs/java/maven/...).

Node.js v10 and lower minor version of Node.js v11, v12, v13 /ECMAScript modules

More and more npm packages use ECMAScript modules instead of commonJS, for ECMAScript modules are the official standard format to package JavaScript code for reuse. From v1.2.25, we use axios instead of binwrap(which has moderate severity vulnerabilities) to download binary files, but axios only supports ECMAScript modules and can't work on Node.js v10 and lower minor version of Node.js v11, v12, v13. The axios can work on latest version of Node.js v11.15, v12.22, v13.14. So since v1.2.25, mbt will not support Node.js v10 and lower versions, including lower minor version of Node.js v11, v12, v13.

License

Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file. Please note that Docker images can contain other software which may be licensed under different licenses. This License file is also included in the Docker image. For any usage of built Docker images please make sure to check the licenses of the artifacts contained in the images.

Contributions

Contributions are greatly appreciated. If you want to contribute, follow the guidelines.

Support

Please follow our issue template on how to report an issue.

About

Multi-Target Application (MTA) build tool for Cloud Applications https://sap.github.io/cloud-mta-build-tool

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 97.7%
  • Other 2.3%