Skip to content

Commit

Permalink
meteorology-eurac: use docker-build-and-push
Browse files Browse the repository at this point in the history
  • Loading branch information
dulvui committed Oct 19, 2023
1 parent 5f12e74 commit 2d0613b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 15 deletions.
30 changes: 15 additions & 15 deletions .github/workflows/meteorology-eurac-dc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ env:
AWS_ACCESS_SECRET_KEY : ${{ secrets.AWS_ACCESS_SECRET_KEY }}
JAVA_VERSION: 17
WORKING_DIRECTORY: collectors/meteorology-eurac
DOCKER_IMAGE: ghcr.io/${{ github.repository }}/meteorology-eurac
DOCKER_TAG: 0.0.0


jobs:
Expand All @@ -30,12 +32,12 @@ jobs:
- name: Authenticate to AWS EKS
run: aws eks --region ${{ env.AWS_REGION }} update-kubeconfig --name ${{ env.AWS_EKS_CLUSTER_NAME }}

- name: Log in to GitHub Docker Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# - name: Log in to GitHub Docker Registry
# uses: docker/login-action@v2
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}

- name: Build libs
uses: noi-techpark/github-actions/maven-build@v2
Expand All @@ -51,17 +53,15 @@ jobs:
java-version: ${{ env.JAVA_VERSION }}
build-command: 'mvn clean install'

# - name: Build and push images
# uses: noi-techpark/github-actions/docker-build-and-push@v2
# with:
# working-directory: ${{ env.WORKING_DIRECTORY }}/infrastructure
# docker-username: ${{ github.actor }}
# docker-password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push images
uses: noi-techpark/github-actions/docker-build-and-push@v2
with:
working-directory: ${{ env.WORKING_DIRECTORY }}/infrastructure
docker-username: ${{ github.actor }}
docker-password: ${{ secrets.GITHUB_TOKEN }}

- name: Helm deployment
working-directory: ${{ env.WORKING_DIRECTORY }}
run: |
RELEASETIME=`date +%s` \
&& docker build -t ghcr.io/noi-techpark/odh-v2-playground/meteorology-eurac:0.0.0 . -f infrastructure/docker/Dockerfile \
&& docker image push ghcr.io/noi-techpark/odh-v2-playground/meteorology-eurac:0.0.0 \
&& helm upgrade --install dc-meteorology-eurac ../../helm/generic-collector --values infrastructure/helm/values.yaml --set-string podAnnotations.releaseTime=$RELEASETIME
&& helm upgrade --install dc-meteorology-eurac infrastructure/helm/generic-collector --values infrastructure/helm/values.yaml --set-string podAnnotations.releaseTime=$RELEASETIME
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: "3.4"

services:
app:
image: ${DOCKER_IMAGE}:${DOCKER_TAG}
build:
context: ../
dockerfile: infrastructure/docker/Dockerfile

0 comments on commit 2d0613b

Please sign in to comment.