Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
5172ca4
updated versions, align release workflow
ztarbug Jan 5, 2025
b46bfe2
updated versions, align release workflow
ztarbug Jan 5, 2025
7fb3982
updated versions, align release workflow
ztarbug Jan 5, 2025
7799ea2
[maven-release-plugin] prepare release ljprojectbuilder-0.3.7
Jan 5, 2025
7dd2cd0
[maven-release-plugin] prepare for next development iteration
Jan 5, 2025
1ca21b4
updated versions, align release workflow
ztarbug Jan 5, 2025
9e396d9
updated versions, align release workflow
ztarbug Jan 5, 2025
0542b10
[maven-release-plugin] prepare release ljprojectbuilder-0.3.8
Jan 5, 2025
fb2c023
[maven-release-plugin] prepare for next development iteration
Jan 5, 2025
efce9a0
updated versions, align release workflow
ztarbug Jan 6, 2025
495fc31
modified changelog
Jan 6, 2025
1e639f2
[maven-release-plugin] prepare release ljprojectbuilder-0.3.9-1
Jan 6, 2025
927af78
[maven-release-plugin] prepare for next development iteration
Jan 6, 2025
15ac2de
updated versions, align release workflow
ztarbug Jan 6, 2025
a8a8aa3
[maven-release-plugin] prepare release ljprojectbuilder-0.3.9-2
Jan 6, 2025
bba91ec
[maven-release-plugin] prepare for next development iteration
Jan 6, 2025
7be6138
updated versions, align release workflow
ztarbug Jan 6, 2025
8d33b7e
[maven-release-plugin] prepare release ljprojectbuilder-0.3.9-3
Jan 6, 2025
73e1d38
[maven-release-plugin] prepare for next development iteration
Jan 6, 2025
2bccccf
updated versions, align release workflow
ztarbug Jan 6, 2025
a224b07
[maven-release-plugin] prepare release ljprojectbuilder-0.3.9-4
Jan 6, 2025
8fd4451
[maven-release-plugin] prepare for next development iteration
Jan 6, 2025
e8794c7
updated versions, align release workflow
ztarbug Jan 6, 2025
44865ee
[maven-release-plugin] prepare release ljprojectbuilder-0.3.9-5
Jan 6, 2025
f164773
[maven-release-plugin] prepare for next development iteration
Jan 6, 2025
b1dd1b6
updated versions, align release workflow
ztarbug Jan 6, 2025
e6cae86
modified changelog
Jan 6, 2025
064e42c
[maven-release-plugin] prepare release ljprojectbuilder-0.3.9-5
Jan 6, 2025
14a6d8e
modified changelog
Jan 6, 2025
b8c3cb6
[maven-release-plugin] prepare release ljprojectbuilder-0.3.9-6
Jan 6, 2025
335d721
[maven-release-plugin] prepare for next development iteration
Jan 6, 2025
f4e3c68
updated versions, align release workflow
ztarbug Jan 6, 2025
8d4eec4
[maven-release-plugin] prepare release ljprojectbuilder-0.3.9-7
Jan 6, 2025
53fc09c
[maven-release-plugin] prepare for next development iteration
Jan 6, 2025
139207a
updated versions, align release workflow
ztarbug Jan 6, 2025
a2c3256
[maven-release-plugin] prepare release ljprojectbuilder-0.3.9-8
Jan 6, 2025
992ac3a
[maven-release-plugin] prepare for next development iteration
Jan 6, 2025
97d2dc9
updated versions, align release workflow
ztarbug Jan 6, 2025
6ef1815
modified changelog
Jan 6, 2025
4bc2813
[maven-release-plugin] prepare release ljprojectbuilder-0.3.9-10
Jan 6, 2025
26b9dbf
[maven-release-plugin] prepare for next development iteration
Jan 6, 2025
46695a3
updated versions, align release workflow
ztarbug Jan 6, 2025
73e5387
[maven-release-plugin] prepare release ljprojectbuilder-0.3.9-11
Jan 6, 2025
a1f290c
[maven-release-plugin] prepare for next development iteration
Jan 6, 2025
355b7df
updated versions, align release workflow
ztarbug Jan 6, 2025
f226bc9
[maven-release-plugin] prepare release ljprojectbuilder-0.3.9-12
Jan 6, 2025
07d5bdf
[maven-release-plugin] prepare for next development iteration
Jan 6, 2025
961f6db
updated versions, align release workflow
ztarbug Jan 6, 2025
ef39c88
[maven-release-plugin] prepare release ljprojectbuilder-0.3.9-13
Jan 6, 2025
a00aaac
[maven-release-plugin] prepare for next development iteration
Jan 6, 2025
259de02
updated versions, align release workflow
ztarbug Jan 6, 2025
377aee0
[maven-release-plugin] prepare release ljprojectbuilder-0.3.9-14
Jan 6, 2025
51e464f
[maven-release-plugin] prepare for next development iteration
Jan 6, 2025
f236e95
updated versions, align release workflow
ztarbug Jan 6, 2025
64056eb
[maven-release-plugin] prepare release 0.3.9-15
Jan 6, 2025
a9df01d
[maven-release-plugin] prepare for next development iteration
Jan 6, 2025
824081c
modified changelog
Jan 6, 2025
50150e0
[maven-release-plugin] prepare release 0.3.9
Jan 6, 2025
7f797a7
[maven-release-plugin] prepare for next development iteration
Jan 6, 2025
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
184 changes: 117 additions & 67 deletions .github/workflows/createRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,101 +2,151 @@
name: Create release and tag

