-
Notifications
You must be signed in to change notification settings - Fork 5
96 lines (96 loc) · 3.24 KB
/
Workflow.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: Workflow
on: [push]
env:
TEST_FDB_URL: "/var/fdb/fdb.cluster"
TEST_POSTGRES_URL: "postgresql://stroppy:stroppy@postgresql:5432/stroppy?sslmode=disable"
TEST_MONGODB_URL: "mongodb://mongodb:27017/stroppy"
TEST_COCKROACHDB_URL: "postgresql://root@cockroachdb:26257/defaultdb?sslmode=disable"
jobs:
synchronization:
name: Sync with picogit
runs-on: [self-hosted, stroppy]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install SSH Key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.PUSH_PRIVATE_KEY }}
name: id_rsa
known_hosts: ${{ secrets.KNOWN_HOSTS }}
if_key_exists: replace
- name: Set remote url
run: git remote set-url --push origin [email protected]:github/stroppy.git
- name: Push files
run: git push --force
tests:
name: Run integrations test
needs: synchronization
runs-on: [self-hosted, stroppy]
container:
image: docker.binary.picodata.io/stroppy-builder:latest
volumes:
- foundationdb-volume:/var/fdb/
options: --user root:root
services:
postgresql:
image: postgres:13.2-alpine
ports:
- 5432:5432
env:
POSTGRES_PASSWORD: stroppy
POSTGRES_USER: stroppy
POSTGRES_DB: stroppy
PGDATA: /var/lib/postgresql/data/pgdata
foundationdb:
image: foundationdb/foundationdb:6.3.23
ports:
- 4500:4500
volumes:
- foundationdb-volume:/var/fdb/
cockroachdb:
image: docker.binary.picodata.io/stroppy-cockroach:latest
ports:
- 26257:26257
mongodb:
image: docker.binary.picodata.io/stroppy-mongodb:4.4.7
ports:
- 27017:27017
steps:
- run: make test
- run: rm -rf ..?* .[!.]* *
if: always()
build_docker:
name: Docker image stroppy
needs: [ synchronization, tests ]
runs-on: [ self-hosted, stroppy ]
steps:
- uses: actions/checkout@v2
- name: build docker image
run: docker build -t docker-public.binary.picodata.io/stroppy:latest -f build/Dockerfile .
- name: Login to Picodata Public Container Registry
uses: docker/login-action@v2
with:
registry: docker-public.binary.picodata.io
username: ${{ secrets.DOCKER_PUBLIC_USER }}
password: ${{ secrets.DOCKER_PUBLIC_PASSWORD }}
- name: push image
run: docker push docker-public.binary.picodata.io/stroppy:latest
build_cartridge:
name: Docker image with cartridge app
needs: [synchronization, tests, build_docker]
runs-on: [self-hosted, stroppy]
steps:
- uses: actions/checkout@v2
- name: install dependencies
working-directory: third_party/stroppy-test-cartridge
run: ./deps.sh
- name: build cartridge application
working-directory: third_party/stroppy-test-cartridge
run: cartridge build
- name: build docker image
working-directory: third_party/stroppy-test-cartridge
run: cartridge pack docker --tag docker.io/picodata/stroppy-test-cartridge:latest
- name: push image
run: docker push docker.io/picodata/stroppy-test-cartridge:latest