Merge branch 'master' of makerforce.io:beep/backend
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
04914ebc7d
313
.drone.yml
313
.drone.yml
|
@ -1,17 +1,31 @@
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
name: auth
|
name: backend-auth
|
||||||
clone:
|
clone:
|
||||||
depth: 5
|
depth: 1
|
||||||
|
steps:
|
||||||
|
- name: submodule
|
||||||
|
image: plugins/git
|
||||||
|
settings:
|
||||||
recursive: true
|
recursive: true
|
||||||
submodule_override:
|
submodule_override:
|
||||||
backend-auth: https://git.makerforce.io/beep/backend-auth.git
|
backend-auth: 'https://git.makerforce.io/beep/backend-auth.git'
|
||||||
steps:
|
backend-bite: 'https://git.makerforce.io/beep/backend-bite.git'
|
||||||
- name: docker
|
backend-core: 'https://git.makerforce.io/beep/backend-core.git'
|
||||||
|
backend-heartbeat: 'https://git.makerforce.io/beep/backend-heartbeat.git'
|
||||||
|
backend-login: 'https://git.makerforce.io/beep/backend-login.git'
|
||||||
|
backend-protobuf: 'https://git.makerforce.io/beep/backend-protobuf.git'
|
||||||
|
backend-publish: 'https://git.makerforce.io/beep/backend-publish.git'
|
||||||
|
backend-signal: 'https://git.makerforce.io/beep/backend-signal.git'
|
||||||
|
backend-store: 'https://git.makerforce.io/beep/backend-store.git'
|
||||||
|
backend-subscribe: 'https://git.makerforce.io/beep/backend-subscribe.git'
|
||||||
|
backend-transcription: 'https://git.makerforce.io/beep/backend-transcription.git'
|
||||||
|
- name: docker
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
registry: registry.makerforce.io
|
registry: registry.makerforce.io
|
||||||
repo: registry.makerforce.io/beep/backend-auth
|
repo: registry.makerforce.io/beep/backend-auth
|
||||||
context: backend-auth/
|
context: backend-auth
|
||||||
|
dockerfile: backend-auth/Dockerfile
|
||||||
auto_tag: true
|
auto_tag: true
|
||||||
username:
|
username:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
|
@ -19,20 +33,33 @@ steps:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
name: bite
|
name: backend-bite
|
||||||
clone:
|
clone:
|
||||||
depth: 5
|
depth: 1
|
||||||
steps:
|
steps:
|
||||||
- name: submodules
|
- name: submodule
|
||||||
image: docker:git
|
image: plugins/git
|
||||||
commands:
|
settings:
|
||||||
- git submodule update --init --recursive --remote
|
recursive: true
|
||||||
- name: docker
|
submodule_override:
|
||||||
|
backend-auth: 'https://git.makerforce.io/beep/backend-auth.git'
|
||||||
|
backend-bite: 'https://git.makerforce.io/beep/backend-bite.git'
|
||||||
|
backend-core: 'https://git.makerforce.io/beep/backend-core.git'
|
||||||
|
backend-heartbeat: 'https://git.makerforce.io/beep/backend-heartbeat.git'
|
||||||
|
backend-login: 'https://git.makerforce.io/beep/backend-login.git'
|
||||||
|
backend-protobuf: 'https://git.makerforce.io/beep/backend-protobuf.git'
|
||||||
|
backend-publish: 'https://git.makerforce.io/beep/backend-publish.git'
|
||||||
|
backend-signal: 'https://git.makerforce.io/beep/backend-signal.git'
|
||||||
|
backend-store: 'https://git.makerforce.io/beep/backend-store.git'
|
||||||
|
backend-subscribe: 'https://git.makerforce.io/beep/backend-subscribe.git'
|
||||||
|
backend-transcription: 'https://git.makerforce.io/beep/backend-transcription.git'
|
||||||
|
- name: docker
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
registry: registry.makerforce.io
|
registry: registry.makerforce.io
|
||||||
repo: registry.makerforce.io/beep/backend-bite
|
repo: registry.makerforce.io/beep/backend-bite
|
||||||
context: backend-bite/
|
context: backend-bite
|
||||||
|
dockerfile: backend-bite/Dockerfile
|
||||||
auto_tag: true
|
auto_tag: true
|
||||||
username:
|
username:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
|
@ -40,20 +67,33 @@ steps:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
name: core
|
name: backend-core
|
||||||
clone:
|
clone:
|
||||||
depth: 5
|
depth: 1
|
||||||
steps:
|
steps:
|
||||||
- name: submodules
|
- name: submodule
|
||||||
image: docker:git
|
image: plugins/git
|
||||||
commands:
|
settings:
|
||||||
- git submodule update --init --recursive --remote
|
recursive: true
|
||||||
- name: docker
|
submodule_override:
|
||||||
|
backend-auth: 'https://git.makerforce.io/beep/backend-auth.git'
|
||||||
|
backend-bite: 'https://git.makerforce.io/beep/backend-bite.git'
|
||||||
|
backend-core: 'https://git.makerforce.io/beep/backend-core.git'
|
||||||
|
backend-heartbeat: 'https://git.makerforce.io/beep/backend-heartbeat.git'
|
||||||
|
backend-login: 'https://git.makerforce.io/beep/backend-login.git'
|
||||||
|
backend-protobuf: 'https://git.makerforce.io/beep/backend-protobuf.git'
|
||||||
|
backend-publish: 'https://git.makerforce.io/beep/backend-publish.git'
|
||||||
|
backend-signal: 'https://git.makerforce.io/beep/backend-signal.git'
|
||||||
|
backend-store: 'https://git.makerforce.io/beep/backend-store.git'
|
||||||
|
backend-subscribe: 'https://git.makerforce.io/beep/backend-subscribe.git'
|
||||||
|
backend-transcription: 'https://git.makerforce.io/beep/backend-transcription.git'
|
||||||
|
- name: docker
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
registry: registry.makerforce.io
|
registry: registry.makerforce.io
|
||||||
repo: registry.makerforce.io/beep/backend-core
|
repo: registry.makerforce.io/beep/backend-core
|
||||||
context: backend-core/
|
context: backend-core
|
||||||
|
dockerfile: backend-core/Dockerfile
|
||||||
auto_tag: true
|
auto_tag: true
|
||||||
username:
|
username:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
|
@ -61,20 +101,33 @@ steps:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
name: heartbeat
|
name: backend-heartbeat
|
||||||
clone:
|
clone:
|
||||||
depth: 5
|
depth: 1
|
||||||
steps:
|
steps:
|
||||||
- name: submodules
|
- name: submodule
|
||||||
image: docker:git
|
image: plugins/git
|
||||||
commands:
|
settings:
|
||||||
- git submodule update --init --recursive --remote
|
recursive: true
|
||||||
- name: docker
|
submodule_override:
|
||||||
|
backend-auth: 'https://git.makerforce.io/beep/backend-auth.git'
|
||||||
|
backend-bite: 'https://git.makerforce.io/beep/backend-bite.git'
|
||||||
|
backend-core: 'https://git.makerforce.io/beep/backend-core.git'
|
||||||
|
backend-heartbeat: 'https://git.makerforce.io/beep/backend-heartbeat.git'
|
||||||
|
backend-login: 'https://git.makerforce.io/beep/backend-login.git'
|
||||||
|
backend-protobuf: 'https://git.makerforce.io/beep/backend-protobuf.git'
|
||||||
|
backend-publish: 'https://git.makerforce.io/beep/backend-publish.git'
|
||||||
|
backend-signal: 'https://git.makerforce.io/beep/backend-signal.git'
|
||||||
|
backend-store: 'https://git.makerforce.io/beep/backend-store.git'
|
||||||
|
backend-subscribe: 'https://git.makerforce.io/beep/backend-subscribe.git'
|
||||||
|
backend-transcription: 'https://git.makerforce.io/beep/backend-transcription.git'
|
||||||
|
- name: docker
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
registry: registry.makerforce.io
|
registry: registry.makerforce.io
|
||||||
repo: registry.makerforce.io/beep/backend-heartbeat
|
repo: registry.makerforce.io/beep/backend-heartbeat
|
||||||
context: backend-heartbeat/
|
context: backend-heartbeat
|
||||||
|
dockerfile: backend-heartbeat/Dockerfile
|
||||||
auto_tag: true
|
auto_tag: true
|
||||||
username:
|
username:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
|
@ -82,20 +135,33 @@ steps:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
name: login
|
name: backend-login
|
||||||
clone:
|
clone:
|
||||||
depth: 5
|
depth: 1
|
||||||
steps:
|
steps:
|
||||||
- name: submodules
|
- name: submodule
|
||||||
image: docker:git
|
image: plugins/git
|
||||||
commands:
|
settings:
|
||||||
- git submodule update --init --recursive --remote
|
recursive: true
|
||||||
- name: docker
|
submodule_override:
|
||||||
|
backend-auth: 'https://git.makerforce.io/beep/backend-auth.git'
|
||||||
|
backend-bite: 'https://git.makerforce.io/beep/backend-bite.git'
|
||||||
|
backend-core: 'https://git.makerforce.io/beep/backend-core.git'
|
||||||
|
backend-heartbeat: 'https://git.makerforce.io/beep/backend-heartbeat.git'
|
||||||
|
backend-login: 'https://git.makerforce.io/beep/backend-login.git'
|
||||||
|
backend-protobuf: 'https://git.makerforce.io/beep/backend-protobuf.git'
|
||||||
|
backend-publish: 'https://git.makerforce.io/beep/backend-publish.git'
|
||||||
|
backend-signal: 'https://git.makerforce.io/beep/backend-signal.git'
|
||||||
|
backend-store: 'https://git.makerforce.io/beep/backend-store.git'
|
||||||
|
backend-subscribe: 'https://git.makerforce.io/beep/backend-subscribe.git'
|
||||||
|
backend-transcription: 'https://git.makerforce.io/beep/backend-transcription.git'
|
||||||
|
- name: docker
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
registry: registry.makerforce.io
|
registry: registry.makerforce.io
|
||||||
repo: registry.makerforce.io/beep/backend-login
|
repo: registry.makerforce.io/beep/backend-login
|
||||||
context: backend-login/
|
context: backend-login
|
||||||
|
dockerfile: backend-login/Dockerfile
|
||||||
auto_tag: true
|
auto_tag: true
|
||||||
username:
|
username:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
|
@ -103,20 +169,33 @@ steps:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
name: publish
|
name: backend-publish
|
||||||
clone:
|
clone:
|
||||||
depth: 5
|
depth: 1
|
||||||
steps:
|
steps:
|
||||||
- name: submodules
|
- name: submodule
|
||||||
image: docker:git
|
image: plugins/git
|
||||||
commands:
|
settings:
|
||||||
- git submodule update --init --recursive --remote
|
recursive: true
|
||||||
- name: docker
|
submodule_override:
|
||||||
|
backend-auth: 'https://git.makerforce.io/beep/backend-auth.git'
|
||||||
|
backend-bite: 'https://git.makerforce.io/beep/backend-bite.git'
|
||||||
|
backend-core: 'https://git.makerforce.io/beep/backend-core.git'
|
||||||
|
backend-heartbeat: 'https://git.makerforce.io/beep/backend-heartbeat.git'
|
||||||
|
backend-login: 'https://git.makerforce.io/beep/backend-login.git'
|
||||||
|
backend-protobuf: 'https://git.makerforce.io/beep/backend-protobuf.git'
|
||||||
|
backend-publish: 'https://git.makerforce.io/beep/backend-publish.git'
|
||||||
|
backend-signal: 'https://git.makerforce.io/beep/backend-signal.git'
|
||||||
|
backend-store: 'https://git.makerforce.io/beep/backend-store.git'
|
||||||
|
backend-subscribe: 'https://git.makerforce.io/beep/backend-subscribe.git'
|
||||||
|
backend-transcription: 'https://git.makerforce.io/beep/backend-transcription.git'
|
||||||
|
- name: docker
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
registry: registry.makerforce.io
|
registry: registry.makerforce.io
|
||||||
repo: registry.makerforce.io/beep/backend-publish
|
repo: registry.makerforce.io/beep/backend-publish
|
||||||
context: backend-publish/
|
context: backend-publish
|
||||||
|
dockerfile: backend-publish/Dockerfile
|
||||||
auto_tag: true
|
auto_tag: true
|
||||||
username:
|
username:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
|
@ -124,20 +203,33 @@ steps:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
name: signal
|
name: backend-signal
|
||||||
clone:
|
clone:
|
||||||
depth: 5
|
depth: 1
|
||||||
steps:
|
steps:
|
||||||
- name: submodules
|
- name: submodule
|
||||||
image: docker:git
|
image: plugins/git
|
||||||
commands:
|
settings:
|
||||||
- git submodule update --init --recursive --remote
|
recursive: true
|
||||||
- name: docker
|
submodule_override:
|
||||||
|
backend-auth: 'https://git.makerforce.io/beep/backend-auth.git'
|
||||||
|
backend-bite: 'https://git.makerforce.io/beep/backend-bite.git'
|
||||||
|
backend-core: 'https://git.makerforce.io/beep/backend-core.git'
|
||||||
|
backend-heartbeat: 'https://git.makerforce.io/beep/backend-heartbeat.git'
|
||||||
|
backend-login: 'https://git.makerforce.io/beep/backend-login.git'
|
||||||
|
backend-protobuf: 'https://git.makerforce.io/beep/backend-protobuf.git'
|
||||||
|
backend-publish: 'https://git.makerforce.io/beep/backend-publish.git'
|
||||||
|
backend-signal: 'https://git.makerforce.io/beep/backend-signal.git'
|
||||||
|
backend-store: 'https://git.makerforce.io/beep/backend-store.git'
|
||||||
|
backend-subscribe: 'https://git.makerforce.io/beep/backend-subscribe.git'
|
||||||
|
backend-transcription: 'https://git.makerforce.io/beep/backend-transcription.git'
|
||||||
|
- name: docker
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
registry: registry.makerforce.io
|
registry: registry.makerforce.io
|
||||||
repo: registry.makerforce.io/beep/backend-signal
|
repo: registry.makerforce.io/beep/backend-signal
|
||||||
context: backend-signal/
|
context: backend-signal
|
||||||
|
dockerfile: backend-signal/Dockerfile
|
||||||
auto_tag: true
|
auto_tag: true
|
||||||
username:
|
username:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
|
@ -145,20 +237,33 @@ steps:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
name: store
|
name: backend-store
|
||||||
clone:
|
clone:
|
||||||
depth: 5
|
depth: 1
|
||||||
steps:
|
steps:
|
||||||
- name: submodules
|
- name: submodule
|
||||||
image: docker:git
|
image: plugins/git
|
||||||
commands:
|
settings:
|
||||||
- git submodule update --init --recursive --remote
|
recursive: true
|
||||||
- name: docker
|
submodule_override:
|
||||||
|
backend-auth: 'https://git.makerforce.io/beep/backend-auth.git'
|
||||||
|
backend-bite: 'https://git.makerforce.io/beep/backend-bite.git'
|
||||||
|
backend-core: 'https://git.makerforce.io/beep/backend-core.git'
|
||||||
|
backend-heartbeat: 'https://git.makerforce.io/beep/backend-heartbeat.git'
|
||||||
|
backend-login: 'https://git.makerforce.io/beep/backend-login.git'
|
||||||
|
backend-protobuf: 'https://git.makerforce.io/beep/backend-protobuf.git'
|
||||||
|
backend-publish: 'https://git.makerforce.io/beep/backend-publish.git'
|
||||||
|
backend-signal: 'https://git.makerforce.io/beep/backend-signal.git'
|
||||||
|
backend-store: 'https://git.makerforce.io/beep/backend-store.git'
|
||||||
|
backend-subscribe: 'https://git.makerforce.io/beep/backend-subscribe.git'
|
||||||
|
backend-transcription: 'https://git.makerforce.io/beep/backend-transcription.git'
|
||||||
|
- name: docker
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
registry: registry.makerforce.io
|
registry: registry.makerforce.io
|
||||||
repo: registry.makerforce.io/beep/backend-store
|
repo: registry.makerforce.io/beep/backend-store
|
||||||
context: backend-store/
|
context: backend-store
|
||||||
|
dockerfile: backend-store/Dockerfile
|
||||||
auto_tag: true
|
auto_tag: true
|
||||||
username:
|
username:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
|
@ -166,22 +271,90 @@ steps:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
name: subscribe
|
name: backend-subscribe
|
||||||
clone:
|
clone:
|
||||||
depth: 5
|
depth: 1
|
||||||
steps:
|
steps:
|
||||||
- name: submodules
|
- name: submodule
|
||||||
image: docker:git
|
image: plugins/git
|
||||||
commands:
|
settings:
|
||||||
- git submodule update --init --recursive --remote
|
recursive: true
|
||||||
- name: docker
|
submodule_override:
|
||||||
|
backend-auth: 'https://git.makerforce.io/beep/backend-auth.git'
|
||||||
|
backend-bite: 'https://git.makerforce.io/beep/backend-bite.git'
|
||||||
|
backend-core: 'https://git.makerforce.io/beep/backend-core.git'
|
||||||
|
backend-heartbeat: 'https://git.makerforce.io/beep/backend-heartbeat.git'
|
||||||
|
backend-login: 'https://git.makerforce.io/beep/backend-login.git'
|
||||||
|
backend-protobuf: 'https://git.makerforce.io/beep/backend-protobuf.git'
|
||||||
|
backend-publish: 'https://git.makerforce.io/beep/backend-publish.git'
|
||||||
|
backend-signal: 'https://git.makerforce.io/beep/backend-signal.git'
|
||||||
|
backend-store: 'https://git.makerforce.io/beep/backend-store.git'
|
||||||
|
backend-subscribe: 'https://git.makerforce.io/beep/backend-subscribe.git'
|
||||||
|
backend-transcription: 'https://git.makerforce.io/beep/backend-transcription.git'
|
||||||
|
- name: docker
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
registry: registry.makerforce.io
|
registry: registry.makerforce.io
|
||||||
repo: registry.makerforce.io/beep/backend-subscribe
|
repo: registry.makerforce.io/beep/backend-subscribe
|
||||||
context: backend-subscribe/
|
context: backend-subscribe
|
||||||
|
dockerfile: backend-subscribe/Dockerfile
|
||||||
auto_tag: true
|
auto_tag: true
|
||||||
username:
|
username:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
password:
|
password:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
name: backend-transcription
|
||||||
|
clone:
|
||||||
|
depth: 1
|
||||||
|
steps:
|
||||||
|
- name: submodule
|
||||||
|
image: plugins/git
|
||||||
|
settings:
|
||||||
|
recursive: true
|
||||||
|
submodule_override:
|
||||||
|
backend-auth: 'https://git.makerforce.io/beep/backend-auth.git'
|
||||||
|
backend-bite: 'https://git.makerforce.io/beep/backend-bite.git'
|
||||||
|
backend-core: 'https://git.makerforce.io/beep/backend-core.git'
|
||||||
|
backend-heartbeat: 'https://git.makerforce.io/beep/backend-heartbeat.git'
|
||||||
|
backend-login: 'https://git.makerforce.io/beep/backend-login.git'
|
||||||
|
backend-protobuf: 'https://git.makerforce.io/beep/backend-protobuf.git'
|
||||||
|
backend-publish: 'https://git.makerforce.io/beep/backend-publish.git'
|
||||||
|
backend-signal: 'https://git.makerforce.io/beep/backend-signal.git'
|
||||||
|
backend-store: 'https://git.makerforce.io/beep/backend-store.git'
|
||||||
|
backend-subscribe: 'https://git.makerforce.io/beep/backend-subscribe.git'
|
||||||
|
backend-transcription: 'https://git.makerforce.io/beep/backend-transcription.git'
|
||||||
|
- name: docker
|
||||||
|
image: plugins/docker
|
||||||
|
settings:
|
||||||
|
registry: registry.makerforce.io
|
||||||
|
repo: registry.makerforce.io/beep/backend-transcription
|
||||||
|
context: backend-transcription
|
||||||
|
dockerfile: backend-transcription/Dockerfile
|
||||||
|
auto_tag: true
|
||||||
|
username:
|
||||||
|
from_secret: docker_username
|
||||||
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
name: deploy
|
||||||
|
clone:
|
||||||
|
depth: 1
|
||||||
|
steps:
|
||||||
|
- name: nop
|
||||||
|
image: 'alpine:3.8'
|
||||||
|
commands:
|
||||||
|
- echo nop
|
||||||
|
depends_on:
|
||||||
|
- backend-auth
|
||||||
|
- backend-bite
|
||||||
|
- backend-core
|
||||||
|
- backend-heartbeat
|
||||||
|
- backend-login
|
||||||
|
- backend-publish
|
||||||
|
- backend-signal
|
||||||
|
- backend-store
|
||||||
|
- backend-subscribe
|
||||||
|
- backend-transcription
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
node_modules/
|
|
@ -0,0 +1,75 @@
|
||||||
|
const fs = require('fs');
|
||||||
|
const path = require('path');
|
||||||
|
const cwd = process.cwd();
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
|
||||||
|
const folders = fs.readdirSync(cwd, { withFileTypes: true });
|
||||||
|
const submodules = folders.filter(f =>
|
||||||
|
f.isDirectory() && fs.readdirSync(path.join(cwd, f.name)).includes('.git')
|
||||||
|
).map(f => f.name);
|
||||||
|
const dockers = folders.filter(f =>
|
||||||
|
f.isDirectory() && fs.readdirSync(path.join(cwd, f.name)).includes('Dockerfile')
|
||||||
|
).map(f => f.name);
|
||||||
|
|
||||||
|
const submodule_override = submodules.reduce((acc, f) => {
|
||||||
|
acc[f] = 'https://git.makerforce.io/beep/' + f + '.git';
|
||||||
|
return acc;
|
||||||
|
}, {});
|
||||||
|
|
||||||
|
const yamls = dockers.map(f => ({
|
||||||
|
kind: 'pipeline',
|
||||||
|
name: f,
|
||||||
|
clone: {
|
||||||
|
depth: 1,
|
||||||
|
},
|
||||||
|
steps: [
|
||||||
|
{
|
||||||
|
name: 'submodule',
|
||||||
|
image: 'plugins/git',
|
||||||
|
settings: {
|
||||||
|
recursive: true,
|
||||||
|
submodule_override,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'docker',
|
||||||
|
image: 'plugins/docker',
|
||||||
|
settings: {
|
||||||
|
registry: 'registry.makerforce.io',
|
||||||
|
repo: 'registry.makerforce.io/beep/' + f,
|
||||||
|
context: f,
|
||||||
|
dockerfile: f + '/Dockerfile',
|
||||||
|
auto_tag: true,
|
||||||
|
username: {
|
||||||
|
from_secret: 'docker_username',
|
||||||
|
},
|
||||||
|
password: {
|
||||||
|
from_secret: 'docker_password',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}))
|
||||||
|
|
||||||
|
const deploy = {
|
||||||
|
kind: 'pipeline',
|
||||||
|
name: 'deploy',
|
||||||
|
clone: {
|
||||||
|
depth: 1,
|
||||||
|
},
|
||||||
|
steps: [
|
||||||
|
{
|
||||||
|
name: 'nop',
|
||||||
|
image: 'alpine:3.8',
|
||||||
|
commands: [
|
||||||
|
'echo nop',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
depends_on: dockers,
|
||||||
|
};
|
||||||
|
|
||||||
|
const droneyml = [].concat(yamls).concat(deploy).map(yaml.safeDump).join('---\n');
|
||||||
|
|
||||||
|
fs.writeFileSync(path.join(cwd, '.drone.yml'), droneyml);
|
||||||
|
console.log('Written to .drone.yml');
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"name": "backend",
|
||||||
|
"version": "0.1.7",
|
||||||
|
"author": "Beep",
|
||||||
|
"private": true,
|
||||||
|
"scripts": {
|
||||||
|
"generate": "node drone_gen.js"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"js-yaml": "^3.13.0"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,28 @@
|
||||||
|
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||||
|
# yarn lockfile v1
|
||||||
|
|
||||||
|
|
||||||
|
argparse@^1.0.7:
|
||||||
|
version "1.0.10"
|
||||||
|
resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911"
|
||||||
|
integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==
|
||||||
|
dependencies:
|
||||||
|
sprintf-js "~1.0.2"
|
||||||
|
|
||||||
|
esprima@^4.0.0:
|
||||||
|
version "4.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71"
|
||||||
|
integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==
|
||||||
|
|
||||||
|
js-yaml@^3.13.0:
|
||||||
|
version "3.13.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.0.tgz#38ee7178ac0eea2c97ff6d96fff4b18c7d8cf98e"
|
||||||
|
integrity sha512-pZZoSxcCYco+DIKBTimr67J6Hy+EYGZDY/HCWC+iAEA9h1ByhMXAIVUXMcMFpOCxQ/xjXmPI2MkDL5HRm5eFrQ==
|
||||||
|
dependencies:
|
||||||
|
argparse "^1.0.7"
|
||||||
|
esprima "^4.0.0"
|
||||||
|
|
||||||
|
sprintf-js@~1.0.2:
|
||||||
|
version "1.0.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
|
||||||
|
integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=
|
Loading…
Reference in New Issue