Skip to content

Commit a6be481

Browse files
authored
Merge pull request #4 from tulibraries/IMT-28-CircleCI-Configuration
IMT-28 CircleCI Configuration
2 parents 8f6c741 + 729d7bd commit a6be481

5 files changed

Lines changed: 29 additions & 39 deletions

File tree

.circleci/config.yml

Lines changed: 12 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,40 @@
11
version: 2.1
22

33
workflows:
4+
version: 2
45
run_tests:
56
jobs:
67
- lint_and_test
78

8-
orbs:
9-
coveralls: coveralls/[email protected]
10-
119
jobs:
1210
lint_and_test:
1311
docker:
14-
- image: cimg/ruby:3.4.3-node
12+
- image: cimg/ruby:3.4-node
1513
auth:
1614
username: $DOCKERHUB_USER
1715
password: $DOCKERHUB_PASSWORD
1816
steps:
1917
- checkout
2018

21-
- setup_remote_docker:
22-
docker_layer_caching: false
23-
24-
- run: if [ -e /var/run/docker.sock ]; then sudo chown circleci:circleci /var/run/docker.sock; fi
25-
2619
- run:
27-
name: remove dockerignore
28-
command: rm .dockerignore
20+
name: make sure we have the latest bundler
21+
command: |
22+
sudo gem update --system
23+
gem install -f bundler:2.1.4
2924
3025
- run:
31-
name: Build docker containers
32-
command: |
33-
source .env && docker-compose -p isilon_tracker -f docker-compose.yaml up -d
34-
sleep 30
26+
name: Build app
27+
command: make up
3528

3629
- run:
3730
name: Run linter
38-
command: |
39-
docker-compose -p isilon_tracker -f docker-compose.yaml exec --user root test_app bundle exec rubocop -c .rubocop.yml
31+
command: make lint
4032

4133
- run:
42-
name: Database migrations
43-
command: |
44-
docker-compose -p isilon_tracker -f docker-compose.yaml exec --user root test_app bundle exec rails db:setup
45-
docker-compose -p isilon_tracker -f docker-compose.yaml exec --user root test_app bundle exec rails db:migrate
34+
name: Run rubocop
35+
command: bundle exec rubocop
4636

4737
- run:
4838
name: Run ruby tests
4939
command: |
50-
docker-compose -p isilon_tracker -f docker-compose.yaml exec --user root test_app bundle exec rake spec
51-
docker cp isilon_tracker-test_app-1:/app/coverage/lcov/app.lcov ./app.lcov
52-
53-
- coveralls/upload:
54-
coverage_file: ./app.lcov
40+
bundle exec rspec spec

.docker/app/Dockerfile

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,26 +20,26 @@ USER root
2020
RUN apk add -U --no-cache \
2121
jemalloc=5.3.0-r6 \
2222
bash=5.2.37-r0 \
23-
busybox=1.37.0-r12 \
23+
busybox=1.37.0-r18 \
2424
gcompat=1.1.0-r4 \
25-
imagemagick=7.1.1.41-r0 \
26-
libxslt=1.1.42-r2 \
25+
imagemagick=7.1.1.44-r0 \
26+
libxslt=1.1.43-r3 \
2727
postgresql16-client=16.9-r0 \
28-
sqlite=3.48.0-r2 \
29-
shared-mime-info=2.4-r2 \
30-
ssl_client=1.37.0-r12 \
28+
sqlite=3.49.2-r0 \
29+
shared-mime-info=2.4-r6 \
30+
ssl_client=1.37.0-r18 \
3131
tzdata=2025b-r0 && \
3232
apk add -U --no-cache --virtual build-dependencies \
3333
build-base=0.5-r3 \
3434
yaml=0.2.5-r2 \
3535
yaml-dev=0.2.5-r2 \
36-
git=2.47.2-r0 \
37-
libjpeg-turbo-dev=3.0.4-r0 \
38-
libxslt-dev=1.1.42-r2 \
39-
libxml2-dev=2.13.4-r6 \
36+
git=2.49.0-r0 \
37+
libjpeg-turbo-dev=3.1.0-r0 \
38+
libxslt-dev=1.1.43-r3 \
39+
libxml2-dev=2.13.8-r0 \
4040
postgresql16-dev=16.9-r0 \
41-
sqlite-dev=3.48.0-r2 \
42-
nodejs=22.13.1-r0 \
41+
sqlite-dev=3.49.2-r0 \
42+
nodejs=22.16.0-r2 \
4343
yarn=1.22.22-r1 && \
4444
if [ "${RAILS_ENV}" = "production" ]; then bundle config set --local without "development test"; fi && \
4545
bundle install --jobs=8 && \

.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
DOCKER_IMAGE_VERSION=0.0.1
2+
BASE_IMAGE=ruby:3.4-alpine

.env.prod

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
DOCKER_IMAGE_VERSION=0.0.1
2+
BASE_IMAGE=ruby:3.4-alpine

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,4 @@ up:
6767
bundle install
6868
bundle exec rake db:seed
6969
bundle exec rake db:migrate
70-
bundle exec rails s -p 3000
70+
bundle exec rails s -d -p 3000

0 commit comments

Comments
 (0)