Skip to content

Commit

Permalink
Merge pull request #134 from glorat/cicd
Browse files Browse the repository at this point in the history
Cicd improvements
  • Loading branch information
glorat committed Nov 12, 2022
2 parents 6b3c676 + 730d01f commit 9f7abc1
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dockerimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ jobs:
run: gcloud auth configure-docker --quiet

- name: Build Docker image
run: docker build . --file fast.Dockerfile -t $IMAGE_NAME
run: docker build . --file fasttest.Dockerfile -t $IMAGE_NAME
34 changes: 17 additions & 17 deletions .github/workflows/quasar_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ jobs:
target: poc
channelId: live
entryPoint: ./client
deploy_backend:
release_backend:
name: Build and test backend
runs-on: ubuntu-latest
needs: [ pre_check ]
Expand All @@ -148,20 +148,20 @@ jobs:

- name: Push Docker image
run: docker push $IMAGE_NAME
deploy_backend:
name: Deploy backend
runs-on: ubuntu-latest
needs: [ release_backend ]
strategy:
matrix:
server: [ "quotes", "appserver" ]
steps:
- name: Release ${{ matrix.server }} server
run: |-
gcloud run deploy ${{ matrix.server }} \
--region asia-northeast1 \
--image gcr.io/gainstrack/gainstrack \
--platform managed \
--allow-unauthenticated \
--project gainstrack
- name: Release quotes server
run: |-
gcloud run deploy quotes \
--region asia-northeast1 \
--image gcr.io/gainstrack/gainstrack \
--platform managed \
--allow-unauthenticated \
--project gainstrack
- name: Release appserver server
run: |-
gcloud run deploy appserver \
--region asia-northeast1 \
--image gcr.io/gainstrack/gainstrack \
--platform managed \
--allow-unauthenticated \
--project gainstrack
2 changes: 1 addition & 1 deletion .github/workflows/runtimebase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
run: gcloud auth configure-docker --quiet

- name: Build Docker image
run: docker build . --file scalabase.Dockerfile -t $IMAGE_NAME
run: docker build . --file runtime.Dockerfile -t $IMAGE_NAME

- name: Push Docker image
run: docker push $IMAGE_NAME
2 changes: 1 addition & 1 deletion fast.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ COPY build.sbt .
COPY web web
COPY quotes quotes
COPY core core
RUN sbt test assembly
RUN sbt assembly

FROM gcr.io/gainstrack/runtime
RUN mkdir -p /app
Expand Down
8 changes: 8 additions & 0 deletions fasttest.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM gcr.io/gainstrack/scalabase as builder
WORKDIR /build
COPY project project
COPY build.sbt .
COPY web web
COPY quotes quotes
COPY core core
RUN sbt test assembly

0 comments on commit 9f7abc1

Please sign in to comment.