ajuste no drone.yml

This commit is contained in:
Marcus Bohessef 2025-12-12 00:14:08 -03:00
parent 44641a9115
commit c32e5a0d96
2 changed files with 2 additions and 13 deletions

View file

@ -8,20 +8,16 @@ steps:
# --------------------------------------------------------------- # ---------------------------------------------------------------
- name: build-and-push-backend - name: build-and-push-backend
image: plugins/docker:latest image: plugins/docker:latest
settings: settings:
registry: in.gohorsejobs.com registry: in.gohorsejobs.com
repo: in.gohorsejobs.com/gohorsejobs/gohorsejobs-backend repo: in.gohorsejobs.com/gohorsejobs/gohorsejobs-backend
tags: tags:
- latest - latest
context: backend context: backend
dockerfile: backend/Dockerfile dockerfile: backend/Dockerfile
insecure: true insecure: true
insecure_skip_verify: true insecure_skip_verify: true
debug: true debug: true
username: username:
from_secret: HARBOR_USERNAME from_secret: HARBOR_USERNAME
password: password:
@ -32,7 +28,6 @@ steps:
# --------------------------------------------------------------- # ---------------------------------------------------------------
- name: deploy-backend - name: deploy-backend
image: bitnami/kubectl:latest image: bitnami/kubectl:latest
environment: environment:
KUBERNETES_SERVER: KUBERNETES_SERVER:
from_secret: K3S_SERVER from_secret: K3S_SERVER
@ -42,10 +37,8 @@ steps:
from_secret: K3S_CLIENT_CERT from_secret: K3S_CLIENT_CERT
KUBERNETES_CLIENT_KEY: KUBERNETES_CLIENT_KEY:
from_secret: K3S_CLIENT_KEY from_secret: K3S_CLIENT_KEY
commands: commands:
- mkdir -p ~/.kube - mkdir -p ~/.kube
- | - |
cat <<EOF > ~/.kube/config cat <<EOF > ~/.kube/config
apiVersion: v1 apiVersion: v1
@ -68,7 +61,6 @@ steps:
namespace: gohorsejobs namespace: gohorsejobs
current-context: drone-context current-context: drone-context
EOF EOF
- echo "Deploying backend..." - echo "Deploying backend..."
- kubectl apply -f k8s/backend-deployment.yaml - kubectl apply -f k8s/backend-deployment.yaml
- kubectl apply -f k8s/backend-service.yaml - kubectl apply -f k8s/backend-service.yaml

View file

@ -19,13 +19,10 @@ spec:
- name: backend - name: backend
image: in.gohorsejobs.com/gohorsejobs/gohorsejobs-backend:latest image: in.gohorsejobs.com/gohorsejobs/gohorsejobs-backend:latest
imagePullPolicy: Always imagePullPolicy: Always
ports: ports:
- containerPort: 3000 - containerPort: 3000
env: env:
- name: NODE_ENV - name: NODE_ENV
value: "production" value: "production"
imagePullSecrets: imagePullSecrets:
- name: harbor-registry - name: harbor-registry