dockerfile and changes for ubuntu 20.04

This commit is contained in:
aspocecat 2021-12-22 17:18:14 +01:00
parent 15bd48ce3b
commit e7d67d1444
7 changed files with 148 additions and 136 deletions

24
Dockerfile Normal file
View File

@ -0,0 +1,24 @@
FROM ubuntu:20.04
ENV JAMTRACKS_DIR=/var/lib/jamtracks
ENV BUILD_PUTS=1
ENV COVERAGE=1
ENV PACKAGE=1
ENV RUN_SLOW_TESTS=1
ENV RUN_AWS_TESTS=1
ENV SKIP_KARMA=1
ENV SHOW_JS_ERRORS=1
ENV BUILD_SERVER=1
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get install -y protobuf-compiler rubygems git curl pkg-config make g++
RUN apt-get install -y gcc ruby-dev libxslt-dev libxml2-dev zlib1g-dev libpq-dev
RUN gem install bundler
WORKDIR /app
ADD . /app
RUN /app/build

142
build
View File

@ -23,90 +23,90 @@ rm -f *.gem
bash -l ./jenkins
popd > /dev/null
echo ""
# echo ""
echo "BUILDING WEBSOCKET GATEWAY"
pushd websocket-gateway > /dev/null
bash -l ./jenkins
popd > /dev/null
# echo "BUILDING WEBSOCKET GATEWAY"
# pushd websocket-gateway > /dev/null
# bash -l ./jenkins
# popd > /dev/null
echo ""
# echo ""
echo "BUILDING JAM-WEB"
pushd web > /dev/null
echo "kill any stuck rspec tests from previous run. need to debug how/why this happens on build server"
set +e
ps aux | grep -ie "jam-cloud.*rspec" | awk '{print $2}' | xargs kill -9
set -e
# echo "BUILDING JAM-WEB"
# pushd web > /dev/null
# echo "kill any stuck rspec tests from previous run. need to debug how/why this happens on build server"
# set +e
# ps aux | grep -ie "jam-cloud.*rspec" | awk '{print $2}' | xargs kill -9
# set -e
PACKAGE=1 bash ./jenkins
# PACKAGE=1 bash ./jenkins
# we do this so that the build won't fail in jenkins if no capybara error screenshot isn't there
mkdir -p tmp/capybara
touch tmp/capybara/success.png
popd > /dev/null
# # we do this so that the build won't fail in jenkins if no capybara error screenshot isn't there
# mkdir -p tmp/capybara
# touch tmp/capybara/success.png
# popd > /dev/null
echo ""
# echo ""
echo "BUILDING JAM-ADMIN"
pushd admin /dev/null
bash -l ./jenkins
popd > /dev/null
# echo "BUILDING JAM-ADMIN"
# pushd admin /dev/null
# bash -l ./jenkins
# popd > /dev/null
if [ ! -z "$PACKAGE" ]; then
# if [ ! -z "$PACKAGE" ]; then
source /etc/lsb-release
DEB_SERVER=https://int.jamkazam.com:9010/apt-`uname -p`/$DISTRIB_CODENAME
GEM_SERVER=http://localhost:9000/gems
# source /etc/lsb-release
# DEB_SERVER=https://int.jamkazam.com:9010/apt-`uname -p`/$DISTRIB_CODENAME
# GEM_SERVER=http://localhost:9000/gems
# if still going, then push all debs up
if [[ "$GIT_BRANCH" == *develop* || "$GIT_BRANCH" == *master* || "$GIT_BRANCH" == *release* || "$GIT_BRANCH" == *feature* || "$GIT_BRANCH" == *hotfix* ]]; then
# # if still going, then push all debs up
# if [[ "$GIT_BRANCH" == *develop* || "$GIT_BRANCH" == *master* || "$GIT_BRANCH" == *release* || "$GIT_BRANCH" == *feature* || "$GIT_BRANCH" == *hotfix* ]]; then
echo ""
echo "PUSHING WEB"
pushd web > /dev/null
echo "publishing ubuntu package (.deb)"
DEBPATH=`find target/deb -name *.deb`
DEBNAME=`basename $DEBPATH`
curl -f -T $DEBPATH $DEB_SERVER/$DEBNAME
if [ "$?" != "0" ]; then
echo "deb publish failed"
exit 1
fi
echo "done publishing deb"
popd > /dev/null
# echo ""
# echo "PUSHING WEB"
# pushd web > /dev/null
# echo "publishing ubuntu package (.deb)"
# DEBPATH=`find target/deb -name *.deb`
# DEBNAME=`basename $DEBPATH`
# curl -f -T $DEBPATH $DEB_SERVER/$DEBNAME
# if [ "$?" != "0" ]; then
# echo "deb publish failed"
# exit 1
# fi
# echo "done publishing deb"
# popd > /dev/null
echo ""
echo "PUSHING WEBSOCKET-GATEWAY"
pushd websocket-gateway > /dev/null
echo "publishing ubuntu package (.deb)"
DEBPATH=`find target/deb -name *.deb`
DEBNAME=`basename $DEBPATH`
curl -f -T $DEBPATH $DEB_SERVER/$DEBNAME
if [ "$?" != "0" ]; then
echo "deb publish failed"
exit 1
fi
echo "done publishing deb"
popd > /dev/null
# echo ""
# echo "PUSHING WEBSOCKET-GATEWAY"
# pushd websocket-gateway > /dev/null
# echo "publishing ubuntu package (.deb)"
# DEBPATH=`find target/deb -name *.deb`
# DEBNAME=`basename $DEBPATH`
# curl -f -T $DEBPATH $DEB_SERVER/$DEBNAME
# if [ "$?" != "0" ]; then
# echo "deb publish failed"
# exit 1
# fi
# echo "done publishing deb"
# popd > /dev/null
echo ""
echo "PUSHING ADMIN"
pushd admin > /dev/null
echo "publishing ubuntu package (.deb)"
DEBPATH=`find target/deb -name *.deb`
DEBNAME=`basename $DEBPATH`
curl -f -T $DEBPATH $DEB_SERVER/$DEBNAME
if [ "$?" != "0" ]; then
echo "deb publish failed"
exit 1
fi
echo "done publishing deb"
popd > /dev/null
# echo ""
# echo "PUSHING ADMIN"
# pushd admin > /dev/null
# echo "publishing ubuntu package (.deb)"
# DEBPATH=`find target/deb -name *.deb`
# DEBNAME=`basename $DEBPATH`
# curl -f -T $DEBPATH $DEB_SERVER/$DEBNAME
# if [ "$?" != "0" ]; then
# echo "deb publish failed"
# exit 1
# fi
# echo "done publishing deb"
# popd > /dev/null
else
echo "Skipping publish since branch is not master, develop, or release/*. branch is $GIT_BRANCH"
fi
# else
# echo "Skipping publish since branch is not master, develop, or release/*. branch is $GIT_BRANCH"
# fi
fi
# fi

