Skip to content

Commit

Permalink
Merge branch 'dev' into dependabot/maven/org.mockito-mockito-core-4.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ismisepaul authored Nov 17, 2022
2 parents 738e2f2 + 8a99b51 commit 68ce02a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 100 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/dependency-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:
- cron: '0 0 1,15 * *'
push:
branches: [master, dev]
paths-ignore:
- '**.md'
paths:
- 'pom.xml'
pull_request:

jobs:
Expand Down
108 changes: 10 additions & 98 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Release to Dockerhub
on:
on:
pull_request:
types:
- closed
Expand All @@ -21,9 +21,10 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
uses: actions/setup-java@v3.6.0
with:
java-version: 1.8
distribution: 'zulu'
java-version: '8'
- name: Build Maven with Docker Profile and Generate SBOM
run: mvn clean install -Pdocker -DskipTests -B -DexcludeTestProject=true cyclonedx:makeBom
- name: Upload WAR File
Expand Down Expand Up @@ -70,7 +71,7 @@ jobs:
docker/mariadb/target
docker/mongo/target
release-webapp:
release-security-shepherd:
needs: build
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
Expand All @@ -79,14 +80,15 @@ jobs:
uses: actions/checkout@v2

- name: Log in to Docker Hub
uses: docker/login-action@v1
uses: docker/login-action@v2.1.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}


- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
uses: docker/metadata-action@v4.1.1
with:
images: owasp/security-shepherd

Expand All @@ -106,7 +108,7 @@ jobs:
env-file: .env

- name: Build and push Tomcat
uses: docker/build-push-action@v2
uses: docker/build-push-action@v3.2.0
with:
context: .
push: true
Expand All @@ -117,94 +119,4 @@ jobs:
TLS_KEYSTORE_FILE
TLS_KEYSTORE_PASS
ALIAS
HTTPS_PORT
release-database:
needs: build
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: owasp/security-shepherd_mariadb

- name: Restore Cached Maven packages
uses: actions/cache@v3
with:
key: maven-output-${{ hashFiles('target/**') }}
path: |
target/
docker/mariadb/target
docker/mongo/target
- name: Set environment variables
uses: c-py/action-dotenv-to-setenv@80f488cda311f44d43e687a4e94f54a050b7822a # v4
with:
env-file: .env

- name: Build and push MariaDb
uses: docker/build-push-action@v2
with:
context: docker/mariadb/
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
DB_VERSION
DB_BIND_ADDRESS
release-mongodb:
needs: build
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: owasp/security-shepherd_mongodb

- name: Restore Cached Maven packages
uses: actions/cache@v3
with:
key: maven-output-${{ hashFiles('target/**') }}
path: |
target/
docker/mariadb/target
docker/mongo/target
- name: Set environment variables
uses: c-py/action-dotenv-to-setenv@80f488cda311f44d43e687a4e94f54a050b7822a # v4
with:
env-file: .env

- name: Build and push MongoDb
uses: docker/build-push-action@v2
with:
context: docker/mongo/
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
MONGODB_VERSION
MONGO_BIND_ADDRESS
HTTPS_PORT

0 comments on commit 68ce02a

Please sign in to comment.