Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into serilization-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
psuzn committed Oct 9, 2023
2 parents ddba3f7 + 8690ed4 commit 9c10428
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 42 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @psuzn
70 changes: 70 additions & 0 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: play-deals-backend 1.0 CD
on:
push:
tags:
- '*'
jobs:
build_image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'

- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@ccb4328a959376b642e027874838f60f8e596de3

- name: Build Project with Gradle
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629
with:
arguments: build

- uses: extractions/setup-just@v1

- name: Build and publish image with jib
if: ${{ github.ref == 'refs/heads/main' }}
run: just build-push-image
env:
DOCKER_USER: ${{ github.actor }}
DOCKER_PASSWORD: ${{ github.token }}

deploy_on_k8:
runs-on: ubuntu-latest
needs: build_image
steps:
- uses: actions/checkout@v3

- uses: extractions/setup-just@v1

- uses: azure/setup-helm@v3

- uses: azure/setup-kubectl@v3
id: install
name: Setup kubectl client

- name: create KUBECONFIG
if: ${{ github.ref == 'refs/heads/main' }}
run: |
echo ${{ secrets.KUBE_CONFIG }} | base64 --decode > kube-config;
chmod 600 kube-config;
echo "KUBECONFIG=$(pwd)/kube-config" >> "$GITHUB_ENV"
- name: Deploy on k8
if: ${{ github.ref == 'refs/heads/main' }}
run: |
kubectl config current-context;
just helm-upgrade;
env:
DB_HOST: ${{ secrets.DB_HOST }}
DB_USERNAME: ${{ secrets.DB_USERNAME }}
DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
DB_PORT: ${{ secrets.DB_PORT }}
DB_NAME: ${{ secrets.DB_NAME }}
DASHBOARD: ${{ secrets.DASHBOARD }}
DASHBOARD_USER: ${{ secrets.DASHBOARD_USER }}
DASHBOARD_PASS: ${{ secrets.DASHBOARD_PASS }}


49 changes: 7 additions & 42 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,64 +1,29 @@
name: play-deals-backend 1.0 CI

name: play-deals-backend 1.1 CI
on:
push:
pull_request:
workflow_dispatch:

jobs:
build:
check_verify:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle

- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@ccb4328a959376b642e027874838f60f8e596de3
uses: gradle/wrapper-validation-action@v1.1.0

- name: Build Project with Gradle
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629
with:
arguments: build

- uses: extractions/setup-just@v1

- name: Build and publish image with jib
if: ${{ github.ref == 'refs/heads/main' }}
run: just build-push-image
env:
DOCKER_USER: ${{ github.actor }}
DOCKER_PASSWORD: ${{ github.token }}

- uses: azure/setup-helm@v3
- uses: azure/setup-kubectl@v3
id: install
name: Setup kubectl client

- name: create KUBECONFIG
if: ${{ github.ref == 'refs/heads/main' }}
run: |
echo ${{ secrets.KUBE_CONFIG }} | base64 --decode > kube-config;
chmod 600 kube-config;
echo "KUBECONFIG=$(pwd)/kube-config" >> "$GITHUB_ENV"
- name: Deploy on k8
if: ${{ github.ref == 'refs/heads/main' }}
run: |
kubectl config current-context;
just helm-upgrade;
env:
DB_HOST: ${{ secrets.DB_HOST }}
DB_USERNAME: ${{ secrets.DB_USERNAME }}
DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
DB_PORT: ${{ secrets.DB_PORT }}
DB_NAME: ${{ secrets.DB_NAME }}
DASHBOARD: ${{ secrets.DASHBOARD }}
DASHBOARD_USER: ${{ secrets.DASHBOARD_USER }}
DASHBOARD_PASS: ${{ secrets.DASHBOARD_PASS }}




0 comments on commit 9c10428

Please sign in to comment.