Compare commits
3 Commits
c4b8f19d6a
...
trunk
| Author | SHA1 | Date | |
|---|---|---|---|
| 3cbc7dd529 | |||
| 2eeff8adc5 | |||
| f3c1d76ae5 |
@@ -5,8 +5,8 @@ on:
|
|||||||
branches: [trunk]
|
branches: [trunk]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-push-prod:
|
build-and-push:
|
||||||
name: Build & Push (Prod)
|
name: Build & Push
|
||||||
runs-on: heavy
|
runs-on: heavy
|
||||||
container: git.batida.io/batida/ci-node:latest
|
container: git.batida.io/batida/ci-node:latest
|
||||||
steps:
|
steps:
|
||||||
@@ -23,24 +23,10 @@ jobs:
|
|||||||
docker push git.batida.io/batida/batida-landing:${{ github.sha }}
|
docker push git.batida.io/batida/batida-landing:${{ github.sha }}
|
||||||
docker push git.batida.io/batida/batida-landing:latest
|
docker push git.batida.io/batida/batida-landing:latest
|
||||||
|
|
||||||
deploy-staging:
|
|
||||||
name: Deploy Staging
|
|
||||||
runs-on: heavy
|
|
||||||
needs: [build-and-push-prod]
|
|
||||||
container: git.batida.io/batida/ci-node:latest
|
|
||||||
steps:
|
|
||||||
- name: Deploy to staging
|
|
||||||
run: |
|
|
||||||
echo "$KUBECONFIG_CONTENT" > /tmp/kubeconfig
|
|
||||||
kubectl --kubeconfig /tmp/kubeconfig set image deployment/batida-landing batida-landing=git.batida.io/batida/batida-landing:${{ github.sha }} -n staging
|
|
||||||
kubectl --kubeconfig /tmp/kubeconfig rollout status deployment/batida-landing -n staging --timeout=120s
|
|
||||||
env:
|
|
||||||
KUBECONFIG_CONTENT: ${{ secrets.KUBECONFIG }}
|
|
||||||
|
|
||||||
deploy-prod:
|
deploy-prod:
|
||||||
name: Deploy Prod
|
name: Deploy Prod
|
||||||
runs-on: heavy
|
runs-on: heavy
|
||||||
needs: [deploy-staging]
|
needs: [build-and-push]
|
||||||
container: git.batida.io/batida/ci-node:latest
|
container: git.batida.io/batida/ci-node:latest
|
||||||
steps:
|
steps:
|
||||||
- name: Deploy to prod
|
- name: Deploy to prod
|
||||||
|
|||||||
+1
-1
@@ -45,6 +45,6 @@ COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|||||||
|
|
||||||
USER nginx-user
|
USER nginx-user
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 8080
|
||||||
|
|
||||||
CMD ["nginx", "-g", "daemon off;"]
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
|
|||||||
+3
-3
@@ -24,11 +24,11 @@ spec:
|
|||||||
- name: batida-landing
|
- name: batida-landing
|
||||||
image: git.batida.io/batida/batida-landing:latest
|
image: git.batida.io/batida/batida-landing:latest
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 80
|
- containerPort: 8080
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /
|
path: /
|
||||||
port: 80
|
port: 8080
|
||||||
initialDelaySeconds: 5
|
initialDelaySeconds: 5
|
||||||
periodSeconds: 30
|
periodSeconds: 30
|
||||||
resources:
|
resources:
|
||||||
@@ -49,4 +49,4 @@ spec:
|
|||||||
app: batida-landing
|
app: batida-landing
|
||||||
ports:
|
ports:
|
||||||
- port: 80
|
- port: 80
|
||||||
targetPort: 80
|
targetPort: 8080
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
server {
|
server {
|
||||||
listen 80;
|
listen 8080;
|
||||||
server_name _;
|
server_name _;
|
||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user