From aaf6ed6a3a778587cd0c94840705906da82ca24b Mon Sep 17 00:00:00 2001 From: Christian Bruckmayer Date: Tue, 3 Jul 2018 11:49:28 +0200 Subject: [PATCH 1/2] [ci] Set frontend user in CircleCI because we changed to use Docker to build the images in OBS. Therefore we set now the root user for the frontend-base image to be similar to the development frontend-base image. Therefore we need to switch now to the frontend user in CircleCI to execute the tests not as root user. --- .circleci/config.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index b694fd24d80..1cd040a2561 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,6 +8,7 @@ aliases: NOKOGIRI_USE_SYSTEM_LIBRARIES: 1 EAGER_LOAD: 1 <<: *cc_test_reporter_id + user: frontend - image: registry.opensuse.org/obs/server/unstable/container/sle12/sp3/images/openbuildservice/mariadb:latest command: | /bin/bash -c 'echo -e "[mysqld]\ndatadir = /dev/shm" > /etc/my.cnf.d/obs.cnf && cp -a /var/lib/mysql/* /dev/shm && /usr/lib/mysql/mysql-systemd-helper start' @@ -18,6 +19,7 @@ aliases: environment: NOKOGIRI_USE_SYSTEM_LIBRARIES: 1 <<: *cc_test_reporter_id + user: frontend - image: registry.opensuse.org/obs/server/unstable/container/sle12/sp3/images/openbuildservice/mariadb:latest command: | /bin/bash -c 'echo -e "[mysqld]\ndatadir = /dev/shm" > /etc/my.cnf.d/obs.cnf && cp -a /var/lib/mysql/* /dev/shm && /usr/lib/mysql/mysql-systemd-helper start' @@ -184,6 +186,7 @@ jobs: - image: registry.opensuse.org/obs/server/unstable/container/sle12/sp3/images/openbuildservice/frontend-base:latest environment: <<: *cc_test_reporter_id + user: frontend steps: - attach_workspace: at: /tmp From b4f2bf2ed1eb4a34481623b9c099224fb99d6ae9 Mon Sep 17 00:00:00 2001 From: Christian Bruckmayer Date: Tue, 3 Jul 2018 11:51:14 +0200 Subject: [PATCH 2/2] [ci] Change CircleCI bundle caches to system dir as we changed how we build the docker images in OBS to include a bundle cache already. This bundle cache is now installed into the system bunde directory so we need to change the CircleCI cache as well. --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1cd040a2561..6ded9961fe3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -26,17 +26,17 @@ aliases: name: db - &restore_bundle_cache keys: - - v2-dependencies-{{ checksum "./src/api/Gemfile.lock" }} + - v3-dependencies-{{ checksum "./src/api/Gemfile.lock" }} # fallback to using the latest cache if no exact match is found - - v2-dependencies- + - v3-dependencies- - &save_bundle_cache paths: - - ./src/api/vendor/bundle + - /usr/lib64/ruby/gems/2.5.0/gems/ key: v2-dependencies-{{ checksum "./src/api/Gemfile.lock" }} - &install_dependencies name: install dependencies command: | - cd ./src/api && bundle install --jobs=4 --retry=3 --path vendor/bundle + cd ./src/api && bundle install --jobs=4 --retry=3 - &wait_for_database name: Wait for DB command: mysqladmin ping -h db