* Docker image for xs deployment is locally available. Due to legal reasons, there is no pre-build Docker image. How to create the Docker image is explained [here][devops-docker-images-xs-deploy-readme].
This scenario requires additional files in your project and in the execution environment on your Jenkins instance.
For details see: [XSA developer quick start guide](https://help.sap.com/viewer/400066065a1b46cf91df0ab436404ddc/2.0.04/en-US/7f681c32c2a34735ad85e4ab403f8c26.html).
## Context
This scenario combines various different steps to create a complete pipeline.
In this scenario, we want to show how to build a Multitarget Application (MTA) and deploy the build result into an on-prem SAP HANA XS advances system. This document comprises the [mtaBuild](https://sap.github.io/jenkins-library/steps/mtaBuild/) and the [xsDeploy](https://sap.github.io/jenkins-library/steps/xsDeploy/) steps.
![This pipeline in Jenkins Blue Ocean](images/pipeline.jpg)
###### Screenshot: Build and Deploy Process in Jenkins
## Example
### Jenkinsfile
Following the convention for pipeline definitions, use a `Jenkinsfile`, which resides in the root directory of your development sources.
```groovy
@Library('piper-lib-os') _
pipeline {
agent any
stages {
stage("prepare") {
steps {
deleteDir()
checkout scm
setupCommonPipelineEnvironment script: this
}
}
stage('build') {
steps {
mtaBuild script: this
}
}
stage('deploy') {
steps {
xsDeploy script: this
}
}
}
}
```
### Configuration (`.pipeline/config.yml`)
This is a basic configuration example, which is also located in the sources of the project.
```yaml
steps:
mtaBuild:
buildTarget: 'XSA'
xsDeploy:
apiUrl: '<API_URL>' # e.g. 'https://example.org:30030'
# credentialsId: 'XS' omitted, 'XS' is the default