-
Notifications
You must be signed in to change notification settings - Fork 2
118 lines (100 loc) · 6.59 KB
/
ci-cd.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
name: CI/CD Pipeline
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and Push Embedding Flow
run: |
cd opol/stack
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/embedding-flow:${{ github.sha }} -f ./embedding-service/Dockerfile --target flow .
docker push ${{ secrets.DOCKERHUB_USERNAME }}/embedding-flow:${{ github.sha }}
docker tag ${{ secrets.DOCKERHUB_USERNAME }}/embedding-flow:${{ github.sha }} ${{ secrets.DOCKERHUB_USERNAME }}/embedding-flow:latest
docker push ${{ secrets.DOCKERHUB_USERNAME }}/embedding-flow:latest
- name: Build and Push Scraper Flow
run: |
cd opol/stack
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/scraper-flow:${{ github.sha }} -f ./scraper-service/Dockerfile --target flow .
docker push ${{ secrets.DOCKERHUB_USERNAME }}/scraper-flow:${{ github.sha }}
docker tag ${{ secrets.DOCKERHUB_USERNAME }}/scraper-flow:${{ github.sha }} ${{ secrets.DOCKERHUB_USERNAME }}/scraper-flow:latest
docker push ${{ secrets.DOCKERHUB_USERNAME }}/scraper-flow:latest
- name: Build and Push Entities Flow
run: |
cd opol/stack
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/entities-flow:${{ github.sha }} -f ./entity-service/Dockerfile --target flow .
docker push ${{ secrets.DOCKERHUB_USERNAME }}/entities-flow:${{ github.sha }}
docker tag ${{ secrets.DOCKERHUB_USERNAME }}/entities-flow:${{ github.sha }} ${{ secrets.DOCKERHUB_USERNAME }}/entities-flow:latest
docker push ${{ secrets.DOCKERHUB_USERNAME }}/entities-flow:latest
- name: Build and Push Custom LiteLLM
run: |
cd opol/stack
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/entities-flow:${{ github.sha }} -f ./entity-service/Dockerfile --target flow .
docker push ${{ secrets.DOCKERHUB_USERNAME }}/entities-flow:${{ github.sha }}
docker tag ${{ secrets.DOCKERHUB_USERNAME }}/entities-flow:${{ github.sha }} ${{ secrets.DOCKERHUB_USERNAME }}/entities-flow:latest
docker push ${{ secrets.DOCKERHUB_USERNAME }}/entities-flow:latest
- name: Build and Push Custom LiteLLM
run: |
cd opol/stack
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/custom-litellm:${{ github.sha }} -f ./litellm/Dockerfile .
docker push ${{ secrets.DOCKERHUB_USERNAME }}/custom-litellm:${{ github.sha }}
docker tag ${{ secrets.DOCKERHUB_USERNAME }}/custom-litellm:${{ github.sha }} ${{ secrets.DOCKERHUB_USERNAME }}/custom-litellm:latest
docker push ${{ secrets.DOCKERHUB_USERNAME }}/custom-litellm:latest
- name: Build and Push Entity Service
run: |
cd opol/stack
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/entity-service:${{ github.sha }} -f ./entity-service/Dockerfile .
docker push ${{ secrets.DOCKERHUB_USERNAME }}/entity-service:${{ github.sha }}
docker tag ${{ secrets.DOCKERHUB_USERNAME }}/entity-service:${{ github.sha }} ${{ secrets.DOCKERHUB_USERNAME }}/entity-service:latest
docker push ${{ secrets.DOCKERHUB_USERNAME }}/entity-service:latest
- name: Build and Push Geo Service
run: |
cd opol/stack
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/geo-service:${{ github.sha }} -f ./geo-service/Dockerfile .
docker push ${{ secrets.DOCKERHUB_USERNAME }}/geo-service:${{ github.sha }}
docker tag ${{ secrets.DOCKERHUB_USERNAME }}/geo-service:${{ github.sha }} ${{ secrets.DOCKERHUB_USERNAME }}/geo-service:latest
docker push ${{ secrets.DOCKERHUB_USERNAME }}/geo-service:latest
- name: Build and Push Main Core App
run: |
cd opol/stack
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/opol-core-app:${{ github.sha }} -f ./app/Dockerfile .
docker push ${{ secrets.DOCKERHUB_USERNAME }}/opol-core-app:${{ github.sha }}
docker tag ${{ secrets.DOCKERHUB_USERNAME }}/opol-core-app:${{ github.sha }} ${{ secrets.DOCKERHUB_USERNAME }}/opol-core-app:latest
docker push ${{ secrets.DOCKERHUB_USERNAME }}/opol-core-app:latest
- name: Build and Push Embedding Service
run: |
cd opol/stack
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/embedding-service:${{ github.sha }} -f ./embedding-service/Dockerfile .
docker push ${{ secrets.DOCKERHUB_USERNAME }}/embedding-service:${{ github.sha }}
docker tag ${{ secrets.DOCKERHUB_USERNAME }}/embedding-service:${{ github.sha }} ${{ secrets.DOCKERHUB_USERNAME }}/embedding-service:latest
docker push ${{ secrets.DOCKERHUB_USERNAME }}/embedding-service:latest
- name: Build and Push Postgres Service
run: |
cd opol/stack
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/postgres-service:${{ github.sha }} -f ./postgres-service/Dockerfile .
docker push ${{ secrets.DOCKERHUB_USERNAME }}/postgres-service:${{ github.sha }}
docker tag ${{ secrets.DOCKERHUB_USERNAME }}/postgres-service:${{ github.sha }} ${{ secrets.DOCKERHUB_USERNAME }}/postgres-service:latest
docker push ${{ secrets.DOCKERHUB_USERNAME }}/postgres-service:latest
- name: Build and Push Scraper Service
run: |
cd opol/stack
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/scraper-service:${{ github.sha }} -f ./scraper-service/Dockerfile .
docker push ${{ secrets.DOCKERHUB_USERNAME }}/scraper-service:${{ github.sha }}
docker tag ${{ secrets.DOCKERHUB_USERNAME }}/scraper-service:${{ github.sha }} ${{ secrets.DOCKERHUB_USERNAME }}/scraper-service:latest
docker push ${{ secrets.DOCKERHUB_USERNAME }}/scraper-service:latest
- name: Build and Push Classification Service
run: |
cd opol/stack
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/classification-service:${{ github.sha }} -f ./classification-service/Dockerfile .
docker push ${{ secrets.DOCKERHUB_USERNAME }}/classification-service:${{ github.sha }}
docker tag ${{ secrets.DOCKERHUB_USERNAME }}/classification-service:${{ github.sha }} ${{ secrets.DOCKERHUB_USERNAME }}/classification-service:latest
docker push ${{ secrets.DOCKERHUB_USERNAME }}/classification-service:latest