41 lines
1.0 KiB
YAML
41 lines
1.0 KiB
YAML
kind: pipeline
|
|
type: docker
|
|
name: default
|
|
|
|
steps:
|
|
- name: Install dependencies
|
|
image: node:18-alpine
|
|
commands:
|
|
- npm ci
|
|
|
|
- name: Build
|
|
image: node:18-alpine
|
|
commands:
|
|
- npm run build
|
|
|
|
- name: Build Docker Image
|
|
image: docker:dind
|
|
environment:
|
|
DOCKER_USERNAME:
|
|
from_secret: DOCKER_USERNAME
|
|
DOCKER_PASSWORD:
|
|
from_secret: DOCKER_PASSWORD
|
|
DOCKER_HOST: tcp://0.0.0.0:2375
|
|
DOCKER_TLS_CERTDIR: "/certs"
|
|
commands:
|
|
- dockerd --host=tcp://0.0.0.0:2375 &
|
|
- sleep 10
|
|
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
|
|
- docker build -t adminsoftwarecraft/opengis:latest .
|
|
- docker push adminsoftwarecraft/opengis:latest
|
|
|
|
- name: Deploy to Server
|
|
image: curlimages/curl:latest
|
|
environment:
|
|
WEBHOOK_URL:
|
|
from_secret: WEBHOOK_URL
|
|
WEBHOOK_SECRET:
|
|
from_secret: WEBHOOK_SECRET
|
|
commands:
|
|
- 'curl -X POST "$WEBHOOK_URL" -H "Authorization: Bearer $WEBHOOK_SECRET"'
|