-
Notifications
You must be signed in to change notification settings - Fork 8
/
codefresh.yml
41 lines (39 loc) · 980 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
version: "1.0"
stages:
- prepare
- build
- test
steps:
main_clone:
type: "git-clone"
description: "Cloning main repository..."
repo: "codefreshdemo/example_nodejs_postgres"
revision: "master"
git: github
stage: prepare
run_integration_tests:
title: "Running integration tests"
stage: test
image: node:6.9.1
environment: &test_postgresql_vars
- POSTGRES_USER=user
- POSTGRES_PASSWORD=admin
- POSTGRES_DB=todo
commands:
# PostgreSQL is certainly up at this point
- npm install -g gulp
- npm install
- npm test
services:
composition:
postgres:
image: postgres:11.5
ports:
- 5432
environment: *test_postgresql_vars # Same POSTGRES_USER, POSTGRES_PASSWORD etc.
readiness:
timeoutSeconds: 30
periodSeconds: 15
image: postgres:11.5
commands:
- "pg_isready -h postgres"