Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

Commit

Permalink
Migrate license check to Fossa/Github integration (cs3org#3412)
Browse files Browse the repository at this point in the history
Co-authored-by: Vasco Guita <[email protected]>
  • Loading branch information
vascoguita and vascoguita committed Nov 2, 2022
1 parent db31ab9 commit effbe7c
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 79 deletions.
48 changes: 0 additions & 48 deletions .drone.star
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -304,7 +272,6 @@ def buildOnly():
},
},
"steps": [
licenseScanStep(),
makeStep("ci"),
{
"name": "Docker build",
Expand All @@ -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",
],
},
],
}

Expand Down Expand Up @@ -383,7 +336,6 @@ def release():
},
},
"steps": [
licenseScanStep(),
makeStep("ci"),
lintStep(),
{
Expand Down
32 changes: 5 additions & 27 deletions .fossa.yml
100755 → 100644
Original file line number Diff line number Diff line change
@@ -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 changes: 13 additions & 4 deletions .github/workflows/check-changelog.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -12,7 +22,7 @@ jobs:
- name: Setup Go environment
uses: actions/[email protected]
with:
go-version-file: ${{ github.workspace }}/go.mod
go-version-file: go.mod
- name: Setup Golang caches
uses: actions/cache@v3
with:
Expand All @@ -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 | \
Expand Down
3 changes: 3 additions & 0 deletions changelog/unreleased/enhancement-fossa.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Enhancement: Migrate Fossa from Drone to Github Integration

https://github.com/cs3org/reva/pull/3412

0 comments on commit effbe7c

Please sign in to comment.