Skip to content

Commit

Permalink
Merge pull request #41 from Goboolean/feature/cicd
Browse files Browse the repository at this point in the history
fetch-system.worker CD harbor 적용
  • Loading branch information
ikjeong authored Jul 24, 2024
2 parents 9721bb7 + 91ccec2 commit dcc40a8
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 35 deletions.
44 changes: 39 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
name: Continuous Delivery

on:
workflow_dispatch:
push:
branches:
- main

jobs:
test:
runs-on: self-hosted
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -21,12 +23,44 @@ jobs:
make test-app
build:
needs: [test]
runs-on: self-hosted
needs: test
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Build & push retriever image
- name: Decrypt environment variables
run: |
echo "${{ secrets.ENV }}" base64 -d > .env
- name: Build an app
run: |
make build-app
- name: Set up Docker daemon to using HTTP
run: |
make build-app
sudo mkdir -p /etc/docker
echo '{"insecure-registries":["${{ secrets.HARBOR_REGISTRY }}"]}' | sudo tee /etc/docker/daemon.json
sudo systemctl restart docker
- name: Login to Harbor
uses: docker/login-action@v2
with:
registry: ${{ secrets.HARBOR_REGISTRY }}
username: ${{ secrets.HARBOR_USERNAME }}
password: ${{ secrets.HARBOR_PASSWORD }}

- name: Push Docker image to Harbor
run: |
docker tag fetch-system-worker:latest ${{ secrets.HARBOR_REGISTRY }}/fetch-system/fetch-system-worker:${{ github.sha }}
docker push ${{ secrets.HARBOR_REGISTRY }}/fetch-system/fetch-system-worker:${{ github.sha }}
kustomize:
runs-on: ubuntu-latest
needs: build

# Kustomize repository update workflow
steps:
- name: Checkout
uses: actions/checkout@v2
22 changes: 0 additions & 22 deletions .github/workflows/deploy.yml

This file was deleted.

5 changes: 3 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
name: Continuous Integration

on:
workflow_dispatch:
push:
branches:
- feature/**

jobs:
test:
runs-on: self-hosted
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -18,4 +19,4 @@ jobs:
- name: Run a test
run: |
make test-app
make test-app
8 changes: 2 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@ test-app:
@docker compose -f ./deploy/docker-compose.test.yml down

build-app:
docker build -t registry.mulmuri.dev/fetch-system-worker:latest -f ./deploy/Dockerfile .
docker push registry.mulmuri.dev/fetch-system-worker:latest

deploy-app:
helm upgrade fetch-system ~/lab -n goboolean
docker build -t fetch-system-worker:latest -f ./deploy/Dockerfile .

generate-wire:
wire cmd/wire/wire_setup.go
wire cmd/wire/wire_setup.go

0 comments on commit dcc40a8

Please sign in to comment.