Skip to content

Commit

Permalink
#1 Split into wrapper and library implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
openwms committed Nov 4, 2024
0 parents commit 997b387
Show file tree
Hide file tree
Showing 38 changed files with 3,003 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/branch-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<name: 'branch_build'
on:
push:
branches-ignore: [ master, release ]

env:
MAVEN_OPTS: -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn

jobs:
build_job:
runs-on: ubuntu-latest
name: Build & Test Microservice
services:
rabbitmq:
image: rabbitmq:3.8
env:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
ports:
- 5672:5672
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up JDK 21
uses: actions/setup-java@v1
with:
java-version: 21
- name: Cache Maven packages
uses: actions/cache@v1
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build
run: >
./mvnw clean verify
-DsurefireArgs=-Dspring.profiles.active=ASYNCHRONOUS,TEST
-Dspring.rabbitmq.host=localhost
-Dci.buildNumber=$GITHUB_RUN_NUMBER
-U -B $MAVEN_OPTS
47 changes: 47 additions & 0 deletions .github/workflows/master-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: 'master_build'
on:
push:
branches: [ master ]

env:
MAVEN_OPTS: -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn

jobs:
build_job:
runs-on: ubuntu-latest
name: Build & Test Microservice
services:
rabbitmq:
image: rabbitmq:3.8
env:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
ports:
- 5672:5672
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up JDK 21
uses: actions/setup-java@v1
with:
java-version: 21
- name: Cache Maven packages
uses: actions/cache@v1
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build
run: >
./mvnw clean verify
-DsurefireArgs=-Dspring.profiles.active=ASYNCHRONOUS,TEST
-Dspring.rabbitmq.host=localhost
-Dci.buildNumber=$GITHUB_RUN_NUMBER
-U -B $MAVEN_OPTS
- name: Build Image
run: ./scripts/docker_build
- name: Upload Image
run: ./scripts/docker_push
env:
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
74 changes: 74 additions & 0 deletions .github/workflows/master-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: 'master_docs'
on:
workflow_run:
workflows: ["master_build"]
branches: [ master ]
types:
- completed

env:
MAVEN_OPTS: -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn

jobs:
site_job:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
name: Build Microservice Docs
services:
rabbitmq:
image: rabbitmq:3.8
env:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
ports:
- 5672:5672
postgres:
image: openwms/postgres-image:latest
env:
POSTGRES_PASSWORD: postgres
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up JDK 21
uses: actions/setup-java@v1
with:
java-version: 21
- name: Cache Maven packages
uses: actions/cache@v1
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Install tools
run: |
sudo apt-get install graphviz
git config --global user.email "ci@example.com"
git config --global user.name "CI Server"
- name: Site
run: >
./mvnw post-integration-test site scm-publish:publish-scm
-DM2_REPO_DIR=/home/runner/.m2/repository
-DsurefireArgs=-Dspring.profiles.active=ASYNCHRONOUS,TEST,TESTPG
-Dargs=-Dspring.profiles.active=ASYNCHRONOUS,TEST,TESTPG
-Dspring.datasource.url=jdbc:postgresql://localhost:5432/testdb
-Dspring.rabbitmq.host=localhost
-DDB_HOST=localhost
-DDB_USERNAME=KARL
-DDB_PASSWORD=KARL
-Dscmuser=$PUSHKEY
-Dscmpublish.pubScmUrl=scm:git:https://openwms:$PUSHKEY@github.com/openwms/org.openwms.tms.routing.git
-DdeveloperConnectionUrl=scm:git:https://openwms:$PUSHKEY@github.com/openwms/org.openwms.tms.routing.git
-Dci.buildNumber=$GITHUB_RUN_NUMBER
-Pschemagen -B $MAVEN_OPTS
env:
PUSHKEY: ${{ secrets.GITHUB_TOKEN }}
50 changes: 50 additions & 0 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: 'release_build'
on:
push:
branches:
- 'release/**'

env:
MAVEN_OPTS: -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn

jobs:
build_job:
runs-on: ubuntu-latest
name: Build & Test Microservice on Release branches
services:
rabbitmq:
image: rabbitmq:3.8
env:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
ports:
- 5672:5672
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up JDK 21
uses: actions/setup-java@v1
with:
java-version: 21
- name: Set Release version env variable
run: |
echo "RELEASE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
- name: Build
run: >
./mvnw clean verify
-DsurefireArgs=-Dspring.profiles.active=ASYNCHRONOUS,TEST
-Dspring.rabbitmq.host=localhost
-Dci.buildNumber=$GITHUB_RUN_NUMBER
-U -B $MAVEN_OPTS
- name: Build Image
run: ./scripts/docker_build_release
env:
BUILD_NUMBER: ${{ env.GITHUB_RUN_NUMBER }}
VERSION: ${{ env.RELEASE_VERSION }}
- name: Upload Image
run: ./scripts/docker_push_release
env:
BUILD_NUMBER: ${{ env.GITHUB_RUN_NUMBER }}
VERSION: ${{ env.RELEASE_VERSION }}
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
89 changes: 89 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# Directories #
/build/
/bin/
dist
target/
**/${project.build.directory}/
/null/
libs/
**/overlays/**/*
**/node/
**/node_modules/
**/typings/
**/*.js.map

# OS Files #
.DS_Store
**/javadoc.sh
**/options
*.class

# Package Files #
*.jar
*.war
*.ear
*.db
rebel.xml
package-lock.json
*.versionsBackup

######################
# Windows
######################

# Windows image file caches
Thumbs.db

# Folder config file
Desktop.ini

######################
# OSX
######################

.DS_Store
.svn

# Thumbnails
._*

# Files that might appear on external disk
.Spotlight-V100
.Trashes

######################
# IDEA
######################
*.iml
*.idea

######################
# Eclipse
######################

*.pydevproject
.project
.metadata
bin/**
tmp/**
tmp/**/*
*.tmp
*.bak
*.swp
*~.nib
local.properties
.classpath
.settings/
.loadpath
/src/main/resources/rebel.xml
# External tool builders
.externalToolBuilders/

# Locally stored "Eclipse launch configurations"
*.launch

# CDT-specific
.cproject

# PDT-specific
.buildpath
Loading

0 comments on commit 997b387

Please sign in to comment.