Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Complete MVP implementation of the Cast GHL Conversation Provider bridge: - Go module setup with chi router and mongo-driver dependencies - Config loading with env var validation and defaults - MongoDB token store with upsert, get, update, delete operations - Cast.ph SMS client with 429 retry logic and typed errors - Phone number normalization (E.164 ↔ Philippine local format) - GHL OAuth 2.0 install/callback/refresh flow - GHL webhook handler with ECDSA signature verification (async dispatch) - GHL API client for message status updates and inbound message stubs - Multi-stage Dockerfile, docker-compose with MongoDB, Woodpecker CI pipeline - Unit tests for phone normalization, Cast client, GHL webhook, and OAuth handlers Co-Authored-By: SideKx <sidekx.ai@sds.dev>
49 lines
1002 B
YAML
49 lines
1002 B
YAML
steps:
|
|
- name: build
|
|
image: golang:1.22-alpine
|
|
commands:
|
|
- go build ./cmd/server/
|
|
|
|
- name: vet
|
|
image: golang:1.22-alpine
|
|
commands:
|
|
- go vet ./...
|
|
|
|
- name: test
|
|
image: golang:1.22-alpine
|
|
commands:
|
|
- go test ./...
|
|
|
|
- name: docker-build
|
|
image: plugins/docker
|
|
settings:
|
|
repo: registry.sds.dev/cast/cast-ghl-provider
|
|
registry: registry.sds.dev
|
|
tags:
|
|
- latest
|
|
- "${CI_COMMIT_TAG}"
|
|
username:
|
|
from_secret: docker_username
|
|
password:
|
|
from_secret: docker_password
|
|
when:
|
|
event: tag
|
|
ref: refs/tags/v*
|
|
|
|
- name: deploy
|
|
image: appleboy/drone-ssh
|
|
settings:
|
|
host:
|
|
from_secret: deploy_host
|
|
username:
|
|
from_secret: deploy_user
|
|
key:
|
|
from_secret: deploy_key
|
|
script:
|
|
- cd /opt/cast-ghl-provider
|
|
- docker compose pull
|
|
- docker compose up -d --remove-orphans
|
|
when:
|
|
event: tag
|
|
ref: refs/tags/v*
|