Compare commits
11 Commits
gitlab
...
prometheus
| Author | SHA1 | Date | |
|---|---|---|---|
| 4f736f763e | |||
| f84994999a | |||
| 74cd6c6d4b | |||
| 49f981708a | |||
| 54139d6f76 | |||
| 4ab80616a6 | |||
| 04905c59db | |||
| c4602b9d4e | |||
| 2f5867028e | |||
| 1aa4be2e47 | |||
| 3aa77129ec |
22
.drone.yml
Normal file
22
.drone.yml
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
kind: pipeline
|
||||||
|
type: exec
|
||||||
|
name: build
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build
|
||||||
|
commands:
|
||||||
|
- docker-compose -p pycms build
|
||||||
|
|
||||||
|
- name: test
|
||||||
|
commands:
|
||||||
|
- docker-compose -p pycms up --build --abort-on-container-exit
|
||||||
|
|
||||||
|
- name: push
|
||||||
|
commands:
|
||||||
|
- docker-compose -p pycms push
|
||||||
|
- name: run
|
||||||
|
commands:
|
||||||
|
- docker-compose -p pycms down
|
||||||
|
- docker-compose -p pycms up -d
|
||||||
|
|
||||||
|
|
||||||
@@ -10,3 +10,9 @@ services:
|
|||||||
- db
|
- db
|
||||||
db:
|
db:
|
||||||
image: mongo
|
image: mongo
|
||||||
|
tests:
|
||||||
|
build: .
|
||||||
|
command: bash ./test.sh
|
||||||
|
depends_on:
|
||||||
|
- db
|
||||||
|
- server
|
||||||
|
|||||||
10
test.sh
Normal file
10
test.sh
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
curl_cmd='curl -s -w "%{http_code}" -o /dev/null'
|
||||||
|
url='server:8080'
|
||||||
|
$curl_cmd -X POST $url/admin/post/test -F 'body=testpage' && echo ": Create success" || echo ': create fail'
|
||||||
|
|
||||||
|
$curl_cmd $url/post/test && echo ": get Success" || echo ': get fail'
|
||||||
|
|
||||||
|
$curl_cmd -X POST $url/admin/post/test -F 'body=testpage2' && echo ": Update success" || echo ': update fail'
|
||||||
|
|
||||||
|
$curl_cmd -X DELETE $url/admin/post/test && echo ": delete success" || echo ': delete fail'
|
||||||
Reference in New Issue
Block a user