Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Merge open source licences #107 #6

Open
wants to merge 22 commits into
base: release
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/bff_develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,13 @@ jobs:
VERSION=edge
if [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION=${GITHUB_REF#refs/tags/}
echo "tags case!"
elif [[ $GITHUB_REF == refs/heads/* ]]; then
VERSION=$(echo ${GITHUB_REF#refs/heads/} | sed -r 's#/+#-#g')
echo "heads case!"
elif [[ $GITHUB_REF == refs/pull/* ]]; then
VERSION=pr-${{ github.event.number }}
echo "pull case!"
fi
echo ::set-output name=version::${VERSION}

Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Test Workflow

on: [push]

defaults:
run:
shell: bash

jobs:
testdocker:
runs-on: ubuntu-20.04

steps:
# - name: Checkout code
# uses: actions/[email protected]

# - name: Cache local Maven repository
# uses: actions/[email protected]
# with:
# path: ~/.m2/repository
# key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
# restore-keys: |
# ${{ runner.os }}-maven-

- name: Get version from GITHUB_REF
id: get_version
run: |
echo $GITHUB_REF
ORG=tboegner
REPO=iris-client-bff
TAG=1
curl -X "GET" https://hub.docker.com/v2/repositories/$ORG/$REPO/tags/1
echo ${{ github.event_name }}
# VERSION=edge
# if [[ $GITHUB_REF == refs/tags/* ]]; then
# VERSION=${GITHUB_REF#refs/tags/}
# elif [[ $GITHUB_REF == refs/heads/* ]]; then
# VERSION=$(echo ${GITHUB_REF#refs/heads/} | sed -r 's#/+#-#g')
# elif [[ $GITHUB_REF == refs/pull/* ]]; then
# VERSION=pr-${{ github.event.number }}
# fi
# echo ::set-output name=version::${VERSION}
# DOCKER_VER=$(docker --version)
# echo $DOCKER_VER

12 changes: 12 additions & 0 deletions .prepare-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,16 @@ mvn versions:set -DnewVersion=$VERSION -DprocessAllModules=true
mvn -B clean package spring-boot:repackage spring-boot:build-image -Dspring-boot.build-image.publish=false
mkdir release && cp ./iris-client-bff/target/*.jar release

# Generate third-party dependencies for BFF and move them to root
# File will be uploaded to github by @semantic-release/github
mvn -B license:aggregate-add-third-party
mv ./target/generated-sources/license/THIRD-PARTY.txt ./BFF-THIRD-PARTY-LICENSES.md

docker tag $REGISTRY_BASE/iris-client-bff:$VERSION $REGISTRY_BASE/iris-client-bff:latest
docker tag $REGISTRY_BASE/iris-client-bff:$VERSION $REGISTRY_BASE/iris-client-bff:$MAJOR
docker tag $REGISTRY_BASE/iris-client-bff:$VERSION $REGISTRY_BASE/iris-client-bff:$MAJOR.$MINOR


# Set new version with prefix in pom.xml to avoid accidentally overwriting the release images in Docker.io after the merge back into develop.
# These new pom.xml and changelog.md generated by @semantic-release/changelog
# will be commit it by @semantic-release/git
Expand All @@ -49,6 +55,12 @@ printf "\n Build FE ZIP \n\n"
cd ./iris-client-fe
npm ci

# Generate third-party dependencies for FE and move them to root
# File will be uploaded to github by @semantic-release/github
npm run generate-licenses
npm run convert-licenses
mv ./licenses.md ../FE-THIRD-PARTY-LICENSES.md

export VUE_APP_BUILD_ID=$COMMIT
export VUE_APP_VERSION_ID=$VERSION
export VUE_APP_API_BASE_URL="/api"
Expand Down
4 changes: 3 additions & 1 deletion .releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@
"CHANGELOG.md",
"**/pom.xml",
"infrastructure/deployment/docker-compose.yml",
"infrastructure/deployment/docker-compose-ext-postgres.yml"
"infrastructure/deployment/docker-compose-ext-postgres.yml",
"FE-THIRD-PARTY-LICENSES.md",
"BFF-THIRD-PARTY-LICENSES.md"
]
}
],
Expand Down
2 changes: 1 addition & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ Object someMethod(…) {
}
----

Happy coding!
Happy coding and have fun!

==== Sonarlint

Expand Down
Loading