File tree Expand file tree Collapse file tree 9 files changed +58
-229
lines changed
Expand file tree Collapse file tree 9 files changed +58
-229
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : Docker CI
2+
3+ on :
4+ push :
5+ release :
6+ workflow_dispatch :
7+
8+ jobs :
9+ build :
10+ uses : BerkeleyLibrary/.github/.github/workflows/docker-build.yml@v1.1.0
11+
12+ test :
13+ needs : build
14+ uses : BerkeleyLibrary/.github/.github/workflows/docker-test.yml@v1.1.0
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -177,14 +177,14 @@ RUN SECRET_KEY_BASE=1 rails assets:precompile --trace
177177ARG BUILD_TIMESTAMP
178178ARG BUILD_URL
179179ARG DOCKER_TAG
180- ARG GIT_BRANCH
181- ARG GIT_COMMIT
182- ARG GIT_URL
180+ ARG GIT_REF_NAME
181+ ARG GIT_SHA
182+ ARG GIT_REPOSITORY_URL
183183
184184# build arguments aren't persisted in the image, but ENV values are
185185ENV BUILD_TIMESTAMP="${BUILD_TIMESTAMP}"
186186ENV BUILD_URL="${BUILD_URL}"
187187ENV DOCKER_TAG="${DOCKER_TAG}"
188- ENV GIT_BRANCH ="${GIT_BRANCH }"
189- ENV GIT_COMMIT ="${GIT_COMMIT }"
190- ENV GIT_URL ="${GIT_URL }"
188+ ENV GIT_REF_NAME ="${GIT_REF_NAME }"
189+ ENV GIT_SHA ="${GIT_SHA }"
190+ ENV GIT_REPOSITORY_URL ="${GIT_REPOSITORY_URL }"
Original file line number Diff line number Diff line change 11#!/usr/bin/env ruby
2- require ' fileutils'
2+ require " fileutils"
33
4- # path to your application root.
5- APP_ROOT = File . expand_path ( '..' , __dir__ )
4+ APP_ROOT = File . expand_path ( ".." , __dir__ )
65
76def system! ( *args )
87 system ( *args ) || abort ( "\n == Command #{ args } failed ==" )
98end
109
1110FileUtils . chdir APP_ROOT do
12- # This script is a way to setup or update your development environment automatically.
13- # This script is idempotent, so that you can run it at anytime and get an expectable outcome.
14- # Add necessary setup steps to this file.
15-
16- puts '== Installing dependencies =='
17- system! 'gem install bundler --conservative'
18- system ( 'bundle check' ) || system! ( 'bundle install' )
19-
20- # Install JavaScript dependencies
21- # system('bin/yarn')
22-
2311 puts "\n == Removing old logs and tempfiles =="
24- system! ' bin/rails log:clear tmp:clear'
12+ system! " bin/rails log:clear tmp:clear"
2513
2614 puts "\n == Restarting application server =="
27- system! ' bin/rails restart'
15+ system! " bin/rails restart"
2816end
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env ruby
2+ require "fileutils"
3+
4+ APP_ROOT = File . expand_path ( ".." , __dir__ )
5+
6+ # Check test coverage when running rspec
7+ ENV [ 'COVERAGE' ] = '1'
8+
9+ # Test commands (to be exec'd in order)
10+ TESTS = [
11+ %w( rspec -f html --out artifacts/rspec.html ) ,
12+ %w( rubocop -f html --out artifacts/rubocop.html ) ,
13+ ]
14+
15+ FileUtils . chdir APP_ROOT do
16+ exit TESTS . reduce ( true ) { |passed , test | system ( *test ) && passed }
17+ end
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ class BuildInfo
99 MULTIPLE_HYPHEN_ESCAPE_RE = /((?<=-)-)|(-(?=-))/
1010 HYPHEN_ENTITY_ESCAPE = '-' . freeze
1111
12- BUILD_VARS = %w[ CI BUILD_TIMESTAMP BUILD_URL DOCKER_TAG GIT_BRANCH GIT_COMMIT GIT_URL ] . freeze
12+ BUILD_VARS = %w[ CI BUILD_TIMESTAMP BUILD_URL DOCKER_TAG GIT_REF_NAME GIT_SHA GIT_REPOSITORY_URL ] . freeze
1313
1414 attr_reader :info
1515
Original file line number Diff line number Diff line change 1+ ---
2+
3+ services :
4+ app :
5+ build : !reset
6+ image : ${DOCKER_APP_IMAGE}
7+ volumes : !reset
8+ volumes :
9+ - artifacts:/opt/app/artifacts
10+
11+ volumes :
12+ artifacts :
13+
Original file line number Diff line number Diff line change @@ -11,9 +11,9 @@ module AvPlayer
1111 BUILD_TIMESTAMP : '2021-03-22T21:57:07+0000' ,
1212 BUILD_URL : 'https://jenkins.lib.berkeley.edu/job/gitlab/job/lap/job/lap%252Favplayer/job/LIT-2266-build-args/1/' ,
1313 DOCKER_TAG : 'containers.lib.berkeley.edu/lap/avplayer/lit-2266-build-args:build-1' ,
14- GIT_BRANCH : 'LIT-2266-build-args' ,
15- GIT_COMMIT : 'e2493452b7e6ebe98856fa3aff6b2c8f24063586' ,
16- GIT_URL : 'git@git.lib.berkeley.edu:lap/avplayer.git'
14+ GIT_REF_NAME : 'LIT-2266-build-args' ,
15+ GIT_SHA : 'e2493452b7e6ebe98856fa3aff6b2c8f24063586' ,
16+ GIT_REPOSITORY_URL : 'git@git.lib.berkeley.edu:lap/avplayer.git'
1717 } . freeze
1818 end
1919
You can’t perform that action at this time.
0 commit comments