View File

@ -1,7 +1,7 @@
source 'https://rubygems.org'
ruby_version = ENV["JAM_RUBY_VERSION"]
ruby_version = "2.3.1" if ruby_version.nil?
ruby_version = "2.7.0" if ruby_version.nil?
ruby ruby_version

View File

@ -4,13 +4,13 @@ GEM
ruby-protocol-buffers (1.2.2)
PLATFORMS
ruby
x86_64-linux
DEPENDENCIES
ruby-protocol-buffers (= 1.2.2)
RUBY VERSION
ruby 2.4.1p111
ruby 2.7.0p0
BUNDLED WITH
1.17.3
2.3.0

View File

@ -5,7 +5,7 @@ unless ENV["LOCAL_DEV"] == "1"
end
ruby_version = ENV["JAM_RUBY_VERSION"]
ruby_version = "2.3.1" if ruby_version.nil?
ruby_version = "2.7.0" if ruby_version.nil?
ruby ruby_version
@ -48,7 +48,7 @@ gem 'icalendar', '2.4.0' # pinned until we are on ruby 2.5; then remove
gem 'email_validator', '1.6.0' # pinned until we are on ruby 2.5, then remove
gem 'redis', '3.3.0' # pinned until we are on 2.5; then remove
gem 'redis-namespace', '1.5.2' # pinned until we are on 2.5; then remove
gem 'oj', '2.17.1' # pinned until we are on 2.5; then remove
gem 'oj', '2.18.5' # pinned until we are on 2.5; then remove
#######
gem "activerecord-import", "~> 0.4.1"

