mirror of
https://github.com/cs3org/reva.git
synced 2025-04-18 13:44:12 +03:00
Migrate license check to Fossa/Github integration (#3412)
Co-authored-by: Vasco Guita <vasco.guita@cern.ch>
This commit is contained in:
parent
7f8b46dc15
commit
040fe69ab6
48
.drone.star
48
.drone.star
@ -1,20 +1,3 @@
|
||||
# Shared step definitions
|
||||
def licenseScanStep():
|
||||
return {
|
||||
"name": "license-scan",
|
||||
"image": "registry.cern.ch/docker.io/library/golang:1.19",
|
||||
"environment": {
|
||||
"FOSSA_API_KEY": {
|
||||
"from_secret": "fossa_api_key",
|
||||
},
|
||||
},
|
||||
"detach": True,
|
||||
"commands": [
|
||||
"wget -qO- https://github.com/fossas/fossa-cli/releases/download/v1.0.11/fossa-cli_1.0.11_linux_amd64.tar.gz | tar xvz -C /go/bin/",
|
||||
"/go/bin/fossa analyze",
|
||||
],
|
||||
}
|
||||
|
||||
def makeStep(target):
|
||||
return {
|
||||
"name": "build",
|
||||
@ -151,23 +134,8 @@ def buildAndPublishDocker():
|
||||
"for i in $(ls /drone/src/dist);do curl --fail -X PUT -u $${USERNAME}:$${PASSWORD} https://cernbox.cern.ch/cernbox/desktop/remote.php/webdav/eos/project/r/reva/www/daily/$(date +%Y-%m-%d)/${DRONE_COMMIT}/$${i} --data-binary @./dist/$${i} ; done",
|
||||
],
|
||||
},
|
||||
licenseScanStep(),
|
||||
makeStep("ci"),
|
||||
lintStep(),
|
||||
{
|
||||
"name": "license-check",
|
||||
"image": "registry.cern.ch/docker.io/library/golang:1.19",
|
||||
"failure": "ignore",
|
||||
"environment": {
|
||||
"FOSSA_API_KEY": {
|
||||
"from_secret": "fossa_api_key",
|
||||
},
|
||||
},
|
||||
"commands": [
|
||||
"wget -qO- https://github.com/fossas/fossa-cli/releases/download/v1.0.11/fossa-cli_1.0.11_linux_amd64.tar.gz | tar xvz -C /go/bin/",
|
||||
"/go/bin/fossa test --timeout 900",
|
||||
],
|
||||
},
|
||||
{
|
||||
"name": "publish-docker-reva-latest",
|
||||
"pull": "always",
|
||||
@ -304,7 +272,6 @@ def buildOnly():
|
||||
},
|
||||
},
|
||||
"steps": [
|
||||
licenseScanStep(),
|
||||
makeStep("ci"),
|
||||
{
|
||||
"name": "Docker build",
|
||||
@ -316,20 +283,6 @@ def buildOnly():
|
||||
},
|
||||
},
|
||||
lintStep(),
|
||||
{
|
||||
"name": "license-check",
|
||||
"image": "registry.cern.ch/docker.io/library/golang:1.19",
|
||||
"failure": "ignore",
|
||||
"environment": {
|
||||
"FOSSA_API_KEY": {
|
||||
"from_secret": "fossa_api_key",
|
||||
},
|
||||
},
|
||||
"commands": [
|
||||
"wget -qO- https://github.com/fossas/fossa-cli/releases/download/v1.0.11/fossa-cli_1.0.11_linux_amd64.tar.gz | tar xvz -C /go/bin/",
|
||||
"/go/bin/fossa test --timeout 900",
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
@ -383,7 +336,6 @@ def release():
|
||||
},
|
||||
},
|
||||
"steps": [
|
||||
licenseScanStep(),
|
||||
makeStep("ci"),
|
||||
lintStep(),
|
||||
{
|
||||
|
32
.fossa.yml
Executable file → Normal file
32
.fossa.yml
Executable file → Normal file
@ -1,28 +1,6 @@
|
||||
# Generated by FOSSA CLI (https://github.com/fossas/fossa-cli)
|
||||
# Visit https://fossa.com to learn more
|
||||
version: 3
|
||||
|
||||
version: 2
|
||||
cli:
|
||||
server: https://app.fossa.com
|
||||
fetcher: custom
|
||||
project: cs3org/reva
|
||||
analyze:
|
||||
modules:
|
||||
- name: github.com/cs3org/reva/cmd/reva
|
||||
type: go
|
||||
target: github.com/cs3org/reva/cmd/reva
|
||||
path: cmd/reva
|
||||
options:
|
||||
strategy: gomodules
|
||||
- name: github.com/cs3org/reva/cmd/revad
|
||||
type: go
|
||||
target: github.com/cs3org/reva/cmd/revad
|
||||
path: cmd/revad
|
||||
options:
|
||||
strategy: gomodules
|
||||
- name: github.com/cs3org/reva/tools/check-license
|
||||
type: go
|
||||
target: github.com/cs3org/reva/tools/check-license
|
||||
path: tools/check-license
|
||||
options:
|
||||
strategy: gomodules
|
||||
targets:
|
||||
exclude:
|
||||
- type: npm
|
||||
path: docs/
|
17
.github/workflows/check-changelog.yml
vendored
17
.github/workflows/check-changelog.yml
vendored
@ -1,7 +1,17 @@
|
||||
name: Check Changelog
|
||||
on:
|
||||
pull_request:
|
||||
paths-ignore: [".github/**", "Makefile", "tools/**", "docs/**", "tests/**", ".drone.star", ".drone.env", "go.mod", "go.sum"]
|
||||
paths-ignore:
|
||||
- ".github/**"
|
||||
- "Makefile"
|
||||
- "tools/**"
|
||||
- "docs/**"
|
||||
- "tests/**"
|
||||
- ".drone.star"
|
||||
- ".drone.env"
|
||||
- ".fossa.yml"
|
||||
- "go.mod"
|
||||
- "go.sum"
|
||||
|
||||
jobs:
|
||||
check-changelog:
|
||||
@ -12,7 +22,7 @@ jobs:
|
||||
- name: Setup Go environment
|
||||
uses: actions/setup-go@v3.3.0
|
||||
with:
|
||||
go-version-file: ${{ github.workspace }}/go.mod
|
||||
go-version-file: go.mod
|
||||
- name: Setup Golang caches
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
@ -38,8 +48,7 @@ jobs:
|
||||
ref: v0.2.0
|
||||
- name: Install calens
|
||||
if: steps.cache-calens.outputs.cache-hit != 'true'
|
||||
run: cd ${{ github.workspace }}/calens && go install
|
||||
|
||||
run: cd calens && go install
|
||||
- name: Check if changelog exists
|
||||
run: |
|
||||
$(go env GOPATH)/bin/calens | \
|
||||
|
3
changelog/unreleased/enhancement-fossa.md
Normal file
3
changelog/unreleased/enhancement-fossa.md
Normal file
@ -0,0 +1,3 @@
|
||||
Enhancement: Migrate Fossa from Drone to Github Integration
|
||||
|
||||
https://github.com/cs3org/reva/pull/3412
|
Loading…
x
Reference in New Issue
Block a user