on:
push:
branches: [ main ]
workflow_dispatch:
inputs:
release-type: # id of input
description: "prerelease, patch, minor or major"
required: true
default: "prerelease"
inputs:
release-version: # id of input
description: "override default release version e.g. with 0.1.0-1"
required: false

permissions:
contents: write

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
release-type: ${{ github.event.inputs.release-type }}
RELEASE_VERSION: ${{ github.event.inputs.release-version }}
IMAGE_NAME: ljprojectbuilder
DOCKERHUB_USERNAME: starwit
DOCKERHUB_ORG: starwitorg

jobs:
build:
name: "Creating changelog and release"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Install GH CLI
uses: dev-hanz-ops/install-gh-cli-action@v0.2.0

- name: Set up JDK 21
uses: actions/setup-java@v4
with:
fetch-depth: '0'
distribution: 'temurin'
java-version: 21

- name: generate tag and release body
run: |
RELEASE_TYPE=$(sh ${{ github.workspace }}/.github/workflows/getReleaseType.sh ${{ env.release-type }})
git config user.name github-ljprojectbuilder
git config user.email code@starwit.de
npx standard-version -i CHANGELOG.md --release-as $RELEASE_TYPE

- name: Read CHANGELOG.md
id: package
uses: juliangruber/read-file-action@v1
- name: Set up Maven
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.9.2

- name: setup node
uses: actions/setup-node@v4
with:
node-version: 22

- run: npm --version
- run: node --version
- run: mvn --version

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: get helm
uses: azure/setup-helm@v4

# Building & Tagging

- name: checkout
uses: actions/checkout@v4
with:
path: ./CHANGELOG.md
- name: Echo CHANGELOG.md
run: echo '${{ steps.package.outputs.content }}'
fetch-depth: '0'

- name: Maven release pepare
run: |
git config --global user.email "code@starwit.de"
git config --global user.name "Starwit"
if [ ! -z "${{ env.RELEASE_VERSION }}" ]
then
echo "new version manually set to ${{ env.RELEASE_VERSION }}"
mvn -B build-helper:parse-version versions:set -DnewVersion=${{ env.RELEASE_VERSION }}-SNAPSHOT versions:commit --settings .github/workflows/settings.xml --file pom.xml
fi
echo "mvn generate-sources --file pom.xml"
mvn generate-sources --file pom.xml
echo "git add ."
git add .
modifications=$(git status | grep "modified" || true)
if [ ! -z "$modifications" ]
then
echo "modifications found: $modifications"
git commit -m "modified changelog"
git push
fi
mvn -B release:clean release:prepare -Darguments="-DskipTests" --settings .github/workflows/settings.xml --file pom.xml
mvn -B release:clean --settings .github/workflows/settings.xml --file pom.xml
env:
CI: false
PRIVATE_REPO_USERNAME: ${{ vars.PRIVATE_REPO_USERNAME }}
MAVEN_REPO_READ: ${{ secrets.MAVEN_REPO_READ }}

- name: publish tag
id: publish_tag
- name: Get tag name
run: |
git push --follow-tags
echo ::set-output name=tag_name::$(git describe HEAD --abbrev=0)
echo "TAG=$( git describe --abbrev=0 )" >> $GITHUB_ENV

- name: create release
uses: actions/create-release@v1
- name: Create github release
run: gh release create ${{ env.TAG }} -F CHANGELOG.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_name: Release ${{ steps.publish_tag.outputs.tag_name }}
tag_name: ${{ steps.publish_tag.outputs.tag_name }}
body_path: CHANGELOG.md
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout tag
run: |
git checkout ${{ env.TAG }}

- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: 17
- name: npm install
run: |
if [ -d "webclient/app" ]; then
cd webclient/app
npm install --legacy-peer-deps
npm install ajv --save-dev --legacy-peer-deps
fi

- name: Build with Maven
run: mvn -B package -P frontend --file pom.xml
run: mvn clean -B package -P frontend --settings .github/workflows/settings.xml --file pom.xml
env:
CI: false
- name: Upload Maven build artifact
uses: actions/upload-artifact@v1
with:
name: artifact
path: application/target/application-0.0.1-SNAPSHOT.jar
CI: false
PRIVATE_REPO_USERNAME: ${{ vars.PRIVATE_REPO_USERNAME }}
MAVEN_REPO_READ: ${{ secrets.MAVEN_REPO_READ }}

- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Publishing Docker

- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ env.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.publish_tag.outputs.tag_name }}
tags: ${{ env.DOCKERHUB_ORG }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}

- name: Build docker image with tag version and push to dockerhub
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
repository: starwitorg/ljprojectbuilder
tags: ${{ steps.publish_tag.outputs.tag_name }}
path: .
dockerfile: ./Dockerfile
# Publishing Helm

- name: login to Helm registry
run: helm registry login registry-1.docker.io -u starwit -p ${{ secrets.DOCKERHUB_TOKEN }}

- name: run helm update
working-directory: application/target/helm/${{ env.IMAGE_NAME }}
run: helm dep update

- name: run helm package
working-directory: application/target/helm
run: helm package ${{ env.IMAGE_NAME }}

- name: get version number
working-directory: application/target/helm/${{ env.IMAGE_NAME }}
run: |
echo "HELM_VERSION=$(grep version: Chart.yaml | head -1 | awk '{print $2}')" >> $GITHUB_ENV

- name: run helm push
working-directory: application/target/helm
run: helm push ${{ env.IMAGE_NAME }}-chart-${{ env.HELM_VERSION }}.tgz oci://registry-1.docker.io/starwitorg
8 changes: 0 additions & 8 deletions .github/workflows/getReleaseType.sh

This file was deleted.

35 changes: 35 additions & 0 deletions .github/workflows/settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">

<activeProfiles>
<activeProfile>github</activeProfile>
</activeProfiles>

<profiles>
<profile>
<id>github</id>
<repositories>
<repository>
<id>central</id>
<url>https://repo1.maven.org/maven2</url>
</repository>
<repository>
<id>github</id>
<url>https://maven.pkg.github.com/starwit/vision-api</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>

