Compare commits

..

12 commits

Author SHA1 Message Date
268081b28b
Merge pull request 'fix: actually provide maven profile' (!50) from feature/esb-deploy-action into main
Reviewed-on: #50
Reviewed-by: Kraft_Ruben_-_J._Schmalz_GmbH <Ruben.Kraft@schmalz.de>
2026-06-17 07:50:35 +00:00
9783972537 fix: actually provide maven profile
All checks were successful
Aikido Security PR Check / Aikido Security Scan (pull_request) Successful in 59s
validate-shared-actions / validate-shared-actions (pull_request) Successful in 41s
2026-06-17 09:41:57 +02:00
ee976b306e
Merge pull request 'feature/esb-deploy-action' (!49) from feature/esb-deploy-action into main
Reviewed-on: #49
2026-06-17 06:54:26 +00:00
a49611f288 fix: maven action did not set profile in verify mode
All checks were successful
Aikido Security PR Check / Aikido Security Scan (pull_request) Successful in 57s
validate-shared-actions / validate-shared-actions (pull_request) Successful in 35s
2026-06-17 08:52:37 +02:00
9149415575 fix: action did not provide stage toggle 2026-06-17 08:01:38 +02:00
6a84d5d6f2
Merge pull request 'fix: readme mentioned wrong parameters' (!48) from feature/esb-deploy-action into main
Reviewed-on: #48
Reviewed-by: Kraft_Ruben_-_J._Schmalz_GmbH <Ruben.Kraft@schmalz.de>
2026-06-17 05:46:13 +00:00
0134da8ac7 fix: propagate maven profile in esb-deploy action
All checks were successful
Aikido Security PR Check / Aikido Security Scan (pull_request) Successful in 57s
validate-shared-actions / validate-shared-actions (pull_request) Successful in 42s
2026-06-17 07:42:35 +02:00
115300a7e1 fix: readme mentioned wrong parameters
All checks were successful
validate-shared-actions / validate-shared-actions (pull_request) Successful in 1m57s
Aikido Security PR Check / Aikido Security Scan (pull_request) Successful in 2m16s
2026-06-16 16:32:34 +02:00
c57466f628
Merge pull request 'fix: use correct name in tag-release workflow' (!47) from feature/esb-deploy-action into main
Reviewed-on: #47
Reviewed-by: Kraft_Ruben_-_J._Schmalz_GmbH <Ruben.Kraft@schmalz.de>
2026-06-16 14:27:06 +00:00
4e15383d23 fix: use correct name in tag-release workflow
All checks were successful
validate-shared-actions / validate-shared-actions (pull_request) Successful in 38s
Aikido Security PR Check / Aikido Security Scan (pull_request) Successful in 51s
2026-06-16 16:25:43 +02:00
c2587887a0
Merge pull request 'feat: create deploy-esb action' (!46) from feature/esb-deploy-action into main
Reviewed-on: #46
Reviewed-by: Kraft_Ruben_-_J._Schmalz_GmbH <Ruben.Kraft@schmalz.de>
2026-06-16 14:23:52 +00:00
5b6f2cfd28 feat: create deploy-esb action
All checks were successful
validate-shared-actions / validate-shared-actions (pull_request) Successful in 53s
Aikido Security PR Check / Aikido Security Scan (pull_request) Successful in 1m14s
2026-06-16 16:06:32 +02:00
4 changed files with 99 additions and 0 deletions

View file

@ -19,6 +19,7 @@ on:
- cache
- checkout
- download-artifact
- esb-deploy
- helm-deploy
- i18n-sync
- inject-content

32
esb-deploy/README.md Normal file
View file

@ -0,0 +1,32 @@
# esb-deploy
Deploy a service to an ESB docker host.
## Inputs
| Input | Required | Default | Description |
|-------|----------|---------|-------------|
| `docker-host` | Yes | - | esbdb3.schmalzgroup.net, esbdb4.schmalzgroup.net, esbdb2-stage.schmalzgroup.net|
| `java-version` | Yes | 25 | Same as default of the maven-build action |
| `maven-profile` | No | `test` | Maven profile to activate during deploy |
| `maven-settings` | **Yes** | — | Secret containing the `settings.xml` content used for repository authentication |
| `service` | Yes | — | Name of the service to deploy |
| `stage` | No | true | If true this is a stage deployment |
## Usage
```yaml
- uses: https://schmalz-git.git.onstackit.cloud/schmalz/shared-actions/esb-deploy@esb-deploy-v1
with:
service: my-service
docker-host: esbdocker2-stage.schmalzgroup.net
java-version: 8
maven-profile: test
maven-settings: ${{ secrets.MAVEN_SETTINGS }}
stage: true
```
## Notes
- The compose files are extracted from variables. They can be provided on the organization or repository level.
- The action uses the maven-build action to build the service. The pom.xml has to be in the root directory

64
esb-deploy/action.yml Normal file
View file

@ -0,0 +1,64 @@
name: Deploy ESB
description: Deploy a service to an ESB docker host.
inputs:
docker-host:
description: Docker host to deploy to
required: true
maven-profile:
required: false
default: 'test'
description: 'Maven profile to use for the build'
maven-settings:
description: Secret containing the settings.xml content used for repository authentication
required: true
java-version:
description: Java version to use for the build
required: true
service:
description: Name of the service to deploy
required: true
stage:
description: Whether to deploy to stage environment (true) or production environment (false)
required: false
default: 'true'
runs:
using: composite
steps:
- name: Create compose files
shell: bash
env:
BASE_COMPOSE: ${{ vars.DOCKER_COMPOSE }}
SU_COMPOSE: ${{ vars.DOCKER_COMPOSE_SU }}
run: |
printf '%s\n' "$BASE_COMPOSE" > compose.yml
printf '%s\n' "$SU_COMPOSE" > compose-su.yml
- uses: https://schmalz-git.git.onstackit.cloud/schmalz/shared-actions/maven-build@maven-build-v1
with:
phase: verify
maven-settings: ${{ inputs.maven-settings }}
verify-goals: clean package
java-version: ${{ inputs.java-version }}
maven-profile: ${{ inputs.maven-profile}}
- name: Compose stage
if: ${{ inputs.stage == 'true' }}
shell: bash
env:
SERVICE: ${{ inputs.service }}
run: |
echo "Deploying $SERVICE to stage environment"
export DOCKER_HOST="tcp://${{ inputs.docker-host }}:2375"
docker compose -f compose.yml -f compose-su.yml up -d --build --no-deps "$SERVICE"
- name: Compose prod
if: ${{ inputs.stage != 'true' }}
shell: bash
env:
SERVICE: ${{ inputs.service }}
run: |
echo "Deploying $SERVICE to production environment"
export DOCKER_HOST="tcp://${{ inputs.docker-host }}:2375"
docker compose -f compose.yml up -d --build --no-deps "$SERVICE"

View file

@ -94,9 +94,11 @@ runs:
env:
VERIFY_GOALS: ${{ inputs.verify-goals }}
EXTRA_ARGS: ${{ inputs.extra-args }}
MAVEN_PROFILE: ${{ inputs.maven-profile }}
run: |
mvn --batch-mode $VERIFY_GOALS \
-s /tmp/maven-settings.xml \
-P "$MAVEN_PROFILE" \
$EXTRA_ARGS
- name: Deploy