Skip to content

Commit 82de870

Browse files
authored
Release btpsa-1.3.0 (SAP-samples#410)
1 parent 290220c commit 82de870

File tree

1,575 files changed

+7173
-5922
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,575 files changed

+7173
-5922
lines changed

.github/workflows/build-quality-check.yml

+7-11
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
name: Build Python Project and Docker Image
22

3-
on:
3+
on:
44
push:
5-
branches:
6-
- main
5+
branches: ["main", "dev"]
76
pull_request:
8-
types: [opened, edited, synchronize, reopened]
9-
branches:
10-
- main
7+
types: [opened, edited, synchronize, reopened]
8+
branches: ["main", "dev"]
119
workflow_dispatch:
1210

1311
env:
@@ -16,15 +14,13 @@ env:
1614

1715
jobs:
1816
build:
19-
2017
runs-on: ubuntu-latest
2118
permissions:
2219
contents: read
2320
packages: write
2421
strategy:
2522
matrix:
26-
# Currently only support for Python 3.9, maybe add more later
27-
python-version: [3.9]
23+
python-version: ["3.10"]
2824

2925
steps:
3026
- uses: actions/checkout@v3
@@ -58,12 +54,12 @@ jobs:
5854
with:
5955
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
6056
- name: Build Docker image
61-
uses: docker/build-push-action@v3.2.0
57+
uses: docker/build-push-action@v3.3.0
6258
with:
6359
context: .
6460
file: ./config/Dockerfile
6561
build-args: |
6662
BTPSA_VERSION_GIT_ARG=${{ github.sha }}
6763
push: false
6864
tags: ${{ steps.meta.outputs.tags }}
69-
labels: ${{ steps.meta.outputs.labels }}
65+
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/codeql-analysis.yml

+30-31
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ name: "CodeQL"
1313

1414
on:
1515
push:
16-
branches: [ "main" ]
16+
branches: ["main", "dev"]
1717
pull_request:
1818
# The branches below must be a subset of the branches above
19-
branches: [ "main" ]
19+
branches: ["main", "dev"]
2020
schedule:
21-
- cron: '35 2 * * 3'
21+
- cron: "35 2 * * 3"
2222

2323
jobs:
2424
analyze:
@@ -32,41 +32,40 @@ jobs:
3232
strategy:
3333
fail-fast: false
3434
matrix:
35-
language: [ 'python', 'javascript']
35+
language: ["python", "javascript"]
3636
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
3737
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
3838

3939
steps:
40-
- name: Checkout repository
41-
uses: actions/checkout@v3
40+
- name: Checkout repository
41+
uses: actions/checkout@v3
4242

43-
# Initializes the CodeQL tools for scanning.
44-
- name: Initialize CodeQL
45-
uses: github/codeql-action/init@v2
46-
with:
47-
languages: ${{ matrix.language }}
48-
# If you wish to specify custom queries, you can do so here or in a config file.
49-
# By default, queries listed here will override any specified in a config file.
50-
# Prefix the list here with "+" to use these queries and those in the config file.
51-
52-
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
53-
# queries: security-extended,security-and-quality
43+
# Initializes the CodeQL tools for scanning.
44+
- name: Initialize CodeQL
45+
uses: github/codeql-action/init@v2
46+
with:
47+
languages: ${{ matrix.language }}
48+
# If you wish to specify custom queries, you can do so here or in a config file.
49+
# By default, queries listed here will override any specified in a config file.
50+
# Prefix the list here with "+" to use these queries and those in the config file.
5451

55-
56-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
57-
# If this step fails, then you should remove it and run the build manually (see below)
58-
- name: Autobuild
59-
uses: github/codeql-action/autobuild@v2
52+
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
53+
# queries: security-extended,security-and-quality
6054

61-
# ℹ️ Command-line programs to run using the OS shell.
62-
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
55+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
56+
# If this step fails, then you should remove it and run the build manually (see below)
57+
- name: Autobuild
58+
uses: github/codeql-action/autobuild@v2
6359

64-
# If the Autobuild fails above, remove it and uncomment the following three lines.
65-
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
60+
# ℹ️ Command-line programs to run using the OS shell.
61+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
6662

67-
# - run: |
68-
# echo "Run, Build Application using script"
69-
# ./location_of_script_within_repo/buildscript.sh
63+
# If the Autobuild fails above, remove it and uncomment the following three lines.
64+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
7065

71-
- name: Perform CodeQL Analysis
72-
uses: github/codeql-action/analyze@v2
66+
# - run: |
67+
# echo "Run, Build Application using script"
68+
# ./location_of_script_within_repo/buildscript.sh
69+
70+
- name: Perform CodeQL Analysis
71+
uses: github/codeql-action/analyze@v2

.github/workflows/docker-dev-build-and-push.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ jobs:
2424

2525
- name: Set up Docker Buildx
2626
uses: docker/setup-buildx-action@v2
27+
with:
28+
driver-opts: |
29+
image=moby/buildkit:v0.10.6
2730
#with:
2831
# buildkitd-flags: --debug
2932

@@ -41,7 +44,7 @@ jobs:
4144
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
4245

4346
- name: Build Docker image
44-
uses: docker/build-push-action@v3.2.0
47+
uses: docker/build-push-action@v3.3.0
4548
with:
4649
context: .
4750
platforms: linux/amd64,linux/arm64

.github/workflows/docker-release-build-and-push.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: Build and Push Docker Image (RELEASE)
33
on:
44
release:
55
types: [published]
6+
workflow_dispatch:
67

78
env:
89
REGISTRY: ghcr.io
@@ -24,6 +25,9 @@ jobs:
2425

2526
- name: Set up Docker Buildx
2627
uses: docker/setup-buildx-action@v2
28+
with:
29+
driver-opts: |
30+
image=moby/buildkit:v0.10.6
2731
#with:
2832
# buildkitd-flags: --debug
2933

@@ -41,7 +45,7 @@ jobs:
4145
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
4246

4347
- name: Build Docker image
44-
uses: docker/build-push-action@v3.2.0
48+
uses: docker/build-push-action@v3.3.0
4549
with:
4650
context: .
4751
platforms: linux/amd64,linux/arm64

.github/workflows/links-watcher-cron.yml

+23-16
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,31 @@ name: Periodic Link Checker
22

33
on:
44
schedule:
5-
- cron: '0 0 * * *'
5+
- cron: "0 0 * * *"
66
workflow_dispatch:
77

88
permissions:
9-
contents: read
10-
pull-requests: write
9+
contents: read
10+
issues: write
1111

1212
jobs:
13-
link-checker:
14-
runs-on: ubuntu-latest
15-
steps:
16-
- name: 'Checkout source code'
17-
uses: actions/checkout@v3
18-
- name: Link Checker
19-
id: lychee
20-
uses: lycheeverse/[email protected]
21-
with:
22-
fail: true
23-
args: --verbose --no-progress --exclude-mail --exclude-loopback .
24-
env:
25-
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
13+
link-checker:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: "Checkout source code"
17+
uses: actions/checkout@v3
18+
- name: Link Checker
19+
id: lychee
20+
uses: lycheeverse/[email protected]
21+
with:
22+
args: --verbose --no-progress --max-concurrency 2 --exclude-mail --exclude-loopback './**/*.md'
23+
output: ./lychee/out.md
24+
env:
25+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
26+
- name: Create issue when fail
27+
uses: peter-evans/create-issue-from-file@v4
28+
if: ${{ steps.lychee.outputs.exit_code }} != 0
29+
with:
30+
title: Link Checker Report
31+
content-filepath: ./lychee/out.md
32+
labels: broken link, automated issue

.github/workflows/stage-integration-test-full.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ jobs:
3232
- uses: actions/checkout@v3
3333
- name: Set up Docker Buildx
3434
uses: docker/setup-buildx-action@v2
35+
with:
36+
driver-opts: |
37+
image=moby/buildkit:v0.10.6
3538
- name: Log in to the Container registry
3639
uses: docker/login-action@v2
3740
with:
@@ -45,7 +48,7 @@ jobs:
4548
images: ${{ env.REGISTRY }}/${{ github.repository }}/${{ env.IMAGE_NAME }}
4649
- name: Build Docker image
4750
id: dockerbuild
48-
uses: docker/build-push-action@v3.2.0
51+
uses: docker/build-push-action@v3.3.0
4952
with:
5053
context: .
5154
file: ./config/Dockerfile

.github/workflows/stage-integration-test-slim.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ jobs:
3232
- uses: actions/checkout@v3
3333
- name: Set up Docker Buildx
3434
uses: docker/setup-buildx-action@v2
35+
with:
36+
driver-opts: |
37+
image=moby/buildkit:v0.10.6
3538
- name: Log in to the Container registry
3639
uses: docker/login-action@v2
3740
with:
@@ -45,7 +48,7 @@ jobs:
4548
images: ${{ env.REGISTRY }}/${{ github.repository }}/${{ env.IMAGE_NAME }}
4649
- name: Build Docker image
4750
id: dockerbuild
48-
uses: docker/build-push-action@v3.2.0
51+
uses: docker/build-push-action@v3.3.0
4952
with:
5053
context: .
5154
file: ./config/Dockerfile

.github/workflows/update-metadata-artifacts.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
- name: Setup Python
6060
uses: actions/setup-python@v4
6161
with:
62-
python-version: "3.9"
62+
python-version: "3.10"
6363

6464
- name: Install dependencies for JSON schema generation
6565
run: |

.lycheeignore

+1
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ https://api.reuse.software/badge/github.com/SAP-samples/btp-setup-automator
33
https://api.reuse.software/info/github.com/SAP-samples/btp-setup-automator
44
https://github.wdf.sap.corp*
55
https://cloudintegration.int.sap.eu2.hana.ondemand.com/package/SAPTaskCenter*
6+
https://github.com/SAP-samples/btp-setup-automator/pull/xxx

.vscode/settings.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"python.pythonPath": "/usr/local/bin/python3",
33
"python.linting.enabled": true,
4+
"python.formatting.provider": "black",
45
"python.linting.flake8Enabled": true,
56
"python.linting.flake8Args": ["--ignore=E501,F405,W504"],
67
"python.linting.pylintEnabled": false

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Started as a small helper for basic SAP BTP setups the tool has grown since its
2727

2828
- [Overview](./docs/OVERVIEW.md)
2929
- [Basic setup](./docs/BASIC_SETUP.md) incl. the prerequisites
30-
- [Detailed walk-though](./docs/README.md)
30+
- [Detailed walk-through](./docs/README.md)
3131
- [Detailed configuration](./docs/SAMPLECONFIG.md)
3232
- [Overview of btpsa parameters](./docs/PARAMETERS_OVERVIEW.md)
3333
- [FAQ](./docs/FAQ.md)

config/Dockerfile

+6-6
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ENV TOOLS_URL=tools.hana.ondemand.com
1111
ENV CPCLI_URL=cpcli.cf.eu10.hana.ondemand.com
1212

1313
## Install necessary packages to donwload and install tools
14-
RUN echo "http://dl-4.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \
14+
RUN echo "http://dl-4.alpinelinux.org/alpine/latest-stable/community" >> /etc/apk/repositories \
1515
&& apk update \
1616
&& apk upgrade \
1717
&& apk add --no-cache curl jq \
@@ -20,7 +20,7 @@ RUN echo "http://dl-4.alpinelinux.org/alpine/edge/community" >> /etc/apk/reposit
2020
##########################################################################################
2121
# Retrieve the CloudFoundry CLI
2222
##########################################################################################
23-
FROM cloudfoundry/cli:8.4.0 as cf_cli
23+
FROM cloudfoundry/cli:8.5.0 as cf_cli
2424

2525
##########################################################################################
2626
## Retrieve the SAP btp CLI
@@ -32,7 +32,7 @@ FROM base AS btp_cli
3232
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
3333
WORKDIR /tmp/tools
3434
#RUN BTP_CLI_VERSION="$(curl --silent --url "https://$CPCLI_URL/actuator/info" | jq --raw-output '.app.version')" \
35-
RUN BTP_CLI_VERSION="2.24.0" \
35+
RUN BTP_CLI_VERSION="2.33.0" \
3636
&& curl --fail --silent --location --cookie eula_3_1_agreed="$TOOLS_URL/developer-license-3_1.txt" \
3737
--url "https://$TOOLS_URL/additional/btp-cli-$ARCH-$BTP_CLI_VERSION.tar.gz" \
3838
| tar -xzf - --strip-components 1 "$ARCH/btp"
@@ -43,7 +43,7 @@ RUN BTP_CLI_VERSION="2.24.0" \
4343
FROM base AS mta_build_tool
4444
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
4545
WORKDIR /tmp/tools
46-
RUN MBT_VERSION="1.2.18" \
46+
RUN MBT_VERSION="1.2.21" \
4747
&& curl --fail --silent --location --url "https://github.com/SAP/cloud-mta-build-tool/releases/download/v${MBT_VERSION}/cloud-mta-build-tool_${MBT_VERSION}_Linux_amd64.tar.gz" \
4848
| tar -xzf - mbt
4949

@@ -97,7 +97,7 @@ ARG BTPSA_VERSION_GIT_ARG=default
9797
##################################################################################################################################################
9898
# Now putting all pieces together
9999
##################################################################################################################################################
100-
FROM python:3.9-alpine3.16 AS final_build
100+
FROM python:3.10-alpine3.16 AS final_build
101101
ENV USERNAME=user
102102
ENV HOME_FOLDER /home/$USERNAME
103103
ENV LIBS_FOLDER $HOME_FOLDER/libs
@@ -141,7 +141,7 @@ RUN adduser \
141141
# - currently (Jun 7th, 2022) it's no longer possible to install CDS
142142
# - to be determined what the root cause is (seems related to deprecation of v1.x Cloud SDK)
143143
##########################################################################################
144-
&& npm install -g @sap/cds-dk --allow-root \
144+
&& npm install -g @sap/cds-dk@6.4.0 --allow-root \
145145
&& npm cache clean --force \
146146
##########################################################################################
147147
# Add user to sudo user

config/python/requirements.txt

+3-4
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ attrs==22.2.0
22
blessed==1.19.1
33
certifi==2022.12.7
44
charset-normalizer==2.1.1
5-
flake8==6.0.0
65
idna==3.4
7-
inquirer==3.1.1
6+
inquirer==3.1.2
87
Jinja2==3.1.2
98
jsonschema==4.17.3
109
MarkupSafe==2.1.1
@@ -16,9 +15,9 @@ pyrsistent==0.19.3
1615
python-dateutil==2.8.2
1716
python-editor==1.0.4
1817
readchar==4.0.3
19-
requests==2.28.1
18+
requests==2.28.2
2019
six==1.16.0
2120
urllib3==1.26.14
22-
wcwidth==0.2.5
21+
wcwidth==0.2.6
2322
pyyaml==6.0
2423
xmltodict==0.13.0

config/templates/libs/BTPSA-USECASE.json

+6
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,12 @@
333333
"description": "parameter file for the service in case you want to provide the parameters via a file",
334334
"title": "parameter file for the service"
335335
},
336+
"skipTrustSetupForXSUAA": {
337+
"type": "boolean",
338+
"default": false,
339+
"description": "skip the trust setup to an IdP for XSUAA. Only relevant for the plan apiaccess!",
340+
"title": "skip trust setup to IdP for XSUAA (plan apiaccess)"
341+
},
336342
"statusResponse": {
337343
"type": "object",
338344
"description": "information that is available only durng the execution of the script (should not be set in the usecase.json file)",

docs/FAQ.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ You can now download the `kubeconfig`file either via the Kyma dashboard or via t
252252
* Open the Service Account created by you in the previous step.
253253
* Download kubeconfig and store it
254254

255-
* Via the script
255+
* Via the script
256256

257257
* If using Mac set the execute permission on the file `templates/kubeconfig-sa-mac.sh` and run it:
258258

0 commit comments

Comments
 (0)