Remove license finder build step and dependencies

pull/117/head
Alex Garibay 7 years ago
parent 2f0004b13a
commit 3220944abc
  1. 26
      .circleci/config.yml
  2. 83
      .circleci/elixir-node-ruby/Dockerfile
  3. 20
      .circleci/elixir-node-ruby/README.md
  4. 8
      Gemfile
  5. 38
      Gemfile.lock
  6. 353
      doc/dependency_decisions.yml

@ -259,27 +259,6 @@ jobs:
- store_test_results:
path: apps/explorer_web/assets/test
license_finder:
docker:
# Ensure .tool-versions matches
- image: poanetwork/elixir:1.6.4-node-ruby
environment:
MIX_ENV: test
working_directory: ~/app
steps:
- attach_workspace:
at: .
- run: mix local.hex --force
- run:
name: Bundle Install
command: bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3
- run:
name: License Finder Action Items
command: bundle exec license_finder --project-path=. --decisions-file=doc/dependency_decisions.yml
sobelow:
docker:
# Ensure .tool-versions matches
@ -364,7 +343,6 @@ workflows:
- check_formatted
- credo
- eslint
- license_finder
- sobelow
- test
- deploy_staging:
@ -375,7 +353,6 @@ workflows:
- check_formatted
- credo
- eslint
- license_finder
- sobelow
- test
- dialyzer:
@ -384,9 +361,6 @@ workflows:
- eslint:
requires:
- build
- license_finder:
requires:
- build
- sobelow:
requires:
- build

