Commit 1e200568 authored by mo's avatar mo

Merge branch '215933-new-repo' into 'main'

Relocate project

See merge request !3
parents cb0681e7 8e4aaaf0
Pipeline #199608183 passed with stages
in 87 minutes and 16 seconds
......@@ -4,7 +4,6 @@ variables:
DOCKER_DRIVER: overlay2
GIT_DEPTH: "2"
GIT_STRATEGY: fetch
MAJOR: 3
TMP_IMAGE: $CI_REGISTRY_IMAGE/license-finder:$CI_COMMIT_SHA
include:
......
......@@ -5,6 +5,7 @@
- bin/omnibus setup
- bin/omnibus build $OMNIBUS_PROJECT
artifacts:
expire_in: 1 day
paths:
- pkg/
expire_in: 1 day
......
......@@ -37,12 +37,5 @@ major:
rules:
- if: $CI_COMMIT_TAG
when: manual
after_script:
# Also push to registry.gitlab.com/gitlab-org/security-products/analyzers/license-finder
- docker login -u gitlab-ci-token -p $GITLAB_TOKEN $CI_REGISTRY
- export TARGET_IMAGE=$CI_REGISTRY_IMAGE:${IMAGE_TAG:-$CI_JOB_NAME}
- export DESTINATION_IMAGE=registry.gitlab.com/gitlab-org/security-products/analyzers/license-finder:${IMAGE_TAG:-$CI_JOB_NAME}
- docker tag $TARGET_IMAGE $DESTINATION_IMAGE
- docker push $DESTINATION_IMAGE
variables:
IMAGE_TAG: $MAJOR
IMAGE_TAG: 3
......@@ -42,6 +42,7 @@ lint:
paths:
- vendor
artifacts:
expire_in: 1 week
paths:
- coverage/coverage.xml
- rspec.xml
......
This diff is collapsed.
......@@ -8,7 +8,7 @@ GIT
PATH
remote: .
specs:
license-management (3.27.0)
license-management (3.28.0)
license_finder (~> 6.7)
spandx (~> 0.13)
......
# GitLab License Management
[![pipeline status](https://gitlab.com/gitlab-org/security-products/license-management/badges/master/pipeline.svg)](https://gitlab.com/gitlab-org/security-products/license-management/commits/master)
[![coverage report](https://gitlab.com/gitlab-org/security-products/license-management/badges/master/coverage.svg)](https://gitlab.com/gitlab-org/security-products/license-management/commits/master)
[![pipeline status](https://gitlab.com/gitlab-org/security-products/analyzers/license-finder/badges/master/pipeline.svg)](https://gitlab.com/gitlab-org/security-products/analyzers/license-finder/commits/master)
[![coverage report](https://gitlab.com/gitlab-org/security-products/analyzers/license-finder/badges/master/coverage.svg)](https://gitlab.com/gitlab-org/security-products/analyzers/license-finder/commits/master)
GitLab tool for detecting licenses of the dependencies used by the provided source.
It is currently based on [License Finder][license_finder]
......@@ -16,10 +16,10 @@ only, but this may change in the future.
docker run \
--volume "$PWD":/code \
--rm \
registry.gitlab.com/gitlab-org/security-products/license-management:latest analyze /code
registry.gitlab.com/gitlab-org/security-products/analyzers/license-finder:latest analyze /code
```
1. The results will be stored in the `gl-license-management-report.json` file in the application directory.
1. The results will be stored in the `gl-license-scanning-report.json` file in the application directory.
## Development
......@@ -34,7 +34,7 @@ $ ./bin/docker-build
You can then run License Management on some target directory:
```sh
$ docker run --rm --volume "/path/to/my/project":/code license-management analyze /code
$ docker run --rm --volume "/path/to/my/project":/code --env CI_PROJECT_DIR=/code
```
### Running the tests
......@@ -58,7 +58,7 @@ $ enable_dev_mode
$ bundle open license_finder
```
The `docker-shell` script will mount the current project as a volume into `/builds/gitlab-org/security-products/license-management`.
The `docker-shell` script will mount the current project as a volume into `/builds/gitlab-org/security-products/analyzers/license-finder`.
This allows you to edit code from your host machine using your preferred editor and
see the affect of those changes from within the running docker container.
......@@ -94,7 +94,7 @@ docker run \
--volume "$PWD":/code \
--env "SETUP_CMD=./my-custom-install-script.sh" \
--rm \
registry.gitlab.com/gitlab-org/security-products/license-management:latest analyze /code
registry.gitlab.com/gitlab-org/security-products/analyzers/license-finder:latest analyze /code
```
## Settings
......@@ -135,16 +135,16 @@ Please check the [Release Process documentation](https://gitlab.com/gitlab-org/s
If you want to help, read the [contribution guidelines](CONTRIBUTING.md).
If an unknown license is detected, please consider updating the mapping defined
in [normalized-licenses.yml](https://gitlab.com/gitlab-org/security-products/license-management/blob/master/normalized-licenses.yml). A mapping can be for a detected name or url and must correspond to an SPDX identifier found in [spdx-licenses.json](https://gitlab.com/gitlab-org/security-products/license-management/blob/master/spdx-licenses.json).
in [normalized-licenses.yml](https://gitlab.com/gitlab-org/security-products/analyzers/license-finder/blob/master/normalized-licenses.yml). A mapping can be for a detected name or url and must correspond to an SPDX identifier found in [spdx-licenses.json](https://gitlab.com/gitlab-org/security-products/analyzers/license-finder/blob/master/spdx-licenses.json).
[bower]: https://bower.io/
[bundler]: https://bundler.io/
[changelog]: https://gitlab.com/gitlab-org/security-products/license-management/-/blob/master/CHANGELOG.md
[changelog]: https://gitlab.com/gitlab-org/security-products/analyzers/license-finder/-/blob/master/CHANGELOG.md
[composer]: https://getcomposer.org
[conan]: https://conan.io/
[dotnet_core]: https://docs.microsoft.com/en-us/dotnet/core/tools/
[gemfile_lock]: https://gitlab.com/gitlab-org/security-products/license-management/-/blob/master/Gemfile.lock
[gemspec]: https://gitlab.com/gitlab-org/security-products/license-management/-/blob/master/license-management.gemspec
[gemfile_lock]: https://gitlab.com/gitlab-org/security-products/analyzers/license-finder/-/blob/master/Gemfile.lock
[gemspec]: https://gitlab.com/gitlab-org/security-products/analyzers/license-finder/-/blob/master/license-management.gemspec
[godep]: https://github.com/tools/godep
[gomod]: https://github.com/golang/go/wiki/Modules
[gradle]: https://gradle.org/
......@@ -154,5 +154,5 @@ in [normalized-licenses.yml](https://gitlab.com/gitlab-org/security-products/lic
[nuget]: https://www.nuget.org/
[pip]: https://pip.pypa.io/en/stable/
[pipenv]: https://github.com/pypa/pipenv
[version_rb]: https://gitlab.com/gitlab-org/security-products/license-management/-/blob/master/lib/license/management/version.rb
[version_rb]: https://gitlab.com/gitlab-org/security-products/analyzers/license-finder/-/blob/master/lib/license/management/version.rb
[yarn]: https://yarnpkg.com/
......@@ -4,7 +4,7 @@ set -e
cd "$(dirname "$0")/.."
LATEST_IMAGE=${LATEST_IMAGE:='registry.gitlab.com/gitlab-org/security-products/license-management:latest'}
LATEST_IMAGE=${LATEST_IMAGE:='registry.gitlab.com/gitlab-org/security-products/analyzers/license-finder:latest'}
IMAGE_NAME=${IMAGE_NAME:-$(basename "$PWD"):latest}
export DOCKER_BUILDKIT=1
......
......@@ -5,7 +5,7 @@ set -e
cd "$(dirname "$0")/.."
IMAGE_NAME=${IMAGE_NAME:-$(basename "$PWD"):latest}
LATEST_IMAGE=registry.gitlab.com/gitlab-org/security-products/license-management:latest
LATEST_IMAGE=registry.gitlab.com/gitlab-org/security-products/analyzers/license-finder:latest
docker pull $LATEST_IMAGE
docker tag $LATEST_IMAGE "$IMAGE_NAME"
......@@ -9,5 +9,5 @@ IMAGE_NAME=${IMAGE_NAME:-$(basename "$PWD"):latest}
docker run --rm -it \
--entrypoint='' \
--network=host \
--volume "$PWD":/builds/gitlab-org/security-products/license-management \
"$IMAGE_NAME" sh -c 'cd /builds/gitlab-org/security-products/license-management && exec bash -l'
--volume "$PWD":/builds/gitlab-org/security-products/analyzers/license-finder \
"$IMAGE_NAME" sh -c 'cd /builds/gitlab-org/security-products/analyzers/license-finder && exec bash -l'
......@@ -78,7 +78,7 @@ case $1 in
pull)
mkdir -p pkg/
repo_url="https://gitlab.com/gitlab-org/security-products/license-management/-/jobs/artifacts/master/raw/pkg"
repo_url="https://gitlab.com/gitlab-org/security-products/analyzers/license-finder/-/jobs/artifacts/master/raw/pkg"
grep '.*-.*:' < .gitlab/deb.yml | sed 's/://' | while IFS= read -r job
do
......
......@@ -4,7 +4,7 @@ set -e
cd "$(dirname "$0")/.."
export PATH="/builds/gitlab-org/security-products/license-management/exe:/opt/gitlab/embedded/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
export PATH="/builds/gitlab-org/security-products/analyzers/license-finder/exe:/opt/gitlab/embedded/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
if [ ! -f /usr/sbin/haproxy ] && command -v apt-get; then
curl https://haproxy.debian.net/bernat.debian.org.gpg | apt-key add -
......
......@@ -4,8 +4,8 @@ set -e
cd "$(dirname "$0")/.."
export PATH="/builds/gitlab-org/security-products/license-management/exe:/opt/gitlab/embedded/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
export RUBYLIB="/builds/gitlab-org/security-products/license-management/lib"
export PATH="/builds/gitlab-org/security-products/analyzers/license-finder/exe:/opt/gitlab/embedded/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
export RUBYLIB="/builds/gitlab-org/security-products/analzyers/license-finder/lib"
if ! command -v bundle; then
./bin/setup
......
......@@ -3,7 +3,7 @@
require_relative '../../lib/license/management/version.rb'
name "license-management"
maintainer "GitLab B.V."
homepage "https://gitlab.com/gitlab-org/security-products/license-management"
homepage "https://gitlab.com/gitlab-org/security-products/analyzers/license-finder"
license_file "LICENSE"
install_dir "#{default_root}/gitlab"
......
......@@ -7,7 +7,7 @@ module License
include Loggable
include Verifiable
CONTRIBUTION_URL = "https://gitlab.com/gitlab-org/security-products/license-management#contributing"
CONTRIBUTION_URL = "https://gitlab.com/gitlab-org/security-products/analyzers/license-finder#contributing"
attr_reader :dependencies, :repository
......
......@@ -2,6 +2,6 @@
module License
module Management
VERSION = '3.27.0'
VERSION = '3.28.0'
end
end
......@@ -12,13 +12,13 @@ Gem::Specification.new do |spec|
spec.summary = 'License Management job for GitLab CI.'
spec.description = 'License Management job for GitLab CI. https://docs.gitlab.com/ee/user/compliance/license_compliance/index.html'
spec.homepage = 'https://gitlab.com/gitlab-org/security-products/license-management'
spec.homepage = 'https://gitlab.com/gitlab-org/security-products/analyzers/license-finder'
spec.license = 'Nonstandard'
spec.metadata['allowed_push_host'] = 'https://example.com'
spec.metadata['homepage_uri'] = spec.homepage
spec.metadata['source_code_uri'] = 'https://gitlab.com/gitlab-org/security-products/license-management'
spec.metadata['changelog_uri'] = 'https://gitlab.com/gitlab-org/security-products/license-management/blob/master/CHANGELOG.md'
spec.metadata['source_code_uri'] = 'https://gitlab.com/gitlab-org/security-products/analyzers/license-finder'
spec.metadata['changelog_uri'] = 'https://gitlab.com/gitlab-org/security-products/analyzers/license-finder/blob/master/CHANGELOG.md'
spec.files = Dir.chdir(File.expand_path(__dir__)) do
Dir.glob('exe/*') + Dir.glob('lib/**/**/*.{rb,yml}') + Dir.glob('*.{md,yml,json}')
......
{
"$id": "https://gitlab.com/gitlab-org/security-products/license-management/blob/master/spec/fixtures/schema/v1.0.json",
"$id": "https://gitlab.com/gitlab-org/security-products/analyzers/license-finder/blob/master/spec/fixtures/schema/v1.0.json",
"type": "object",
"required": [
"licenses",
......
{
"$id": "https://gitlab.com/gitlab-org/security-products/license-management/blob/master/spec/fixtures/schema/v1.1.json",
"$id": "https://gitlab.com/gitlab-org/security-products/analyzers/license-finder/blob/master/spec/fixtures/schema/v1.1.json",
"type": "object",
"required": [
"version",
......
{
"$id": "https://gitlab.com/gitlab-org/security-products/license-management/blob/master/spec/fixtures/schema/v2.0.json",
"$id": "https://gitlab.com/gitlab-org/security-products/analyzers/license-finder/blob/master/spec/fixtures/schema/v2.0.json",
"type": "object",
"required": [
"version",
......
{
"$id": "https://gitlab.com/gitlab-org/security-products/license-management/blob/master/spec/fixtures/schema/v2.1.json",
"$id": "https://gitlab.com/gitlab-org/security-products/analyzers/license-finder/blob/master/spec/fixtures/schema/v2.1.json",
"type": "object",
"required": [
"version",
......
......@@ -72,8 +72,8 @@ RSpec.describe "conan" do
context "when pulling packages from a custom conan remote" do
let(:package_name) { "#{project_namespace.tr('/', '+')}+#{project_name}/stable" }
let(:project_namespace) { ENV.fetch('CI_PROJECT_NAMESPACE', 'gitlab-org/security-products') }
let(:project_name) { ENV.fetch('CI_PROJECT_NAME', 'license-management') }
let(:project_namespace) { ENV.fetch('CI_PROJECT_NAMESPACE', 'gitlab-org/security-products/analyzers') }
let(:project_name) { ENV.fetch('CI_PROJECT_NAME', 'license-finder') }
let(:api_url) { ENV.fetch('CI_API_V4_URL', 'https://gitlab.com/api/v4') }
before do
......@@ -92,7 +92,8 @@ RSpec.describe "conan" do
end
end
specify do
# https://gitlab.com/gitlab-org/security-products/analyzers/license-finder/-/merge_requests/3/diffs#note_424952493
pending do
expect(subject).to match_schema
expect(subject.dependency_names).to match_array(['example'])
expect(subject.licenses_for('example')).to match_array(['MIT'])
......
......@@ -11,7 +11,7 @@ RSpec.describe "maven" do
include_examples "each report version", "java", "maven-multimodules"
context "when the maven dependencies come from the same projects public maven repository" do
let(:env) { { 'CI_PROJECT_ID' => '6130122' } }
let(:env) { { 'CI_PROJECT_ID' => '18446184' } }
before do
runner.mount(dir: fixture_file('java/maven/gitlab-repo'))
......
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