Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.

Commit

Permalink
Release btpsa-1.3.0 (#410)
Browse files Browse the repository at this point in the history
  • Loading branch information
lechnerc77 authored Jan 17, 2023
1 parent 290220c commit 82de870
Show file tree
Hide file tree
Showing 1,575 changed files with 7,173 additions and 5,922 deletions.
18 changes: 7 additions & 11 deletions .github/workflows/build-quality-check.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
name: Build Python Project and Docker Image

on:
on:
push:
branches:
- main
branches: ["main", "dev"]
pull_request:
types: [opened, edited, synchronize, reopened]
branches:
- main
types: [opened, edited, synchronize, reopened]
branches: ["main", "dev"]
workflow_dispatch:

env:
Expand All @@ -16,15 +14,13 @@ env:

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
# Currently only support for Python 3.9, maybe add more later
python-version: [3.9]
python-version: ["3.10"]

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -58,12 +54,12 @@ jobs:
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build Docker image
uses: docker/build-push-action@v3.2.0
uses: docker/build-push-action@v3.3.0
with:
context: .
file: ./config/Dockerfile
build-args: |
BTPSA_VERSION_GIT_ARG=${{ github.sha }}
push: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
labels: ${{ steps.meta.outputs.labels }}
61 changes: 30 additions & 31 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ name: "CodeQL"

on:
push:
branches: [ "main" ]
branches: ["main", "dev"]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
branches: ["main", "dev"]
schedule:
- cron: '35 2 * * 3'
- cron: "35 2 * * 3"

jobs:
analyze:
Expand All @@ -32,41 +32,40 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'python', 'javascript']
language: ["python", "javascript"]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# 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
# queries: security-extended,security-and-quality
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.


# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
# 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
# queries: security-extended,security-and-quality

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

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

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

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
5 changes: 4 additions & 1 deletion .github/workflows/docker-dev-build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ jobs:

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
driver-opts: |
image=moby/buildkit:v0.10.6
#with:
# buildkitd-flags: --debug

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

- name: Build Docker image
uses: docker/build-push-action@v3.2.0
uses: docker/build-push-action@v3.3.0
with:
context: .
platforms: linux/amd64,linux/arm64
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/docker-release-build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Build and Push Docker Image (RELEASE)
on:
release:
types: [published]
workflow_dispatch:

env:
REGISTRY: ghcr.io
Expand All @@ -24,6 +25,9 @@ jobs:

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
driver-opts: |
image=moby/buildkit:v0.10.6
#with:
# buildkitd-flags: --debug

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

- name: Build Docker image
uses: docker/build-push-action@v3.2.0
uses: docker/build-push-action@v3.3.0
with:
context: .
platforms: linux/amd64,linux/arm64
Expand Down
39 changes: 23 additions & 16 deletions .github/workflows/links-watcher-cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,31 @@ name: Periodic Link Checker

on:
schedule:
- cron: '0 0 * * *'
- cron: "0 0 * * *"
workflow_dispatch:

permissions:
contents: read
pull-requests: write
contents: read
issues: write

jobs:
link-checker:
runs-on: ubuntu-latest
steps:
- name: 'Checkout source code'
uses: actions/checkout@v3
- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@v1.5.4
with:
fail: true
args: --verbose --no-progress --exclude-mail --exclude-loopback .
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
link-checker:
runs-on: ubuntu-latest
steps:
- name: "Checkout source code"
uses: actions/checkout@v3
- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@v1.5.4
with:
args: --verbose --no-progress --max-concurrency 2 --exclude-mail --exclude-loopback './**/*.md'
output: ./lychee/out.md
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Create issue when fail
uses: peter-evans/create-issue-from-file@v4
if: ${{ steps.lychee.outputs.exit_code }} != 0
with:
title: Link Checker Report
content-filepath: ./lychee/out.md
labels: broken link, automated issue
5 changes: 4 additions & 1 deletion .github/workflows/stage-integration-test-full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ jobs:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
driver-opts: |
image=moby/buildkit:v0.10.6
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
Expand All @@ -45,7 +48,7 @@ jobs:
images: ${{ env.REGISTRY }}/${{ github.repository }}/${{ env.IMAGE_NAME }}
- name: Build Docker image
id: dockerbuild
uses: docker/build-push-action@v3.2.0
uses: docker/build-push-action@v3.3.0
with:
context: .
file: ./config/Dockerfile
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/stage-integration-test-slim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ jobs:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
driver-opts: |
image=moby/buildkit:v0.10.6
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
Expand All @@ -45,7 +48,7 @@ jobs:
images: ${{ env.REGISTRY }}/${{ github.repository }}/${{ env.IMAGE_NAME }}
- name: Build Docker image
id: dockerbuild
uses: docker/build-push-action@v3.2.0
uses: docker/build-push-action@v3.3.0
with:
context: .
file: ./config/Dockerfile
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-metadata-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
python-version: "3.10"

