Skip to content

Commit

Permalink
BAH-2139 | Added workflow to build and upload atomfeed-console (#4)
Browse files Browse the repository at this point in the history
* BAH-2139 | Added trigger for bahmni-package

Co-authored-by: stavtnameh <hemanth.v@beehyv.com>

* BAH-2139 | Added build atomfeed-console job

Co-authored-by: stavtnameh <hemanth.v@beehyv.com>

* Replaced workflow status badge

* Refactor | Moved ORG-NAME and EVENT_TYPE to trigger-dependent-repos job

Co-authored-by: stavtnameh <hemanth.v@beehyv.com>

* BAH-2139 | Moved docker build & Publish steps from bahmni-package

Co-authored-by: stavtnameh <85308522+stavtnameh@users.noreply.github.com>

* Remove trivy script

* Update action versions

* Remove docker build-publish job

---------

Co-authored-by: stavtnameh <hemanth.v@beehyv.com>
Co-authored-by: stavtnameh <85308522+stavtnameh@users.noreply.github.com>
  • Loading branch information
3 people authored Jul 1, 2024
1 parent 6ea9f96 commit eaedc52
Show file tree
Hide file tree
Showing 7 changed files with 78 additions and 1 deletion.
29 changes: 29 additions & 0 deletions .github/workflows/build_publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Build & Publish atomfeed-console
on:
push:
branches:
- master
paths-ignore:
- "**.md"

jobs:
build-atomfeed-console:
name: Build atomfeed-console
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Java 8
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: "8"
# - name: Run Unit Tests
# run: mvn --no-transfer-progress clean test
- name: Install bower
run: npm install -g bower
- name: Package
run: mvn --no-transfer-progress clean package -DskipTests
- uses: actions/upload-artifact@v4
with:
name: atomfeed-console-SNAPSHOT.jar
path: target/*.jar
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Atomfeed Console
================

[![Build Status](https://travis-ci.org/ICT4H/atomfeed-console.png)](https://travis-ci.org/ICT4H/atomfeed-console)
![Build Status](https://github.com/ICT4H/atomfeed-console/actions/workflows/build_upload.yml/badge.svg)

Build
=====
Expand Down
1 change: 1 addition & 0 deletions package/docker/.appversion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.0.0
8 changes: 8 additions & 0 deletions package/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM amazoncorretto:8
COPY package/docker/resources/application.yml.template .
COPY package/docker/resources/start.sh .
COPY package/docker/resources/*.jar .
RUN yum install -y gettext
EXPOSE 9080
RUN chmod +x start.sh
ENTRYPOINT ["./start.sh"]
13 changes: 13 additions & 0 deletions package/docker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# atomfeed-console

This directory contains resources for building Docker image for atomfeed-console. The atomfeed-console container is used to show the failed events that happened in an atomfeed client.

Atomfeed console is is useful when you are facing some sync issues with components like OpenMRS, OpenELIS, Odoo, etc. Issues can be like patients not getting created, orders not getting synced, pacs orders not getting synced etc.,

## Building the image locally
1. Checkout the [atomfeed-console](https://github.com/ICT4H/atomfeed-console) repository.
2. Generate the jar file by running `mvn clean install -DskipTests`.
3. Copy the jar file to `package/docker/resources`
4. Build the docker image `docker build -t atomfeed-console:latest .` from the project root.

[application.yml.template](package/docker/resources/application.yml.template) contains list of atom feeds that we want to configure in Atomfeed Console. To add/remove the feed sources, update the [list](package/docker/resources/application.yml.template#L4) accordingly.
19 changes: 19 additions & 0 deletions package/docker/resources/application.yml.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
server:
port: 9080
contextPath: /atomfeed-console
appConfigs:
-
appName: OpenMRS
dbUrl: jdbc:mysql://${OPENMRS_DB_HOST}/openmrs
dbUser: ${OPENMRS_DB_USERNAME}
dbPassword: ${OPENMRS_DB_PASSWORD}
-
appName: OpenERP
dbUrl: jdbc:postgresql://odoodb/odoo
dbUser: ${ODOO_DB_USER}
dbPassword: ${ODOO_DB_PASSWORD}
-
appName: OpenELIS
dbUrl: jdbc:postgresql://openelisdb/clinlims?currentSchema=clinlims
dbUser: ${OPENELIS_DB_USER}
dbPassword: ${OPENELIS_DB_PASSWORD}
7 changes: 7 additions & 0 deletions package/docker/resources/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
set -e

echo "[INFO] Substituting Environment Variables"
envsubst < application.yml.template > application.yml
echo "[INFO] Starting Application"
java -jar *.jar --spring.config.location=appilcation.yml

0 comments on commit eaedc52

Please sign in to comment.