Compare commits
8 Commits
Author | SHA1 | Date |
---|---|---|
Giles | c79fa6c1c2 | |
Giles | f61f8df399 | |
Giles | d53481ed22 | |
Giles | 4f622d1cbf | |
Giles | 8914443e2a | |
Giles | 1909cd5143 | |
Giles | 5b8b072d9a | |
Giles | 1cb05f5375 |
|
@ -0,0 +1 @@
|
|||
echo 'nothing to build'
|
|
@ -0,0 +1,4 @@
|
|||
docker stack rm huginn
|
||||
echo 'sleeping...zzz'
|
||||
sleep 60
|
||||
docker stack deploy -c docker-compose.yml huginn
|
|
@ -0,0 +1,17 @@
|
|||
|
||||
local secretSecrets = import 'lib/secret-secrets.libsonnet';
|
||||
local publicSecrets = import 'lib/public-secrets.libsonnet';
|
||||
|
||||
local deploy = import 'node_modules/@sigyl/jsonnet-drone/deploy.libsonnet';
|
||||
[
|
||||
deploy(
|
||||
'huginn',
|
||||
'/stack/',
|
||||
[
|
||||
'LOCAL_DOCKER_REGISTRY',
|
||||
'REGISTRY_PASSWORD',
|
||||
],
|
||||
publicSecrets,
|
||||
secretSecrets
|
||||
),
|
||||
]
|
|
@ -0,0 +1,192 @@
|
|||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: deploy
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
|
||||
steps:
|
||||
- name: print env
|
||||
image: appleboy/drone-ssh:1.6.2
|
||||
settings:
|
||||
envs:
|
||||
- drone_tag
|
||||
- drone_commit
|
||||
- drone_build_number
|
||||
- drone_repo_name
|
||||
- drone_repo_namespace
|
||||
- local_docker_registry
|
||||
- registry_password
|
||||
- smtp_domain
|
||||
- smtp_user_name
|
||||
- smtp_server
|
||||
- email_from_address
|
||||
- smtp_port
|
||||
- smtp_password
|
||||
- invitation_code
|
||||
- database_password
|
||||
host:
|
||||
from_secret: ssh-host
|
||||
key:
|
||||
from_secret: ssh-key
|
||||
port:
|
||||
from_secret: ssh-port
|
||||
script:
|
||||
- rm -f env-huginn
|
||||
- "echo \"export LOCAL_DOCKER_REGISTRY='$${LOCAL_DOCKER_REGISTRY}'\" >> env-huginn # \"local-docker-registry\""
|
||||
- "echo \"export REGISTRY_PASSWORD='$${REGISTRY_PASSWORD}'\" >> env-huginn # \"registry-password\""
|
||||
- "echo \"export SMTP_DOMAIN='$${SMTP_DOMAIN}'\" >> env-huginn # \"smtp-domain\""
|
||||
- "echo \"export SMTP_USER_NAME='$${SMTP_USER_NAME}'\" >> env-huginn # \"smtp-user-name\""
|
||||
- "echo \"export SMTP_SERVER='$${SMTP_SERVER}'\" >> env-huginn # \"smtp-server\""
|
||||
- "echo \"export EMAIL_FROM_ADDRESS='$${EMAIL_FROM_ADDRESS}'\" >> env-huginn # \"email-from-address\""
|
||||
- "echo \"export SMTP_PORT='$${SMTP_PORT}'\" >> env-huginn # \"smtp-port\""
|
||||
- "echo \"export SMTP_PASSWORD='$${SMTP_PASSWORD}'\" >> env-huginn # \"smtp-password\""
|
||||
- "echo \"export INVITATION_CODE='$${INVITATION_CODE}'\" >> env-huginn # \"invitation-code\""
|
||||
- "echo \"export DATABASE_PASSWORD='$${DATABASE_PASSWORD}'\" >> env-huginn # \"database-password\""
|
||||
username:
|
||||
from_secret: ssh-user
|
||||
environment:
|
||||
DATABASE_PASSWORD:
|
||||
from_secret: database-password
|
||||
EMAIL_FROM_ADDRESS:
|
||||
from_secret: email-from-address
|
||||
INVITATION_CODE:
|
||||
from_secret: invitation-code
|
||||
LOCAL_DOCKER_REGISTRY:
|
||||
from_secret: local-docker-registry
|
||||
REGISTRY_PASSWORD:
|
||||
from_secret: registry-password
|
||||
SMTP_DOMAIN:
|
||||
from_secret: smtp-domain
|
||||
SMTP_PASSWORD:
|
||||
from_secret: smtp-password
|
||||
SMTP_PORT:
|
||||
from_secret: smtp-port
|
||||
SMTP_SERVER:
|
||||
from_secret: smtp-server
|
||||
SMTP_USER_NAME:
|
||||
from_secret: smtp-user-name
|
||||
|
||||
- name: scp
|
||||
image: appleboy/drone-scp:1.6.2
|
||||
settings:
|
||||
command_timeout: 2m
|
||||
host:
|
||||
from_secret: ssh-host
|
||||
key:
|
||||
from_secret: ssh-key
|
||||
port:
|
||||
from_secret: ssh-port
|
||||
source:
|
||||
- .
|
||||
target: /stack/huginn
|
||||
username:
|
||||
from_secret: ssh-user
|
||||
|
||||
- name: wait
|
||||
image: alpine
|
||||
commands:
|
||||
- sleep 15
|
||||
|
||||
- name: "dockerbuild:"
|
||||
image: docker:dind
|
||||
commands:
|
||||
- set -e
|
||||
- sh .drone/login.sh
|
||||
- sh .drone/build.sh
|
||||
- sh .drone/push.sh
|
||||
- sh .drone/logout.sh
|
||||
environment:
|
||||
LOCAL_DOCKER_REGISTRY:
|
||||
from_secret: local-docker-registry
|
||||
REGISTRY_PASSWORD:
|
||||
from_secret: registry-password
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run
|
||||
|
||||
- name: deploy
|
||||
image: appleboy/drone-ssh:1.6.2
|
||||
settings:
|
||||
envs:
|
||||
- drone_tag
|
||||
- drone_commit
|
||||
- drone_build_number
|
||||
- drone_repo_name
|
||||
- drone_repo_namespace
|
||||
- smtp_domain
|
||||
- smtp_user_name
|
||||
- smtp_server
|
||||
- email_from_address
|
||||
- smtp_port
|
||||
- smtp_password
|
||||
- invitation_code
|
||||
- database_password
|
||||
- local_docker_registry
|
||||
- registry_password
|
||||
host:
|
||||
from_secret: ssh-host
|
||||
key:
|
||||
from_secret: ssh-key
|
||||
port:
|
||||
from_secret: ssh-port
|
||||
script:
|
||||
- export SMTP_PASSWORD=$${SMTP_PASSWORD}
|
||||
- export INVITATION_CODE=$${INVITATION_CODE}
|
||||
- export DATABASE_PASSWORD=$${DATABASE_PASSWORD}
|
||||
- export SMTP_DOMAIN=$${SMTP_DOMAIN}
|
||||
- export SMTP_USER_NAME=$${SMTP_USER_NAME}
|
||||
- export SMTP_SERVER=$${SMTP_SERVER}
|
||||
- export EMAIL_FROM_ADDRESS=$${EMAIL_FROM_ADDRESS}
|
||||
- export SMTP_PORT=$${SMTP_PORT}
|
||||
- export LOCAL_DOCKER_REGISTRY=$${LOCAL_DOCKER_REGISTRY}
|
||||
- export REGISTRY_PASSWORD=$${REGISTRY_PASSWORD}
|
||||
- set -e
|
||||
- cd /stack/huginn
|
||||
- sh .drone/login.sh
|
||||
- sh .drone/pull.sh
|
||||
- sh .drone/deploy.sh
|
||||
username:
|
||||
from_secret: ssh-user
|
||||
environment:
|
||||
DATABASE_PASSWORD:
|
||||
from_secret: database-password
|
||||
EMAIL_FROM_ADDRESS:
|
||||
from_secret: email-from-address
|
||||
INVITATION_CODE:
|
||||
from_secret: invitation-code
|
||||
LOCAL_DOCKER_REGISTRY:
|
||||
from_secret: local-docker-registry
|
||||
REGISTRY_PASSWORD:
|
||||
from_secret: registry-password
|
||||
SMTP_DOMAIN:
|
||||
from_secret: smtp-domain
|
||||
SMTP_PASSWORD:
|
||||
from_secret: smtp-password
|
||||
SMTP_PORT:
|
||||
from_secret: smtp-port
|
||||
SMTP_SERVER:
|
||||
from_secret: smtp-server
|
||||
SMTP_USER_NAME:
|
||||
from_secret: smtp-user-name
|
||||
|
||||
services:
|
||||
- name: docker
|
||||
image: docker:dind
|
||||
privileged: true
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run
|
||||
- name: ca
|
||||
path: /etc/docker/certs.d
|
||||
|
||||
volumes:
|
||||
- name: dockersock
|
||||
temp: {}
|
||||
- name: ca
|
||||
host:
|
||||
path: /etc/docker/certs.d
|
||||
|
||||
...
|
|
@ -0,0 +1,7 @@
|
|||
[
|
||||
'smtp-domain',
|
||||
'smtp-user-name',
|
||||
'smtp-server',
|
||||
'email-from-address',
|
||||
'smtp-port',
|
||||
]
|
|
@ -0,0 +1,5 @@
|
|||
[
|
||||
"smtp-password",
|
||||
"invitation-code",
|
||||
"database-password",
|
||||
]
|
|
@ -0,0 +1 @@
|
|||
docker login ${LOCAL_DOCKER_REGISTRY} --username client --password "${REGISTRY_PASSWORD}"
|
|
@ -0,0 +1 @@
|
|||
docker logout ${LOCAL_DOCKER_REGISTRY}
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "drone jsonnet --source drone-home.jsonnet --target drone-home.yml --stream"
|
||||
},
|
||||
"dependencies": {
|
||||
"@sigyl/jsonnet-drone": "^0.0.7"
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
echo 'nothing to pull'
|
|
@ -0,0 +1 @@
|
|||
echo 'nothing to push'
|
|
@ -0,0 +1,21 @@
|
|||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@sigyl/jsonnet-compose@^0.0.2":
|
||||
version "0.0.2"
|
||||
resolved "https://registry.yarnpkg.com/@sigyl/jsonnet-compose/-/jsonnet-compose-0.0.2.tgz#8900a21e8cd8109929b6042703f8645aacb9bcda"
|
||||
integrity sha512-wWS3CgPeNi/o1pcS6n/4pafxlMD0KC9/RKMZr/ySmzeGNRW++sPuKuxajYse2TNd47uNDdeUSnk4aEeEIKL0zA==
|
||||
|
||||
"@sigyl/jsonnet-drone-environment@0.0.5":
|
||||
version "0.0.5"
|
||||
resolved "https://registry.yarnpkg.com/@sigyl/jsonnet-drone-environment/-/jsonnet-drone-environment-0.0.5.tgz#9ea85e08904777bd21a3e4b30b0b91461d0285ff"
|
||||
integrity sha512-xVGmdMO1pOyozAWUbJm6mzKBgsLPJ+1hWnGCK3AxPkr7kkDh18hu30+TLzlcQtqq76s5jUfvJUztezsGj/mIcw==
|
||||
|
||||
"@sigyl/jsonnet-drone@^0.0.7":
|
||||
version "0.0.7"
|
||||
resolved "https://registry.yarnpkg.com/@sigyl/jsonnet-drone/-/jsonnet-drone-0.0.7.tgz#0f92ef15096b0c5497741ff56bfbd249de9edd66"
|
||||
integrity sha512-353n/zExNnKPPZ235eLX3/DFXJVNIX8fdAeG3RvY+55538eGzDIk0/3HJd8jXsD6y0zxm+LexW5HghvXBMBOEA==
|
||||
dependencies:
|
||||
"@sigyl/jsonnet-compose" "^0.0.2"
|
||||
"@sigyl/jsonnet-drone-environment" "0.0.5"
|
|
@ -0,0 +1,2 @@
|
|||
node_modules
|
||||
*.log
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"tagMessageInChangeLog": true
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
||||
|
||||
### [0.0.3](https://sigyl.com///compare/v0.0.2...v0.0.3) "chore(release): 0.0.3" (2020-08-19)
|
||||
|
||||
### [0.0.2](https://sigyl.com///compare/v0.0.1...v0.0.2) "chore(release): 0.0.2" (2020-08-19)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* wrong scripts ([1909cd5](https://sigyl.com///commit/1909cd514390ea5697fcd3e0b67363b6ce198846))
|
||||
|
||||
### 0.0.1 "chore(release): 0.0.1" (2020-08-19)
|
|
@ -0,0 +1,3 @@
|
|||
drone jsonnet --source .drone/drone-home.jsonnet --target .drone/drone-home.yml --stream \
|
||||
&& git add .drone/drone-home.yml \
|
||||
&& echo "jsonnet built"
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"private": true,
|
||||
"name": "huginn",
|
||||
"version": "0.0.3",
|
||||
"scripts": {
|
||||
"release": "standard-version",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://sigyl.com/git/stack/huginn"
|
||||
},
|
||||
"author": "Giles Bradshaw",
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"standard-version": "git+https://github.com/gilesbradshaw/standard-version.git"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue