Skip to content

Commit a2fd738

Browse files
committed
[circleci] build on postgresql 10 and 12
1 parent d4157e5 commit a2fd738

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

Diff for: .circleci/config.yml

+11-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 2
1+
version: 2.1
22
jobs:
33
docker-build:
44
resource_class: small
@@ -17,17 +17,20 @@ jobs:
1717
- setup_remote_docker
1818
- run: docker build --tag zync:build --file ./Dockerfile .
1919
- run: docker network create net0
20-
- run: docker run --net net0 --name ${POSGRES_CONTAINER_NAME} -d -p 5432:5432 -e POSTGRES_USER=${POSTGRES_USER} -e POSTGRES_PASSWORD=${POSTGRES_PASSWORD} -e POSTGRES_DB=${POSTGRES_DB} postgres:10-alpine
20+
- run: docker run --net net0 --name ${POSGRES_CONTAINER_NAME} -d -p 5432:5432 -e POSTGRES_USER=${POSTGRES_USER} -e POSTGRES_PASSWORD=${POSTGRES_PASSWORD} -e POSTGRES_DB=${POSTGRES_DB} postgres:12-alpine
2121
- run:
2222
command: |
2323
docker run --net net0 -e RAILS_ENV=${RAILS_ENV} -e DATABASE_URL=${DATABASE_URL} \
2424
zync:build rails db:setup
2525
2626
build:
27+
parameters:
28+
postgresql_version:
29+
type: string
2730
working_directory: /opt/app-root/zync
2831
docker:
2932
- image: registry.access.redhat.com/ubi7/ruby-27
30-
- image: circleci/postgres:10-alpine-ram
33+
- image: circleci/postgres:<< parameters.postgresql_version >>-ram
3134
environment:
3235
RAILS_ENV: test
3336
DISABLE_SPRING: 1 # we can't really run spring as it hangs on local circleci build
@@ -78,8 +81,11 @@ jobs:
7881
- vendor/bundle
7982

8083
workflows:
81-
version: 2
84+
version: 2.1
8285
build_and_test_docker:
8386
jobs:
84-
- build
87+
- build:
88+
matrix:
89+
parameters:
90+
postgresql_version: [ "10-alpine", "12-alpine" ]
8591
- docker-build

0 commit comments

Comments
 (0)