Browse Source

Add waypoint.hcl and .drone.yml

drone-waypoint
Logan Koester 3 years ago
parent
commit
385ff97da7
No known key found for this signature in database GPG Key ID: EBA7BD5CB8B7CB94
  1. 37
      .drone.yml
  2. 1
      .gitignore
  3. 3
      .smaugignore
  4. 53
      waypoint.hcl

37
.drone.yml

@ -0,0 +1,37 @@
---
kind: pipeline
type: docker
name: Waypoint
workspace:
path: /drone/workspace
steps:
- name: build
image: hashicorp/waypoint:latest
environment:
WAYPOINT_SERVER_TOKEN:
from_secret: WAYPOINT_SERVER_TOKEN
WAYPOINT_SERVER_ADDR: waypoint.smaug.dev:9701
WAYPOINT_SERVER_TLS: 1
WAYPOINT_SERVER_TLS_SKIP_VERIFY: 1
commands:
- waypoint init
- waypoint build -remote
- waypoint deploy -remote -release=false
- waypoint release -remote -prune-retain=0
trigger:
branch:
- master
- main
event:
- push
- pull_request
---
kind: secret
name: WAYPOINT_SERVER_TOKEN
data: yYSmJ+ShC0BcgGptRBVK2pbdagqE+N03A5++izgkwIgs1IyHIDfpzrdtlVtkvMHAnw==

1
.gitignore

@ -4,3 +4,4 @@ exceptions/
last_replay.txt
replay.txt
.DS_Store
.secrets

3
.smaugignore

@ -21,3 +21,6 @@ index.html
*.md
exceptions
.DS_Store
.drone.yml
.secrets
waypoint.hcl

53
waypoint.hcl

@ -0,0 +1,53 @@
# The name of your project. A project typically maps 1:1 to a VCS repository.
# This name must be unique for your Waypoint server. If you're running in
# local mode, this must be unique to your machine.
project = "smaug_project_template"
runner {
enabled = true
data_source "git" {
url = "https://git.smaug.dev/ereborstudios/smaug_project_template.git"
ref = "master"
}
}
# Labels can be specified for organizational purposes.
# labels = { "foo" = "bar" }
# An application to deploy.
app "smaug_project_template" {
config {
env = {
}
}
labels = {
"service" = var.name
}
# Build specifies how an application should be deployed. In this case,
# we'll build using a Dockerfile and keeping it in a local registry.
build {
use "docker" {
}
}
# Deploy to Docker
deploy {
use "docker" {
labels = {
"traefik.http.routers.${var.name}.rule" = "Host(`${var.name}.waypoint.smaug.dev`)"
"traefik.http.routers.${var.name}.entrypoints" = "websecure"
"traefik.http.routers.${var.name}.tls.certresolver" = "myresolver"
"traefik.http.services.${var.name}.loadbalancer.server.port" = "3000"
}
}
}
}
variable "name" {
type = string
default = "smaug_project_template"
description = "Project name"
}
Loading…
Cancel
Save