forked from innovacion/searchbox
Finish CI
This commit is contained in:
51
.github/workflows/deploy.yaml
vendored
51
.github/workflows/deploy.yaml
vendored
@@ -1,13 +1,13 @@
|
|||||||
name: Deploy
|
name: Deploy
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v*'
|
- "v*"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ci:
|
ci:
|
||||||
uses: ./.github/workflows/ci.yaml
|
uses: ./.github/workflows/ci.yaml
|
||||||
|
|
||||||
push:
|
push:
|
||||||
needs: ci
|
needs: ci
|
||||||
@@ -29,10 +29,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
images: gitea.ia-innovacion.work/innovacion/searchbox-mcp
|
images: gitea.ia-innovacion.work/innovacion/searchbox-mcp
|
||||||
tags: |
|
tags: |
|
||||||
type=ref,event=branch
|
type=ref,event=tag
|
||||||
type=ref,event=pr
|
type=ref,event=tag,suffix=-{{sha}}
|
||||||
type=sha,prefix={{branch}}-
|
type=semver,pattern={{version}}
|
||||||
type=raw,value=latest,enable={{is_default_branch}}
|
type=semver,pattern={{major}}.{{minor}}
|
||||||
|
type=raw,value=latest
|
||||||
|
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
@@ -43,22 +44,22 @@ jobs:
|
|||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
|
||||||
# deploy:
|
deploy:
|
||||||
# needs: release
|
needs: push
|
||||||
# runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
# steps:
|
steps:
|
||||||
# - name: Checkout code
|
- name: Checkout code
|
||||||
# uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
# - name: Install kubectl
|
- name: Install kubectl
|
||||||
# uses: azure/setup-kubectl@v3
|
uses: azure/setup-kubectl@v3
|
||||||
|
|
||||||
# - name: Deploy to cluster
|
- name: Deploy to cluster
|
||||||
# env:
|
env:
|
||||||
# KUBECONFIG_CONTENT: ${{ secrets.KUBECONFIG_CONTENT }}
|
KUBECONFIG_CONTENT: ${{ secrets.KUBECONFIG_CONTENT }}
|
||||||
# run: |
|
run: |
|
||||||
# echo "$KUBECONFIG_CONTENT" > kubeconfig
|
echo "$KUBECONFIG_CONTENT" > kubeconfig
|
||||||
# export KUBECONFIG=$PWD/kubeconfig
|
export KUBECONFIG=$PWD/kubeconfig
|
||||||
# kubectl apply -f .k8s/
|
kubectl apply -f .k8s/
|
||||||
# kubectl rollout restart deployment/python-demo
|
kubectl rollout restart deployment/searchbox-mcp
|
||||||
# kubectl rollout status deployment/python-demo
|
kubectl rollout status deployment/searchbox-mcp
|
||||||
|
|||||||
20
.k8s/ingress.yaml
Normal file
20
.k8s/ingress.yaml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: searchbox-mcp-ingress
|
||||||
|
namespace: apps
|
||||||
|
annotations:
|
||||||
|
nginx.ingress.kubernetes.io/rewrite-target: /
|
||||||
|
spec:
|
||||||
|
ingressClassName: nginx
|
||||||
|
rules:
|
||||||
|
- host: searchbox.app.ia-innovacion.work
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: searchbox-mcp-service
|
||||||
|
port:
|
||||||
|
number: 80
|
||||||
15
.k8s/service.yaml
Normal file
15
.k8s/service.yaml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: searchbox-mcp-service
|
||||||
|
namespace: apps
|
||||||
|
labels:
|
||||||
|
app: searchbox-mcp
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: searchbox-mcp
|
||||||
|
type: ClusterIP
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
targetPort: 8000
|
||||||
|
protocol: TCP
|
||||||
Reference in New Issue
Block a user