mirror of
https://github.com/thegeeklab/wait-for.git
synced 2024-11-22 04:10:40 +00:00
enable drone ci
This commit is contained in:
parent
a0c1ff730b
commit
03386ff56c
60
.drone.yml
Normal file
60
.drone.yml
Normal file
@ -0,0 +1,60 @@
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: testing
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
|
||||
steps:
|
||||
- name: test
|
||||
image: bats/bats
|
||||
commands:
|
||||
- bats ./wait-for.bats
|
||||
|
||||
trigger:
|
||||
ref:
|
||||
- refs/heads/master
|
||||
- refs/tags/**
|
||||
- refs/pull/**
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: notification
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
|
||||
steps:
|
||||
- name: matrix
|
||||
image: plugins/matrix
|
||||
settings:
|
||||
homeserver:
|
||||
from_secret: matrix_homeserver
|
||||
password:
|
||||
from_secret: matrix_password
|
||||
roomid:
|
||||
from_secret: matrix_roomid
|
||||
template: "Status: **{{ build.status }}**<br/> Build: [{{ repo.Owner }}/{{ repo.Name }}]({{ build.link }}) ({{ build.branch }}) by {{ build.author }}<br/> Message: {{ build.message }}"
|
||||
username:
|
||||
from_secret: matrix_username
|
||||
|
||||
trigger:
|
||||
ref:
|
||||
- refs/heads/master
|
||||
- refs/tags/**
|
||||
status:
|
||||
- success
|
||||
- failure
|
||||
|
||||
depends_on:
|
||||
- testing
|
||||
|
||||
---
|
||||
kind: signature
|
||||
hmac: 495a8f60228b02351858fb8226da326dfacb1cfb3a749143a3d89218782e335b
|
||||
|
||||
...
|
11
Dockerfile
11
Dockerfile
@ -1,11 +0,0 @@
|
||||
FROM node:alpine
|
||||
|
||||
RUN apk add --no-cache bash
|
||||
|
||||
RUN mkdir -p /app
|
||||
WORKDIR /app
|
||||
|
||||
COPY . /app
|
||||
RUN npm install
|
||||
|
||||
CMD ./node_modules/.bin/bats wait-for.bats
|
12
README.md
12
README.md
@ -1,5 +1,8 @@
|
||||
# wait-for
|
||||
|
||||
[![Build Status](https://img.shields.io/drone/build/xoxys/wait-for?logo=drone)](https://cloud.drone.io/xoxys/wait-for)
|
||||
[![License: MIT](https://img.shields.io/github/license/xoxys/wait-for)](LICENSE)
|
||||
|
||||
`./wait-for` is a script designed to synchronize services like docker containers. It is [sh](https://en.wikipedia.org/wiki/Bourne_shell) and [alpine](https://alpinelinux.org/) compatible. It was inspired by [vishnubob/wait-for-it](https://github.com/vishnubob/wait-for-it), but the core has been rewritten at [Eficode](http://eficode.com/) by [dsuni](https://github.com/dsuni) and [mrako](https://github.com/mrako).
|
||||
|
||||
When using this tool, you only need to pick the `wait-for` file as part of your project.
|
||||
@ -44,15 +47,6 @@ services:
|
||||
- db
|
||||
```
|
||||
|
||||
## Testing
|
||||
|
||||
Ironically testing is done using [bats](https://github.com/sstephenson/bats), which on the other hand is depending on [bash](https://en.wikipedia.org/wiki/Bash_(Unix_shell)).
|
||||
|
||||
```Shell
|
||||
docker build -t wait-for .
|
||||
docker run -t wait-for
|
||||
```
|
||||
|
||||
### License
|
||||
|
||||
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
||||
|
Loading…
Reference in New Issue
Block a user