Skip to content

Commit

Permalink
Merge pull request #275 from wultra/develop
Browse files Browse the repository at this point in the history
Merge develop to master
  • Loading branch information
banterCZ authored Jul 30, 2024
2 parents 8c45dc4 + b1d6f34 commit 06c4ea9
Show file tree
Hide file tree
Showing 17 changed files with 1,198 additions and 123 deletions.
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@ updates:
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
# Workflow files stored in the default location of `.github/workflows`. (You don't need to specify `/.github/workflows` for `directory`. You can use `directory: "/"`.)
directory: "/"
schedule:
interval: "weekly"
6 changes: 2 additions & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ on:
workflow_dispatch:
push:
branches: [ 'develop', 'master', 'releases/**' ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ 'develop', 'master', 'releases/**' ]
schedule:
- cron: '17 14 * * 2'

Expand All @@ -19,4 +16,5 @@ jobs:
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Use only 'java' to analyze code written in Java, Kotlin or both
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
java_version: 21
2 changes: 2 additions & 0 deletions .github/workflows/maven-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
with:
environment: internal-publish
release_type: snapshot
java_version: 21
secrets:
username: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
Expand All @@ -43,6 +44,7 @@ jobs:
with:
environment: ${{ inputs.environment }}
release_type: ${{ inputs.release_type }}
java_version: 21
secrets:
username: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/maven-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ on:
jobs:
maven-tests:
uses: wultra/wultra-infrastructure/.github/workflows/maven-test.yml@develop
secrets: inherit
secrets: inherit
with:
java_version: 21
50 changes: 36 additions & 14 deletions .github/workflows/publish-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ on:
- 'develop'
- 'master'
- 'releases/*'
inputs:
push_to_acr:
description: Push to ACR?
type: boolean
default: true
push_to_jfrog:
description: Push to JFrog?
type: boolean
default: false
pull_request:
branches:
- 'develop'
Expand All @@ -22,10 +31,10 @@ jobs:
INTERNAL_USERNAME: ${{ secrets.JFROG_USERNAME }}
INTERNAL_PASSWORD: ${{ secrets.JFROG_PASSWORD }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '17'
java-version: '21'
distribution: 'temurin'
server-id: jfrog-central
server-username: INTERNAL_USERNAME
Expand All @@ -41,25 +50,38 @@ jobs:
run: |
mvn -U -DuseInternalRepo=true --no-transfer-progress clean package
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
with:
install: true

- name: Log in to JFrog registry
if: inputs.push_to_jfrog == true
uses: docker/login-action@v3
with:
registry: https://wultra.jfrog.io/
username: ${{ vars.JFROG_CONTAINER_REGISTRY_USERNAME }}
password: ${{ secrets.JFROG_CONTAINER_REGISTRY_PASSWORD }}
- name: Log in to Azure registry
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: docker/login-action@v2
if: inputs.push_to_acr == true
uses: docker/login-action@v3
with:
registry: https://powerauth.azurecr.io/
username: ${{ secrets.ACR_USERNAME }}
username: ${{ vars.ACR_USERNAME }}
password: ${{ secrets.ACR_PASSWORD }}
- name: Build and push container image to Azure registry
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
push: ${{ github.event_name == 'workflow_dispatch' }}
platforms: linux/amd64
tags: powerauth.azurecr.io/mobile-utility-server:${{ env.REVISION }}${{ env.TIMESTAMP }}-${{ github.sha }}
push: ${{ inputs.push_to_acr == true || inputs.push_to_jfrog == true }}
platforms: linux/amd64,linux/arm64
tags: |
${{ inputs.push_to_acr == true && format('powerauth.azurecr.io/mobile-utility-server:{0}{1}-{2}', env.REVISION, env.TIMESTAMP, github.sha) || '' }}
${{ inputs.push_to_jfrog == true && format('wultra.jfrog.io/wultra-docker/mobile-utility-server:{0}{1}-{2}', env.REVISION, env.TIMESTAMP, github.sha) || '' }}
file: ./deploy/dockerfile/runtime/Dockerfile
context: .

- run: echo '### 🚀 Published images' >> $GITHUB_STEP_SUMMARY
- if: inputs.push_to_acr == true
run: |
echo 'powerauth.azurecr.io/mobile-utility-server:${{ env.REVISION }}${{ env.TIMESTAMP }}-${{ github.sha }}' >> $GITHUB_STEP_SUMMARY
- if: inputs.push_to_jfrog == true
run: echo 'wultra.jfrog.io/wultra-docker/mobile-utility-server:${{ env.REVISION }}${{ env.TIMESTAMP }}-${{ github.sha }}' >> $GITHUB_STEP_SUMMARY
10 changes: 5 additions & 5 deletions deploy/dockerfile/runtime/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/env sh
#!/usr/bin/env bash
set -euo pipefail

liquibase --headless=true --log-level=INFO --changeLogFile=$LB_HOME/db/changelog/db.changelog-master.xml \
--username=$MOBILE_UTILITY_SERVER_DATASOURCE_USERNAME \
--password=$MOBILE_UTILITY_SERVER_DATASOURCE_PASSWORD \
--url=$MOBILE_UTILITY_SERVER_DATASOURCE_URL \
liquibase --headless=true --log-level=INFO --changeLogFile="${LB_HOME}/db/changelog/db.changelog-master.xml" \
--username="${MOBILE_UTILITY_SERVER_DATASOURCE_USERNAME:-}" \
--password="${MOBILE_UTILITY_SERVER_DATASOURCE_PASSWORD:-}" \
--url="${MOBILE_UTILITY_SERVER_DATASOURCE_URL}" \
update

java -Dserver.port=8000 -jar /mobile-utility-server.war
Loading

0 comments on commit 06c4ea9

Please sign in to comment.