View File

@ -13,7 +13,7 @@ GEM
remote: https://jamjam:blueberryjam@int.jamkazam.com/gems/
specs:
CFPropertyList (2.3.6)
aasm (5.1.1)
aasm (5.2.0)
concurrent-ruby (~> 1.0)
actionmailer (4.2.8)
actionpack (= 4.2.8)
@ -51,7 +51,7 @@ GEM
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.7.0)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
aliyun-sdk (0.8.0)
nokogiri (~> 1.6)
@ -81,7 +81,7 @@ GEM
activesupport (>= 3.2.0)
json (>= 1.7)
coderay (1.1.3)
concurrent-ruby (1.1.8)
concurrent-ruby (1.1.9)
crack (0.4.5)
rexml
crass (1.0.6)
@ -107,10 +107,10 @@ GEM
email_validator (1.6.0)
activemodel
erubis (2.7.0)
et-orbi (1.2.4)
et-orbi (1.2.6)
tzinfo
eventmachine (1.0.4)
excon (0.78.1)
excon (0.89.0)
factory_girl (4.5.0)
activesupport (>= 3.0.0)
faker (1.3.0)
@ -209,7 +209,7 @@ GEM
fog-json (1.2.0)
fog-core
multi_json (~> 1.10)
fog-local (0.6.0)
fog-local (0.7.0)
fog-core (>= 1.27, < 3.0)
fog-openstack (0.3.10)
fog-core (>= 1.45, <= 2.1.0)
@ -263,24 +263,23 @@ GEM
fog-core
fog-xml
xmlrpc
fog-xml (0.1.3)
fog-xml (0.1.4)
fog-core
nokogiri (>= 1.5.11, < 2.0.0)
formatador (0.2.5)
fugit (1.4.2)
formatador (0.3.0)
fugit (1.5.2)
et-orbi (~> 1.1, >= 1.1.8)
raabro (~> 1.4)
geokit (1.13.1)
geokit-rails (2.3.2)
geokit (~> 1.5)
rails (>= 3.0)
geokit-rails (1.1.4)
geokit (>= 1.5.0)
globalid (0.4.2)
activesupport (>= 4.2.0)
hashdiff (1.0.1)
http-accept (1.7.0)
http-cookie (1.0.3)
http-cookie (1.0.4)
domain_name (~> 0.5)
httparty (0.18.1)
httparty (0.20.0)
mime-types (~> 3.0)
multi_xml (>= 0.5.2)
i18n (0.9.5)
@ -296,28 +295,28 @@ GEM
little-plugger (1.1.4)
logging (1.7.2)
little-plugger (>= 1.1.3)
loofah (2.9.0)
loofah (2.13.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
mini_mime (>= 0.1.1)
method_source (1.0.0)
mime-types (3.3.1)
mime-types (3.4.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2020.1104)
mini_mime (1.0.2)
mime-types-data (3.2021.1115)
mini_mime (1.1.2)
mini_portile2 (2.4.0)
minitest (5.14.3)
mono_logger (1.1.0)
minitest (5.15.0)
mono_logger (1.1.1)
multi_json (1.15.0)
multi_xml (0.6.0)
multipart-post (2.1.1)
netrc (0.11.0)
nokogiri (1.10.10)
mini_portile2 (~> 2.4.0)
nokogumbo (2.0.4)
nokogumbo (2.0.5)
nokogiri (~> 1.8, >= 1.8.4)
oj (2.17.1)
oj (2.18.5)
optimist (3.0.1)
orm_adapter (0.5.0)
pg (0.17.1)
@ -332,7 +331,7 @@ GEM
pg_array_parser (~> 0.0.9)
protected_attributes (1.1.4)
activemodel (>= 4.0.1, < 5.0)
pry (0.13.1)
pry (0.14.1)
coderay (~> 1.1)
method_source (~> 1.0)
public_suffix (4.0.6)
@ -342,24 +341,13 @@ GEM
rack
rack-test (0.6.3)
rack (>= 1.0)
rails (4.2.8)
actionmailer (= 4.2.8)
actionpack (= 4.2.8)
actionview (= 4.2.8)
activejob (= 4.2.8)
activemodel (= 4.2.8)
activerecord (= 4.2.8)
activesupport (= 4.2.8)
bundler (>= 1.3.0, < 2.0)
railties (= 4.2.8)
sprockets-rails
rails-deprecated_sanitizer (1.0.3)
rails-deprecated_sanitizer (1.0.4)
activesupport (>= 4.2.0.alpha)
rails-dom-testing (1.0.9)
activesupport (>= 4.2.0, < 5.0)
nokogiri (~> 1.6)
rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.3.0)
rails-html-sanitizer (1.4.2)
loofah (~> 2.3)
rails-observers (0.1.2)
activemodel (~> 4.0)
@ -368,7 +356,7 @@ GEM
activesupport (= 4.2.8)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (13.0.3)
rake (13.0.6)
rbvmomi (2.4.1)
builder (~> 3.0)
json (>= 1.8)
@ -390,14 +378,14 @@ GEM
resque-failed-job-mailer (0.0.3)
resque-lonely_job (1.0.2)
resque (>= 1.2)
resque-retry (1.7.4)
resque-retry (1.7.6)
resque (>= 1.25, < 3.0)
resque-scheduler (~> 4.0)
resque-scheduler (4.4.0)
resque-scheduler (4.5.0)
mono_logger (~> 1.0)
redis (>= 3.3)
resque (>= 1.26)
rufus-scheduler (~> 3.2)
resque (>= 1.27)
rufus-scheduler (~> 3.2, < 3.7)
resque_mailer (2.4.3)
actionmailer (>= 3.0)
activesupport (>= 3.0)
@ -411,7 +399,7 @@ GEM
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
rexml (3.2.4)
rexml (3.2.5)
rspec (2.11.0)
rspec-core (~> 2.11.0)
rspec-expectations (~> 2.11.0)
@ -426,7 +414,7 @@ GEM
ruby-prof (0.15.9)
ruby-protocol-buffers (1.2.2)
rubyzip (1.2.0)
rufus-scheduler (3.7.0)
rufus-scheduler (3.6.0)
fugit (~> 1.1, >= 1.1.6)
sanitize (5.2.3)
crass (~> 1.0.2)
@ -450,11 +438,7 @@ GEM
sprockets (3.6.3)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.2)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
stripe (5.29.0)
stripe (5.42.0)
stripe-ruby-mock (3.0.1)
dante (>= 0.2.0)
multi_json (~> 1.0)
@ -464,28 +448,31 @@ GEM
tilt (2.0.10)
time_difference (0.5.0)
activesupport
timecop (0.9.2)
timecop (0.9.4)
tzinfo (1.2.9)
thread_safe (~> 0.1)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.7)
unf_ext (0.0.8)
uuidtools (2.1.2)
vegas (0.1.11)
rack (>= 1.0.0)
warden (1.2.7)
rack (>= 1.0)
webmock (3.11.2)
addressable (>= 2.3.6)
webmock (3.14.0)
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
will_paginate (3.3.0)
xml-simple (1.1.8)
xmlrpc (0.3.1)
webrick (1.7.0)
will_paginate (3.3.1)
xml-simple (1.1.9)
rexml
xmlrpc (0.3.2)
webrick
zip-codes (0.2.1)
PLATFORMS
ruby
x86_64-linux
DEPENDENCIES
aasm
@ -519,7 +506,7 @@ DEPENDENCIES
kickbox
logging (= 1.7.2)
nokogiri (= 1.10.10)
oj (= 2.17.1)
oj (= 2.18.5)
pg (= 0.17.1)
postgres-copy
postgres_ext
@ -559,7 +546,7 @@ DEPENDENCIES
zip-codes
RUBY VERSION
ruby 2.4.1p111
ruby 2.7.0p0
BUNDLED WITH
1.17.3
2.3.0

View File

@ -1,6 +1,7 @@
#!/bin/bash
echo "updating dependencies"
bundle config build.nokogiri --use-system-libraries
bundle install --path vendor/bundle
if [ -z $SKIP_TESTS ]; then