Skip to content

Commit 50ce603

Browse files
authored
Alpha3 update (#2)
* Test * Test * Update pipeline syntax to alpha3 format. * Fix in the environment setup for failure handler * Fix in the environment setup for failure handler * Readme update * TEST * Update .iceci.yaml * Readme update * TEST
1 parent 98a35b0 commit 50ce603

File tree

2 files changed

+19
-9
lines changed

2 files changed

+19
-9
lines changed

.iceci.yaml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,20 @@ failureHandlers:
2525
EOF
2626
curl -X POST -H 'Content-type: application/json' --data "@slacknotify.json" $SLACK_WEBHOOK
2727
environment:
28-
SLACK_WEBHOOK: "{{ slack-webhook }}"
28+
- name: SLACK_WEBHOOK
29+
fromSecret: slack-webhook
2930

3031
# Service with postgres will run during whole pipeline
3132
services:
3233
- name: db
3334
image: postgres:11
3435
environment:
35-
POSTGRES_DB: testdb
36-
POSTGRES_PASSWORD: dbpass
37-
POSTGRES_USER: dbuser
38-
36+
- name: POSTGRES_DB
37+
value: testdb
38+
- name: POSTGRES_PASSWORD
39+
value: dbpass
40+
- name: POSTGRES_USER
41+
value: dbuser
3942

4043
steps:
4144
- name: run-tests
@@ -47,8 +50,10 @@ steps:
4750
flask initdb
4851
pytest quotes_tests.py
4952
environment:
50-
QUOTES_DB_URI: "postgresql+psycopg2://dbuser:dbpass@db:5432/testdb"
51-
FLASK_APP: quotes.py
53+
- name: QUOTES_DB_URI
54+
value: "postgresql+psycopg2://dbuser:dbpass@db:5432/testdb"
55+
- name: FLASK_APP
56+
value: quotes.py
5257

5358
- name: build-docker-image
5459
dockerBuild:
@@ -71,5 +76,5 @@ steps:
7176
EOF
7277
curl -X POST -H 'Content-type: application/json' --data "@slacknotify.json" $SLACK_WEBHOOK
7378
environment:
74-
SLACK_WEBHOOK: "{{ slack-webhook }}"
75-
79+
- name: SLACK_WEBHOOK
80+
fromSecret: slack-webhook

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,8 @@ To launch the pipeline in IceCI you have to create 2 secrets - both of which are
1616
* `slack-webhook` - a generic secret with hook for Slack notifications - it can be ignored by commenting out the `slack-notify` step as well as the `slack-notify-error` failure handler in the pipeline definition file.
1717

1818
You can also find some additional info in the comments of the `.iceci.yaml` file itself.
19+
20+
21+
---
22+
23+
_Kept cool 🧊 by [Icetek](https://icetek.io/)_

0 commit comments

Comments
 (0)