mirror of
https://github.com/SAP/jenkins-library.git
synced 2026-06-19 22:58:55 +02:00
Document new sdk config location (#1228)
This commit is contained in:
@@ -2,9 +2,6 @@
|
||||
|
||||
Configure your project through a yml-file, which is located at `.pipeline/config.yml` in the **master branch** of your source code repository.
|
||||
|
||||
!!! note "Cloud SDK Pipeline"
|
||||
Cloud SDK Pipelines are configured in a file called `pipeline_config.yml`. See [SAP Cloud SDK Pipeline Configuration Docs](https://github.com/SAP/cloud-s4-sdk-pipeline/blob/master/configuration.md).
|
||||
|
||||
Your configuration inherits from the default configuration located at [https://github.com/SAP/jenkins-library/blob/master/resources/default_pipeline_environment.yml](https://github.com/SAP/jenkins-library/blob/master/resources/default_pipeline_environment.yml).
|
||||
|
||||
!!! caution "Adding custom parameters"
|
||||
|
||||
@@ -56,7 +56,7 @@ In any case, please also consult the [documentation of the pipeline configuratio
|
||||
|
||||
### Build Tool Independent Requirements
|
||||
|
||||
In order to run in the pipeline your project has to include the following two files in the root folder: `Jenkinsfile` and `pipeline_config.yml`.
|
||||
In order to run in the pipeline your project has to include the following two files in the root folder: `Jenkinsfile` and `.pipeline/config.yml`.
|
||||
You can copy both files from this [github repository](https://github.com/SAP/cloud-s4-sdk-pipeline/blob/master/archetype-resources).
|
||||
There are two variants of the configuration file.
|
||||
Please pick the corresponding version for your deployment target and rename it properly.
|
||||
@@ -69,7 +69,7 @@ The required format of the test result report is the JUnit format as an `.xml` f
|
||||
The code coverage report can be published as html report and in the cobertura format.
|
||||
The cobertura report as html report has to be stored in the directory `./s4hana_pipeline/reports/coverage-reports/frontend-unit/report-html/ut/` as an `index.html` file.
|
||||
These coverage reports will then be published in Jenkins.
|
||||
Furthermore, if configured in the `pipeline_config.yml`, the pipeline ensures the configured level of code coverage.
|
||||
Furthermore, if configured in the `.pipeline/config.yml`, the pipeline ensures the configured level of code coverage.
|
||||
|
||||
In MTA projects Frontend Unit Tests are executed for every module of type `html5`.
|
||||
|
||||
@@ -121,17 +121,17 @@ If you have multiple npm packages with unit tests the names of the report files
|
||||
|
||||
#### End-to-End Tests
|
||||
|
||||
This stage is only executed if you configured it in the file `pipeline_config.yml`.
|
||||
This stage is only executed if you configured it in the file `.pipeline/config.yml`.
|
||||
|
||||
The command `npm run ci-e2e` will be executed in this stage.
|
||||
The url which is defined as `appUrl` in the file `pipeline_config.yml` will be passed as argument named `launchUrl` to the tests.
|
||||
The url which is defined as `appUrl` in the file `.pipeline/config.yml` will be passed as argument named `launchUrl` to the tests.
|
||||
This can be reproduced locally by executing:
|
||||
|
||||
```
|
||||
npm run ci-e2e -- --launchUrl=https://path/to/your/running/application
|
||||
```
|
||||
|
||||
The credentials also defined in the file `pipeline_config.yml` will be available during the test execution as environment variables named `e2e_username` and `e2e_password`.
|
||||
The credentials also defined in the file `.pipeline/config.yml` will be available during the test execution as environment variables named `e2e_username` and `e2e_password`.
|
||||
|
||||
The test results have to be stored in the folder `./s4hana_pipeline/reports/e2e` in the root directory.
|
||||
The required format of the test result report is the Cucumber format as an `.json` file, or the JUnit format as an xml file.
|
||||
@@ -141,7 +141,7 @@ The user is responsible to use a proper reporter for generating the results.
|
||||
|
||||
#### Performance Tests
|
||||
|
||||
This stage is only executed if you configured it in the file `pipeline_config.yml`.
|
||||
This stage is only executed if you configured it in the file `.pipeline/config.yml`.
|
||||
|
||||
Performance tests can be executed using [JMeter](https://jmeter.apache.org/) or [Gatling](https://gatling.io/).
|
||||
|
||||
@@ -209,8 +209,8 @@ Make sure to check the _Include support for continuous delivery pipeline of SAP
|
||||
If you already created your project without this option, you'll need to copy and paste two files into the root directory of your project, and commit them to your git repository:
|
||||
|
||||
* [`Jenkinsfile`](https://github.com/SAP/cloud-s4-sdk-pipeline/blob/master/archetype-resources/Jenkinsfile)
|
||||
* [`pipeline_config.yml`](https://github.com/SAP/cloud-s4-sdk-pipeline/blob/master/archetype-resources/cf-pipeline_config.yml)
|
||||
* Note: The file must be named `pipeline_config.yml`, despite the different name of the file template
|
||||
* [`.pipeline/config.yml`](https://github.com/SAP/cloud-s4-sdk-pipeline/blob/master/archetype-resources/cf-pipeline_config.yml)
|
||||
* Note: The file must be named `.pipeline/config.yml`, despite the different name of the file template
|
||||
|
||||
Further constrains on the project structure (this is all correct in projects generated from the _SAP Cloud Platform Business Application_ SAP Web IDE Template):
|
||||
|
||||
@@ -227,6 +227,8 @@ In summary, the project structure should look like this:
|
||||
```
|
||||
.
|
||||
├── Jenkinsfile
|
||||
├── .pipeline
|
||||
│ └── config.yml
|
||||
├── app // web application, not required
|
||||
├── db // only if database module exists
|
||||
├── integration-tests
|
||||
@@ -235,7 +237,6 @@ In summary, the project structure should look like this:
|
||||
│ └── test
|
||||
├── mta.yaml
|
||||
├── package.json
|
||||
├── pipeline_config.yml
|
||||
├── pom.xml
|
||||
└── srv
|
||||
├── pom.xml
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Share Configuration Between Projects
|
||||
|
||||
SAP Cloud SDK Pipeline does not require any programming on the application developer's end, as the pipeline is centrally developed and maintained.
|
||||
The necessary configuration happens in the `pipeline_config.yml` file in the root directory of the application's repository.
|
||||
The necessary configuration happens in the `.pipeline/config.yml` file in the root directory of the application's repository.
|
||||
|
||||
For projects that are composed of multiple repositories (microservices), it might be desired to share the common configuration.
|
||||
To do that, create a YAML file which is accessible from your CI/CD environment and configure it in your project.
|
||||
@@ -16,7 +16,7 @@ It is important to ensure that the HTTP response body is proper YAML, as the pip
|
||||
|
||||
Anonymous read access to the `shared-config` repository is required.
|
||||
|
||||
The shared config is merged with the project's `pipeline_config.yml`.
|
||||
The shared config is merged with the project's `.pipeline/config.yml`.
|
||||
Note that the project's config takes precedence, so you can override the shared configuration in your project's local configuration.
|
||||
This might be useful to provide a default value that needs to be changed only in some projects.
|
||||
|
||||
|
||||
@@ -21,16 +21,22 @@ Make sure to check the Include support for continuous delivery pipeline of SAP C
|
||||
|
||||
This will generate a project which already includes a `Jenkinsfile`, and a `pipeline_config.yml` file.
|
||||
|
||||
!!! note "New location of pipeline configuration file"
|
||||
The SAP Cloud SDK Pipeline recently changed the default location for the configuration file from `pipeline_config.yml` to `.config/pipeline` to have a consistent user experience with other piper pipelines.
|
||||
For a limited amount of time starting with version v29 both locations can be used.
|
||||
In the following the configuration file is referenced by its new location.
|
||||
|
||||
|
||||
In case you already created your project without this option, you'll need to copy and paste two files into the root directory of your project, and commit them to your git repository:
|
||||
|
||||
* [`Jenkinsfile`](https://github.com/SAP/cloud-s4-sdk-pipeline/blob/master/archetype-resources/Jenkinsfile)
|
||||
* [`pipeline_config.yml`](https://github.com/SAP/cloud-s4-sdk-pipeline/blob/master/archetype-resources/cf-pipeline_config.yml)
|
||||
* Note: The file must be named `pipeline_config.yml`, despite the different name of the file template
|
||||
* [`.pipeline/config.yml`](https://github.com/SAP/cloud-s4-sdk-pipeline/blob/master/archetype-resources/cf-pipeline_config.yml)
|
||||
* Note: The file must be named `.pipeline/config.yml`, despite the different name of the file template
|
||||
|
||||
!!! note "Using the right project structure"
|
||||
This only applies to projects created based on the _SAP Cloud Platform Business Application_ template after September 6th 2019. They must comply with the structure which is described [here](https://github.com/SAP/cloud-s4-sdk-pipeline/blob/master/doc/pipeline/build-tools.md#sap-cloud-application-programming-model--mta).
|
||||
|
||||
If your project uses SAP HANA containers (HDI), you'll need to configure `createHdiContainer` and `cloudFoundry` in the `backendIntegrationTests` stage in your `pipeline_config.yml` file as documented [here](https://github.com/SAP/cloud-s4-sdk-pipeline/blob/master/configuration.md#backendintegrationtests)
|
||||
If your project uses SAP HANA containers (HDI), you'll need to configure `createHdiContainer` and `cloudFoundry` in the `backendIntegrationTests` stage in your `.pipeline/config.yml` file as documented [here](https://github.com/SAP/cloud-s4-sdk-pipeline/blob/master/configuration.md#backendintegrationtests)
|
||||
|
||||
Now, you'll need to push the code to a git repository.
|
||||
This is required because the pipeline gets your code via git.
|
||||
|
||||
Reference in New Issue
Block a user