<servers>
<server>
<id>github</id>
<username>${env.PRIVATE_REPO_USERNAME}</username>
<password>${env.MAVEN_REPO_READ}</password>
</server>
</servers>
</settings>
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
rest/src/test/actual.json
rest/src/test/test.json
generator/.factorypath
webclient/app/package-lock.json
node_modules/.package-lock.json
package-lock.json
node_modules/@starwit/react-starwit
helm/ljprojectbuilder/user-values.yaml
test.log
61 changes: 38 additions & 23 deletions application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>de.starwit</groupId>
<artifactId>ljprojectbuilder</artifactId>
<version>0.0.1-SNAPSHOT</version>
<version>0.3.10-SNAPSHOT</version>
</parent>

<artifactId>application</artifactId>
Expand Down Expand Up @@ -104,27 +104,42 @@
</plugin>

<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<version>2.2.4</version>
<configuration>
<failOnNoGitDirectory>false</failOnNoGitDirectory>
<failOnUnableToExtractRepoInfo>false</failOnUnableToExtractRepoInfo>
<dateFormat>dd.MM.yyyy '@' HH:mm:ss z</dateFormat>
<dateFormatTimeZone>${user.timezone}</dateFormatTimeZone>
<verbose>false</verbose>
<includeOnlyProperties>
<includeOnlyProperty>git.commit.id</includeOnlyProperty>
<includeOnlyProperty>git.commit.message.full</includeOnlyProperty>
<includeOnlyProperty>git.commit.time</includeOnlyProperty>
<includeOnlyProperty>git.commit.user.email</includeOnlyProperty>
<includeOnlyProperty>git.commit.user.name</includeOnlyProperty>
</includeOnlyProperties>
<excludeProperties>
<excludeProperty>git.commit.id.abbrev</excludeProperty>
<excludeProperty>git.commit.id.describe*</excludeProperty>
</excludeProperties>
</configuration>
<groupId>se.bjurr.gitchangelog</groupId>
<artifactId>git-changelog-maven-plugin</artifactId>
<version>2.2.2</version>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>resources-helm-deployment</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.basedir}/target/helm</outputDirectory>
<delimiters>
<delimiter>${*}</delimiter>
</delimiters>
<useDefaultDelimiters>false</useDefaultDelimiters>
<resources>
<resource>
<directory>
${project.parent.basedir}/helm
</directory>
<filtering>true</filtering>
<includes>
<include>**/*.txt</include>
<include>**/*.yaml</include>
<include>**/*.yml</include>
<include>**/*.tpl</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
Expand All @@ -144,7 +159,7 @@
<param type="negate" value="true" />
<param type="contains" value="#" />
</filterreader>
<replaceregex pattern="=" replace=": " />
<replaceregex pattern="=" replace=": " />
</filterchain>
</concat>
</target>
Expand Down
2 changes: 1 addition & 1 deletion generator/.factorypath
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/security/spring-security-web/5.6.2/spring-security-web-5.6.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/security/spring-security-core/5.6.2/spring-security-core-5.6.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/security/spring-security-crypto/5.6.2/spring-security-crypto-5.6.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-core/5.3.20/spring-core-5.3.20.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-core/5.3.27/spring-core-5.3.27.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-jcl/5.3.18/spring-jcl-5.3.18.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-aop/5.3.18/spring-aop-5.3.18.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/spring-beans/5.3.18/spring-beans-5.3.18.jar" enabled="true" runInBatchMode="false"/>
Expand Down
2 changes: 1 addition & 1 deletion generator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>de.starwit</groupId>
<artifactId>ljprojectbuilder</artifactId>
<version>0.0.1-SNAPSHOT</version>
<version>0.3.10-SNAPSHOT</version>
</parent>

<artifactId>generator</artifactId>
Expand Down
Loading