Skip to content

Commit ee2420f

Browse files
committed
aks dev build
1 parent e5bf1d4 commit ee2420f

File tree

2 files changed

+21
-4
lines changed

2 files changed

+21
-4
lines changed

.github/workflows/test-and-build.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,23 @@ jobs:
5959
name: hsldevcom/transitdata-cache-bootstrapper
6060
username: ${{ secrets.DOCKER_USERNAME }}
6161
password: ${{ secrets.DOCKER_PASSWORD }}
62-
tag_semver: true
62+
tag_semver: true
63+
build-aks-dev-docker-image:
64+
needs: test
65+
runs-on: ubuntu-latest
66+
# Run only on aks-dev branch
67+
if: github.ref == 'refs/heads/aks-dev'
68+
steps:
69+
- uses: actions/checkout@v2
70+
- name: Download .jar file
71+
uses: actions/download-artifact@v2
72+
with:
73+
name: transitdata-cache-bootstrapper.jar
74+
path: target
75+
- name: Build and publish aks-dev Docker image
76+
uses: elgohr/Publish-Docker-Github-Action@master
77+
with:
78+
name: hsldevcom/transitdata-cache-bootstrapper
79+
username: ${{ secrets.DOCKER_USERNAME }}
80+
password: ${{ secrets.DOCKER_PASSWORD }}
81+
tags: aks-dev

src/main/java/fi/hsl/transitdata/pubtransredisconnect/Main.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,7 @@ public static void main(String[] args) {
160160

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

0 commit comments

Comments
 (0)