@ -1,83 +0,0 @@
# MUST match base image version used in .circleci/config.yml.
# -browser variant is dropped from name because license_finder doesn't need browsers
FROM circleci/elixir:1.6.4-node
USER root
# https://github.com/CircleCI-Public/circleci-dockerfiles/blob/1da7b6007c52a166741b6e15a423e7729408070d/ruby/images/2.5.1-stretch/Dockerfile uses ruby:2.5.1-stretch, so inline ruby:2.5.1-stretch:
# https://github.com/docker-library/ruby/blob/c9644fe5c95cd71913db348baa41240f05d882b3/2.5/stretch/Dockerfile
# skip installing gem documentation
RUN mkdir -p /usr/local/etc \
&& { \
echo 'install: --no-document'; \
echo 'update: --no-document'; \
} >> /usr/local/etc/gemrc
ENV RUBY_MAJOR 2.5
ENV RUBY_VERSION 2.5.1
ENV RUBY_DOWNLOAD_SHA256 886ac5eed41e3b5fc699be837b0087a6a5a3d10f464087560d2d21b3e71b754d
ENV RUBYGEMS_VERSION 2.7.6
ENV BUNDLER_VERSION 1.16.1
# some of ruby's build scripts are written in ruby
# we purge system ruby later to make sure our final image uses what we just built
RUN set -ex \
\
&& buildDeps=' \
bison \
dpkg-dev \
libgdbm-dev \
ruby \
' \
&& apt-get update \
&& apt-get install -y --no-install-recommends $buildDeps \
&& rm -rf /var/lib/apt/lists/* \
\
&& wget -O ruby.tar.xz "https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR%-rc}/ruby-$RUBY_VERSION.tar.xz" \
&& echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz" | sha256sum -c - \
\
&& mkdir -p /usr/src/ruby \
&& tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1 \
&& rm ruby.tar.xz \
\
&& cd /usr/src/ruby \
\
# hack in "ENABLE_PATH_CHECK" disabling to suppress:
# warning: Insecure world writable dir
&& { \
echo '#define ENABLE_PATH_CHECK 0'; \
echo; \
cat file.c; \
} > file.c.new \
&& mv file.c.new file.c \
\
&& autoconf \
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
&& ./configure \
--build="$gnuArch" \
--disable-install-doc \
--enable-shared \
&& make -j "$(nproc)" \
&& make install \
\
&& apt-get purge -y --auto-remove $buildDeps \
&& cd / \
&& rm -r /usr/src/ruby \
\
&& gem update --system "$RUBYGEMS_VERSION" \
&& gem install bundler --version "$BUNDLER_VERSION" --force \
&& rm -r /root/.gem/
# install things globally, for great justice
# and don't create ".bundle" in all our apps
ENV GEM_HOME /usr/local/bundle
ENV BUNDLE_PATH="$GEM_HOME" \
BUNDLE_BIN="$GEM_HOME/bin" \
BUNDLE_SILENCE_ROOT_WARNING=1 \
BUNDLE_APP_CONFIG="$GEM_HOME"
ENV PATH $BUNDLE_BIN:$PATH
RUN mkdir -p "$GEM_HOME" "$BUNDLE_BIN" \
&& chmod 777 "$GEM_HOME" "$BUNDLE_BIN"
USER circleci

@ -1,20 +0,0 @@
# elixir-node-ruby
The `elixir-node-ruby` is a variant of `circleci/elixir` Dockerfiles that adds Ruby on top of `elixir:*-node`, so that `license_finder`, a Ruby Gem, can scan Elixir (`mix`) and Node dependencies in [POA Network](https://github.com/poanetwork) repositories, such as https://github.com/poanetwork/poa-explorer.
## Building
1. `cd .circleci/elixir-node-ruby`
2. `docker build -t poanetwork/elixir:1.6.4-node-ruby .`
## Testing
1. `docker run -it poanetwork/elixir:1.6.4-node-ruby /bin/bash`
2. Run IRB to check for ruby: `irb`
3. In IRB, quit: `quit`
4. Exit container shell: `exit`
## Publishing
1. Login to DockerHub from the Docker CLI: `docker login`
2. Push image `docker push poanetwork/elixir:1.6.4-node-ruby`

@ -1,8 +0,0 @@
# frozen_string_literal: true
source 'https://rubygems.org'
group :development do
gem 'license_finder', git: "https://github.com/KronicDeth/LicenseFinder.git", require: false, tag: "v5.1.1-rc.0"
gem 'pivotal_git_scripts', require: false
end

@ -1,38 +0,0 @@
GIT
remote: https://github.com/KronicDeth/LicenseFinder.git
revision: a61f2ffedcbaa0008d38a5536ea27a4b05877c4a
tag: v5.1.1-rc.0
specs:
license_finder (5.1.0)
bundler
httparty
rubyzip
thor
toml (= 0.2.0)
with_env (= 1.1.0)
xml-simple
GEM
remote: https://rubygems.org/
specs:
httparty (0.16.2)
multi_xml (>= 0.5.2)
multi_xml (0.6.0)
parslet (1.8.2)
pivotal_git_scripts (1.4.0)
rubyzip (1.2.1)
thor (0.20.0)
toml (0.2.0)
parslet (~> 1.8.0)
with_env (1.1.0)
xml-simple (1.1.5)
PLATFORMS
ruby
DEPENDENCIES
license_finder!
pivotal_git_scripts
BUNDLED WITH
1.16.1

@ -1,353 +0,0 @@
---
- - :whitelist
- MIT
- :who: Doc Ritezel
:why: Pre-approved
:versions: []
:when: 2018-01-29 00:00:00.000000000 Z
- - :whitelist
- ISC
- :who: Doc Ritezel
:why: Pre-approved
:versions: []
:when: 2018-01-29 00:00:00.000000000 Z
- - :whitelist
- New BSD
- :who: Doc Ritezel
:why: Pre-approved
:versions: []
:when: 2018-01-29 00:00:00.000000000 Z
- - :whitelist
- Apache 2.0
- :who: Doc Ritezel
:why: Pre-approved
:versions: []
:when: 2018-01-29 00:00:00.000000000 Z
- - :whitelist
- DWTFYWTPL
- :who: Doc Ritezel
:why: Pre-approved
:versions: []
:when: 2018-01-29 00:00:00.000000000 Z
- - :whitelist
- Simplified BSD
- :who:
:why:
:versions: []
:when: 2018-01-29 01:07:28.529920000 Z
- - :whitelist
- BSD
- :who:
:why:
:versions: []
:when: 2018-01-29 01:07:33.639610000 Z
- - :whitelist
- CC0-1.0
- :who:
:why:
:versions: []
:when: 2018-01-29 01:03:40.487695000 Z
- - :whitelist
- Public Domain
- :who:
:why:
:versions: []
:when: 2018-01-29 01:03:40.487695000 Z
- - :whitelist
- Unlicense
- :who:
:why:
:versions: []
:when: 2018-01-29 01:03:40.487695000 Z
- - :whitelist
- ruby
- :who:
:why:
:versions: []
:when: 2018-01-29 01:03:40.487695000 Z
- - :license
- ecto
- Apache 2.0
- :who:
:why:
:versions: []
:when: 2018-01-29 00:00:00.000000000 Z
- - :license
- set_locale
- DWTFYWTPL
- :who:
:why:
:versions: []
:when: 2018-01-29 00:50:47.514520000 Z
- - :license
- postgrex
- Apache 2.0
- :who:
:why:
:versions: []
:when: 2018-01-29 00:51:23.470100000 Z
- - :license
- poison
- CC0-1.0
- :who:
:why:
:versions: []
:when: 2018-01-29 00:51:52.519286000 Z
- - :license
- plug
- Apache 2.0
- :who:
:why:
:versions: []
:when: 2018-01-29 00:52:14.254242000 Z
- - :license
- ethereumex
- MIT
- :who:
:why:
:versions: []
:when: 2018-01-29 00:52:47.031205000 Z
- - :license
- hackney
- Apache 2.0
- :who:
:why:
:versions: []
:when: 2018-01-29 00:53:32.763607000 Z
- - :license
- gettext
- Apache 2.0
- :who:
:why:
:versions: []
:when: 2018-01-29 00:53:50.601029000 Z
- - :license
- gen_stage
- Apache 2.0
- :who:
:why:
:versions: []
:when: 2018-01-29 00:54:18.188006000 Z
- - :license
- db_connection
- Apache 2.0
- :who:
:why:
:versions: []
:when: 2018-01-29 00:54:36.494213000 Z
- - :license
- phoenix_live_reload
- MIT
- :who:
:why:
:versions: []
:when: 2018-01-29 01:00:27.447229000 Z
- - :license
- dialyxir
- Apache 2.0
- :who:
:why:
:versions: []
:when: 2018-01-29 01:00:51.180725000 Z
- - :license
- decimal
- Apache 2.0
- :who:
:why:
:versions: []
:when: 2018-01-29 01:01:08.182752000 Z
- - :license
- file_system
- DWTFYWTPL
- :who:
:why:
:versions: []
:when: 2018-01-29 01:01:35.443848000 Z
- - :license
- mime
- Apache 2.0
- :who:
:why:
:versions: []
:when: 2018-01-29 01:01:59.697732000 Z
- - :license
- wordwrap
- MIT
- :who:
:why:
:versions: []
:when: 2018-01-29 01:05:43.989619000 Z
- - :license
- path-is-inside
- MIT
- :who:
:why:
:versions: []
:when: 2018-01-29 01:06:19.430415000 Z
- - :license
- true-case-path
- Apache 2.0
- :who:
:why:
:versions: []
:when: 2018-01-29 01:06:35.683192000 Z
- - :license
- spdx-expression-parse
- MIT
- :who:
:why:
:versions: []
:when: 2018-01-29 01:06:48.440333000 Z
- - :license
- rc
- MIT
- :who:
:why:
:versions: []
:when: 2018-01-29 01:06:56.719276000 Z
- - :license
- amdefine
- MIT
- :who:
:why:
:versions: []
:when: 2018-01-29 01:07:04.040453000 Z
- - :license
- normalize-scss
- MIT
- :who:
:why:
:versions: []
:when: 2018-01-29 01:07:04.040453000 Z
- - :license
- optimist
- MIT
- :who:
:why:
:versions: []
:when: 2018-01-29 01:07:04.040453000 Z
- - :license
- ua-parser-js
- MIT
- :who:
:why:
:versions: []
:when: 2018-01-29 01:07:04.040453000 Z
- - :license
- indexof
- MIT
- :who:
:why:
:versions: []
:when: 2018-01-29 01:10:35.556773000 Z
- - :license
- bundler
- MIT
- :who:
:why:
:versions: []
:when: 2018-01-29 02:58:26.066580000 Z
- - :license
- abnf2
- MIT
- :who:
:why:
:versions: []
:when: 2018-02-01 07:42:55.657686000 Z
- - :license
- ex_cldr
- Apache 2.0
- :who:
:why:
:versions: []
:when: 2018-02-01 07:43:30.533305000 Z
- - :license
- ex_cldr_numbers
- Apache 2.0
- :who:
:why:
:versions: []
:when: 2018-02-01 07:43:48.924488000 Z
- - :license
- ex_cldr_units
- Apache 2.0
- :who:
:why:
:versions: []
:when: 2018-02-01 07:44:03.250381000 Z
- - :license
- math
- Apache 2.0
- :who:
:why:
:versions: []
:when: 2018-02-02 09:32:25.722843000 Z
- - :license
- scrivener
- MIT
- :who:
:why:
:versions: []
:when: 2018-02-02 09:32:41.813374000 Z
- - :license
- scrivener_ecto
- MIT
- :who:
:why:
:versions: []
:when: 2018-02-02 09:32:51.070166000 Z
- - :license
- exq
- Apache 2.0
- :who:
:why:
:versions: []
:when: 2018-02-05 04:51:08.335169000 Z
- - :license
- exq_ui
- Apache 2.0
- :who:
:why:
:versions: []
:when: 2018-02-05 04:51:16.722700000 Z
- - :license
- async-foreach
- MIT
- :who:
:why:
:versions: []
:when: 2018-02-05 04:53:27.833163000 Z
- - :license
- json-schema
- BSD
- :who:
:why:
:versions: []
:when: 2018-02-05 04:53:34.656478000 Z
- - :whitelist
- CC-BY-4.0
- :who:
:why:
:versions: []
:when: 2018-02-05 04:53:59.165323000 Z
- - :license
- sntp
- BSD
- :who:
:why:
:versions: []
:when: 2018-02-05 04:54:45.159644000 Z
- - :license
- fsevents
- MIT
- :who:
:why:
:versions: []
:when: 2018-02-05 04:53:27.833163000 Z
- - :license
- flow
- Apache 2.0
- :who:
:why:
:versions: []
:when: 2018-02-09 05:08:02.294651000 Z
Loading…
Cancel
Save