Skip to content

Commit

Permalink
Merge pull request #26 from dmartinol/FLPATH-957
Browse files Browse the repository at this point in the history
Productize Escalation workflow - build and push jira-listener image
  • Loading branch information
dmartinol committed Feb 2, 2024
2 parents 71325c1 + cff46be commit a13b86b
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 79 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/jira-listener.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build and push jira-listener container image

on:
workflow_dispatch:
push:
branches: [ "main" ]
paths:
- 'escalation-eda/jira-listener/**'

env:
WORKDIR: escalation-eda/jira-listener
MVN_OPTS: ""

jobs:
build-and-push-jira-listener:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Build Java projects
run: |
cd ${WORKDIR}
mvn ${MVN_OPTS} -B clean package
- name: Buildah Action
id: build-image
uses: redhat-actions/buildah-build@v2
with:
context: ${{ env.WORKDIR }}
image: serverless-workflow-jira-listener
tags: latest ${{ github.sha }}
extra-args: --ulimit nofile=4096:4096
containerfiles: |
${{ env.WORKDIR }}/src/main/docker/Dockerfile.jvm
- name: Push To quay.io
id: push-to-quay
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }}
registry: quay.io/orchestrator
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}

- name: Print image url
run: echo "Image pushed to ${{ steps.push-to-quay.outputs.registry-paths }}"
85 changes: 6 additions & 79 deletions escalation-eda/jira-listener/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,16 @@
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>dev.parodos</groupId>
<artifactId>jira-listener</artifactId>
<version>1.0.0-SNAPSHOT</version>
<parent>
<groupId>dev.parodos</groupId>
<artifactId>swf-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../../swf-parent</relativePath>
</parent>
<properties>
<compiler-plugin.version>3.11.0</compiler-plugin.version>
<maven.compiler.release>11</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
<quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id>
<quarkus.platform.version>3.4.2</quarkus.platform.version>
<cloudevents.version>2.5.0</cloudevents.version>
<skipITs>true</skipITs>
<surefire-plugin.version>3.1.2</surefire-plugin.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>${quarkus.platform.group-id}</groupId>
<artifactId>${quarkus.platform.artifact-id}</artifactId>
<version>${quarkus.platform.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
Expand Down Expand Up @@ -95,63 +79,6 @@
<url>https://packages.atlassian.com/mvn/maven-atlassian-external</url>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>${quarkus.platform.group-id}</groupId>
<artifactId>quarkus-maven-plugin</artifactId>
<version>${quarkus.platform.version}</version>
<extensions>true</extensions>
<executions>
<execution>
<goals>
<goal>build</goal>
<goal>generate-code</goal>
<goal>generate-code-tests</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${compiler-plugin.version}</version>
<configuration>
<compilerArgs>
<arg>-parameters</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire-plugin.version}</version>
<configuration>
<systemPropertyVariables>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
<maven.home>${maven.home}</maven.home>
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${surefire-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
<configuration>
<systemPropertyVariables>
<native.image.path>${project.build.directory}/${project.build.finalName}-runner</native.image.path>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
<maven.home>${maven.home}</maven.home>
</systemPropertyVariables>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>native</id>
Expand Down

0 comments on commit a13b86b

Please sign in to comment.