- name: Install dependencies for JSON schema generation
run: |
Expand Down
1 change: 1 addition & 0 deletions .lycheeignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ https://api.reuse.software/badge/github.com/SAP-samples/btp-setup-automator
https://api.reuse.software/info/github.com/SAP-samples/btp-setup-automator
https://github.wdf.sap.corp*
https://cloudintegration.int.sap.eu2.hana.ondemand.com/package/SAPTaskCenter*
https://github.com/SAP-samples/btp-setup-automator/pull/xxx
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"python.pythonPath": "/usr/local/bin/python3",
"python.linting.enabled": true,
"python.formatting.provider": "black",
"python.linting.flake8Enabled": true,
"python.linting.flake8Args": ["--ignore=E501,F405,W504"],
"python.linting.pylintEnabled": false
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Started as a small helper for basic SAP BTP setups the tool has grown since its

- [Overview](./docs/OVERVIEW.md)
- [Basic setup](./docs/BASIC_SETUP.md) incl. the prerequisites
- [Detailed walk-though](./docs/README.md)
- [Detailed walk-through](./docs/README.md)
- [Detailed configuration](./docs/SAMPLECONFIG.md)
- [Overview of btpsa parameters](./docs/PARAMETERS_OVERVIEW.md)
- [FAQ](./docs/FAQ.md)
Expand Down
12 changes: 6 additions & 6 deletions config/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ENV TOOLS_URL=tools.hana.ondemand.com
ENV CPCLI_URL=cpcli.cf.eu10.hana.ondemand.com

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

##########################################################################################
## Retrieve the SAP btp CLI
Expand All @@ -32,7 +32,7 @@ FROM base AS btp_cli
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
WORKDIR /tmp/tools
#RUN BTP_CLI_VERSION="$(curl --silent --url "https://$CPCLI_URL/actuator/info" | jq --raw-output '.app.version')" \
RUN BTP_CLI_VERSION="2.24.0" \
RUN BTP_CLI_VERSION="2.33.0" \
&& curl --fail --silent --location --cookie eula_3_1_agreed="$TOOLS_URL/developer-license-3_1.txt" \
--url "https://$TOOLS_URL/additional/btp-cli-$ARCH-$BTP_CLI_VERSION.tar.gz" \
| tar -xzf - --strip-components 1 "$ARCH/btp"
Expand All @@ -43,7 +43,7 @@ RUN BTP_CLI_VERSION="2.24.0" \
FROM base AS mta_build_tool
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
WORKDIR /tmp/tools
RUN MBT_VERSION="1.2.18" \
RUN MBT_VERSION="1.2.21" \
&& 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" \
| tar -xzf - mbt

Expand Down Expand Up @@ -97,7 +97,7 @@ ARG BTPSA_VERSION_GIT_ARG=default
##################################################################################################################################################
# Now putting all pieces together
##################################################################################################################################################
FROM python:3.9-alpine3.16 AS final_build
FROM python:3.10-alpine3.16 AS final_build
ENV USERNAME=user
ENV HOME_FOLDER /home/$USERNAME
ENV LIBS_FOLDER $HOME_FOLDER/libs
Expand Down Expand Up @@ -141,7 +141,7 @@ RUN adduser \
# - currently (Jun 7th, 2022) it's no longer possible to install CDS
# - to be determined what the root cause is (seems related to deprecation of v1.x Cloud SDK)
##########################################################################################
&& npm install -g @sap/cds-dk --allow-root \
&& npm install -g @sap/cds-dk@6.4.0 --allow-root \
&& npm cache clean --force \
##########################################################################################
# Add user to sudo user
Expand Down
7 changes: 3 additions & 4 deletions config/python/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ attrs==22.2.0
blessed==1.19.1
certifi==2022.12.7
charset-normalizer==2.1.1
flake8==6.0.0
idna==3.4
inquirer==3.1.1
inquirer==3.1.2
Jinja2==3.1.2
jsonschema==4.17.3
MarkupSafe==2.1.1
Expand All @@ -16,9 +15,9 @@ pyrsistent==0.19.3
python-dateutil==2.8.2
python-editor==1.0.4
readchar==4.0.3
requests==2.28.1
requests==2.28.2
six==1.16.0
urllib3==1.26.14
wcwidth==0.2.5
wcwidth==0.2.6
pyyaml==6.0
xmltodict==0.13.0
6 changes: 6 additions & 0 deletions config/templates/libs/BTPSA-USECASE.json
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,12 @@
"description": "parameter file for the service in case you want to provide the parameters via a file",
"title": "parameter file for the service"
},
"skipTrustSetupForXSUAA": {
"type": "boolean",
"default": false,
"description": "skip the trust setup to an IdP for XSUAA. Only relevant for the plan apiaccess!",
"title": "skip trust setup to IdP for XSUAA (plan apiaccess)"
},
"statusResponse": {
"type": "object",
"description": "information that is available only durng the execution of the script (should not be set in the usecase.json file)",
Expand Down
2 changes: 1 addition & 1 deletion docs/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ You can now download the `kubeconfig`file either via the Kyma dashboard or via t
* Open the Service Account created by you in the previous step.
* Download kubeconfig and store it

* Via the script
* Via the script

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

Expand Down
Loading

0 comments on commit 82de870

Please sign in to comment.