Skip to content

Commit

Permalink
aks dev build
Browse files Browse the repository at this point in the history
  • Loading branch information
ahjyrkia committed Apr 23, 2024
1 parent e5bf1d4 commit ee2420f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
21 changes: 20 additions & 1 deletion .github/workflows/test-and-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,23 @@ jobs:
name: hsldevcom/transitdata-cache-bootstrapper
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
tag_semver: true
tag_semver: true
build-aks-dev-docker-image:
needs: test
runs-on: ubuntu-latest
# Run only on aks-dev branch
if: github.ref == 'refs/heads/aks-dev'
steps:
- uses: actions/checkout@v2
- name: Download .jar file
uses: actions/download-artifact@v2
with:
name: transitdata-cache-bootstrapper.jar
path: target
- name: Build and publish aks-dev Docker image
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: hsldevcom/transitdata-cache-bootstrapper
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
tags: aks-dev
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,7 @@ public static void main(String[] args) {

try {
//Default path is what works with Docker out-of-the-box. Override with a local file if needed
final String secretFilePath = ConfigUtils.getEnv("FILEPATH_CONNECTION_STRING").orElse("/run/secrets/pubtrans_community_conn_string");
connectionString = new Scanner(new File(secretFilePath))
.useDelimiter("\\Z").next();
connectionString = System.getenv("TRANSITDATA_PUBTRANS_CONN_STRING");
} catch (Exception e) {
log.error("Failed to read the DB connection string from the file", e);
}
Expand Down

0 comments on commit ee2420f

Please sign in to comment.