-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from dmartinol/FLPATH-957
Productize Escalation workflow - build and push jira-listener image
- Loading branch information
Showing
2 changed files
with
56 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters