Commit 0749b1f1 authored by Can Eldem's avatar Can Eldem
Browse files

Update license finder to 5.9.2

parent 669ee51b
......@@ -55,6 +55,23 @@ unit:
- bundle install
- bundle exec rspec
QA:php-composer:
extends: .QA
variables:
QA_PROJECT: php-composer
QA:php-composer-v1-1:
extends: QA:php-composer
variables:
LM_REPORT_VERSION: '1.1'
QA_RESULTS: php-composer-v1.1
QA:php-composer-v2:
extends: QA:php-composer
variables:
LM_REPORT_VERSION: 2
QA_RESULTS: php-composer-v2
QA:java-maven:
extends: .QA
variables:
......
# GitLab License management changelog
## v2.1.0
- Bump LicenseFinder to 5.9.2
- Add support for PHP language
## v2.0.2
- Fix mismatch between dependency versions listed in `package-lock.json` and reported versions.
......
ARG LICENSE_FINDER_VERSION=5.6.2
ARG LICENSE_FINDER_VERSION=5.9.2
FROM licensefinder/license_finder:$LICENSE_FINDER_VERSION
MAINTAINER GitLab
......@@ -16,15 +16,14 @@ RUN npm install npm-install-peers
# Don't let Rubygem fail with the numerous projects using PG or MySQL,
# install realpath, includes for python3, and pip for python3
# Install additional php packages for better composer package support
# Install .NET Core 2.2, 3.0 because it is not installed in the license_finder image (https://github.com/pivotal/LicenseFinder/pull/632).
RUN apt-get update && \
RUN add-apt-repository ppa:ondrej/php -y && apt-get update -y && \
apt-get install -y --no-install-recommends \
libpq-dev libmysqlclient-dev realpath python3-dev python3-pip dotnet-sdk-2.2 dotnet-sdk-3.0 && \
libpq-dev libmysqlclient-dev realpath python3-dev python3-pip dotnet-sdk-2.2 dotnet-sdk-3.0 \
php7.1-mbstring php7.1-intl php7.1-xml php7.1-soap -y && \
rm -rf /var/lib/apt/lists/*
# Don't load RVM automatically, it doesn't work with GitLab-CI
RUN mv /etc/profile.d/rvm.sh /rvm.sh
# Warning! Environment variable PIP_VERSION causes the upgrade of pip to fail.
ARG VERSION_OF_PIP=19.1.1
ENV VERSION_OF_PIP $VERSION_OF_PIP
......@@ -48,6 +47,5 @@ ENV LM_REPORT_VERSION ${LM_REPORT_VERSION:-1}
COPY test /test
COPY run.sh /
COPY . /opt/license-management/
RUN bash -lc "source /rvm.sh && cd /opt/license-management && gem build *.gemspec && gem install *.gem"
ENTRYPOINT ["/run.sh"]
RUN bash -lc "cd /opt/license-management && gem build *.gemspec && gem install *.gem"
ENTRYPOINT ["/run.sh"]
\ No newline at end of file
......@@ -71,6 +71,7 @@ The following table shows which languages and package managers are supported.
| .NET | [Nuget](https://www.nuget.org/) |
| Python | [pip](https://pip.pypa.io/en/stable/) |
| Ruby | [gem](https://rubygems.org/) |
| PHP | [composer](https://getcomposer.org) |
Inject `SETUP_CMD` to the docker command to override the given package managers
and run your custom command to setup your environment with a custom package manager.
......@@ -85,7 +86,7 @@ docker run \
## Settings
The License Management tool can be customized with environments variables for some project types.
The License Management tool can be customized with environments variables for some project types.
| Environment variable | Project type | Function |
|----------------------|--------------|----------|
......
......@@ -17,6 +17,7 @@ do
export LM_REPORT_VERSION=$version
echo "Report Version $LM_REPORT_VERSION"
QA_PROJECT=go-modules ./bin/test
QA_PROJECT=php-composer ./bin/test
QA_PROJECT=java-maven QA_REF=831c7a04 ./bin/test
QA_PROJECT=python-pip QA_REF=04dce91b LM_PYTHON_VERSION=2 ./bin/test
QA_PROJECT=python-pip QA_RESULTS="python3-pip-v$version" QA_REF=48e250a1 LM_PYTHON_VERSION=3 ./bin/test
......
......@@ -3,6 +3,7 @@ ids:
Apache1_1: Apache-1.1
Apache 2.0: Apache-2.0
Apache2: Apache-2.0
AFLv2.1: AFL-2.1
Apache License v2.0: Apache-2.0
ASL, version 2: Apache-2.0
BSD: BSD-4-Clause
......@@ -20,6 +21,7 @@ ids:
LGPL: LGPL-3.0-only
LGPL, version 2.1: LGPL-2.1
MIT: MIT
MIT/X11: MIT
Mozilla Public License 2.0: MPL-2.0
MPL 1.1: MPL-1.1
MPL1_1: MPL-1.1
......
......@@ -95,9 +95,6 @@ case "$COMMAND" in
analyze)
# Analyze project
# Load RVM
source /rvm.sh
# Change current directory to the project path.
APP_PATH=$1
shift
......@@ -112,7 +109,9 @@ case "$COMMAND" in
# So we ignore the error.
$($rvm_recommended_ruby) 2>/dev/null || true
rvm use .
gem install bundler
# rvm pulls outdated gems
# need this to update system bundler
gem update --system
# We need to install the license_finder gem into this Ruby version too.
gem install license_finder -v "$LICENSE_FINDER_VERSION"
gem install --no-document /opt/license-management/*.gem
......@@ -121,37 +120,28 @@ case "$COMMAND" in
# Ignore test and development dependencies.
license_finder ignored_groups add development
license_finder ignored_groups add test
bundle install --without "development test" --jobs $(nproc)
bundle install --jobs $(nproc)
skip_prepare=true
fi
if test -f package.json; then
# Check is npm is being used, if so convert it to yarn
# Check is npm is being used
if [ -f package-lock.json ] && [ ! -f yarn.lock ] ; then
# restore original lock file state on EXIT
function restore_lockfile {
echo "Cleanup generated $APP_PATH/yarn.lock"
rm -f $APP_PATH/yarn.lock || true
}
trap restore_lockfile EXIT
echo "Convert package-lock.json to yarn.lock"
yarn import --ignore-engines --ignore-scripts
echo "Installing npm packages with npm ci"
npm ci
fi
# install via yarn
if [ ! -d node_modules ]; then
echo "Installing yarn packages"
yarn install --ignore-engines --ignore-scripts
# Try to install Peer packages too, npm install doesn't do it anymore.
/node_modules/.bin/npm-install-peers
fi
skip_prepare=true
fi
if find . -name "*.go" -printf "found" -quit |grep found >/dev/null ; then
if [ ! -f glide.lock -a ! -f vendor/manifest -a ! -f Gopkg.lock -a ! -f go.mod ]; then
if [[ ( ! -f glide.lock ) && ( ! -f vendor/manifest ) && (! -f Gopkg.lock ) && (! -f go.mod ) ]]; then
echo "running go get"
# Only install deps if not using glide, govendor or dep
# Symlink the project into GOPATH to allow fetching dependencies.
......@@ -195,8 +185,6 @@ case "$COMMAND" in
fi
echo "Preparing JSON report..."
license_management report ${prepare} --format=json --save=gl-license-management-report.json ${LICENSE_FINDER_CLI_OPTS}
# rvm removes trap in bash: https://github.com/rvm/rvm/issues/4416
declare -f restore_lockfile > /dev/null && restore_lockfile
popd > /dev/null
;;
......
......@@ -31,7 +31,7 @@
},
{
"count": 1,
"name": "MPL 1.1, LGPL 2.1, Apache 2.0"
"name": "MPL 1.1, GNU Lesser General Public License version 2.1, Apache 2.0"
},
{
"count": 1,
......@@ -311,8 +311,8 @@
"url": "http://www.apache.org/licenses/LICENSE-2.0.txt"
},
{
"name": "LGPL 2.1",
"url": ""
"name": "GNU Lesser General Public License version 2.1",
"url": "https://opensource.org/licenses/LGPL-2.1"
},
{
"name": "MPL 1.1",
......@@ -320,7 +320,7 @@
}
],
"license": {
"name": "MPL 1.1, LGPL 2.1, Apache 2.0",
"name": "MPL 1.1, GNU Lesser General Public License version 2.1, Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.txt"
},
"dependency": {
......
......@@ -30,7 +30,7 @@
},
{
"count": 1,
"name": "MPL 1.1, LGPL 2.1, Apache 2.0"
"name": "MPL 1.1, GNU Lesser General Public License version 2.1, Apache 2.0"
},
{
"count": 1,
......@@ -221,7 +221,7 @@
},
{
"license": {
"name": "MPL 1.1, LGPL 2.1, Apache 2.0",
"name": "MPL 1.1, GNU Lesser General Public License version 2.1, Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.txt"
},
"dependency": {
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -14,7 +14,7 @@
},
{
"count": 1,
"name": "New BSD License"
"name": "New BSD"
},
{
"count": 1,
......@@ -125,7 +125,8 @@
},
{
"license": {
"name": "New BSD License"
"name": "New BSD",
"url": "http://opensource.org/licenses/BSD-3-Clause"
},
"dependency": {
"name": "django-xmlrpc",
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment