Skip to content

Commit

Permalink
Merge pull request #5 from CaritasDeutschland/feature-github-registry
Browse files Browse the repository at this point in the history
ci: 🎡 rm jenkins, docker image workflow & dockerfile changes
  • Loading branch information
daho4b authored Sep 24, 2020
2 parents e07756e + 15c895b commit e5f35ad
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 40 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/dockerImage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Publish Docker image

on:
push:
tags:
- 'dockerImage.v.*'

jobs:
test:
name: Build and run unit tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup JVM
uses: actions/setup-java@v1
with:
java-version: 1.8.0.181
java-package: jdk
architecture: x64

- name: Caching maven dependencies
uses: actions/cache@v1
env:
cache-name: cache-maven-dependencies
with:
path: ~/.m2/repository
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
- name: Maven Package
run: mvn -B -Pprod clean package -DskipTests
- name: Maven Verify
run: mvn -B -Pprod clean verify
- uses: actions/upload-artifact@v2
with:
name: targetfiles
path: target/*.jar
push_to_registry:
needs: [test]
name: Push Docker image to GitHub Packages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Download buildfiles artifact
uses: actions/download-artifact@v2
with:
name: targetfiles
- name: Push to GitHub Packages
uses: docker/build-push-action@v1.1.1
with:
username: ${{ secrets.GH_PACKAGE_RELEASE_USER }}
password: ${{ secrets.GH_PACKAGE_RELEASE_TOKEN }}
registry: docker.pkg.github.com
repository: caritasdeutschland/caritas-onlineberatung-mailservice/mailservice-image
tag_with_ref: true
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ FROM openjdk:8-jdk-alpine
VOLUME ["/tmp","/log"]
EXPOSE 8080
ARG JAR_FILE
COPY target/MailService.jar app.jar
COPY ./MailService.jar app.jar
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]
39 changes: 0 additions & 39 deletions Jenkinsfile

This file was deleted.

0 comments on commit e5f35ad

Please sign in to comment.