-
Notifications
You must be signed in to change notification settings - Fork 4
/
codefresh.yml
44 lines (43 loc) · 993 Bytes
/
codefresh.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
version: "1.0"
stages:
- prepare
- build
- test
steps:
main_clone:
type: "git-clone"
description: "Cloning main repository..."
repo: "codefreshdemo/example_nodejs_mongo"
revision: "master"
git: github
stage: prepare
build_app_image:
title: "Building Docker Image"
type: "build"
image_name: "node-mongo-app"
tag: "master"
dockerfile: "Dockerfile"
stage: build
run_integration_tests:
title: "Running integration tests"
stage: test
image: '${{build_app_image}}'
environment:
- MONGO_PORT=27017
commands:
# MongoDB is certainly up at this point
- cd /src
- npm test
services:
composition:
mongo:
image: mongo:latest
ports:
- 27017
readiness:
timeoutSeconds: 30
periodSeconds: 15
image: '${{build_app_image}}'
commands:
- "nslookup mongo"
- "nc -z mongo 27017"