Skip to content
Snippets Groups Projects
Commit 21eddd61 authored by Malte Bauch's avatar Malte Bauch
Browse files

Merge branch '41-restructure-project-directory-structure' into 'v.0.1.0-codename-threadbare'

Resolve "Restructure Project Directory Structure"

See merge request cocsn/gosdn!54
parents bf266b80 c6aad867
Branches
No related tags found
3 merge requests!90Develop,!54Resolve "Restructure Project Directory Structure",!53V.0.1.0 Codename Threadbare
Pipeline #52916 passed
Showing
with 114 additions and 77 deletions
......@@ -3,76 +3,12 @@ variables:
stages:
- test
- compliance
- build
- documentation
before_script:
- git config --global url."https://$GO_MODULES_USER:$GO_MODULES_ACCESS_TOKEN@code.fbi.h-da.de".insteadOf "https://code.fbi.h-da.de"
code-quality-master:
image: golangci/golangci-lint:latest-alpine
stage: test
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH
- if: $CI_DEFAULT_BRANCH
script:
# writes golangci-lint output to gl-code-quality-report.json
- golangci-lint run --config .ci/.golangci-master.yml --out-format code-climate | tee gl-code-quality-report.json
artifacts:
reports:
codequality: gl-code-quality-report.json
paths:
- gl-code-quality-report.json
code-quality:
image: golangci/golangci-lint:latest-alpine
stage: test
allow_failure: true
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != $CI_DEFAULT_BRANCH
script:
# writes golangci-lint output to gl-code-quality-report.json
- golangci-lint run --config .ci/.golangci.yml --out-format code-climate | tee gl-code-quality-report.json
artifacts:
reports:
codequality: gl-code-quality-report.json
paths:
- gl-code-quality-report.json
Documentation:
before_script:
- pwd
image:
name: pandoc/latex
entrypoint:
- ''
stage: build
rules:
- changes:
- documentation/design/*.md
script:
- cd documentation/design
- pandoc --filter pandoc-citeproc --bibliography=bibliography.bib --csl=acm-sig-proceedings.csl
--variable papersize=a4paper -s *.md -o documentation.pdf
artifacts:
paths:
- documentation/design/documentation.pdf
sast:
variables:
SAST_ANALYZER_IMAGE_TAG: '2'
SAST_EXCLUDED_PATHS: spec, test, tests, tmp
SEARCH_MAX_DEPTH: '4'
stage: compliance
license_scanning:
stage: compliance
gemnasium-dependency_scanning:
stage: compliance
include:
- template: Security/SAST.gitlab-ci.yml
- template: Dependency-Scanning.gitlab-ci.yml
- template: Security/License-Scanning.gitlab-ci.yml
- local: '/build/ci/.code-quality-ci.yml'
- local: '/build/ci/.documentation-ci.yml'
- local: '/build/ci/.security-and-compliance-ci.yml'
File moved
File moved
File moved
code-quality-master:
image: golangci/golangci-lint:latest-alpine
stage: test
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
script:
# writes golangci-lint output to gl-code-quality-report.json
- golangci-lint run --config build/ci/.golangci-config/.golangci-master.yml --out-format code-climate | tee gl-code-quality-report.json
artifacts:
reports:
codequality: gl-code-quality-report.json
paths:
- gl-code-quality-report.json
code-quality:
image: golangci/golangci-lint:latest-alpine
stage: test
allow_failure: true
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != $CI_DEFAULT_BRANCH
script:
# writes golangci-lint output to gl-code-quality-report.json
- golangci-lint run --config build/ci/.golangci-config/.golangci.yml --out-format code-climate | tee gl-code-quality-report.json
artifacts:
reports:
codequality: gl-code-quality-report.json
paths:
- gl-code-quality-report.json
documentation:pdf:
before_script:
- pwd
image:
name: pandoc/latex
entrypoint:
- ''
stage: documentation
rules:
- changes:
- documentation/design/*.md
script:
- cd documentation/design
- pandoc --filter pandoc-citeproc --bibliography=bibliography.bib --csl=acm-sig-proceedings.csl
--variable papersize=a4paper -s *.md -o documentation.pdf
artifacts:
paths:
- documentation/design/documentation.pdf
.mdbook_common: &rust
before_script:
- cargo install mdbook
image:
name: rust:latest
stage: documentation
script:
- mdbook build documentation --dest-dir public
cache:
paths:
- /root/.cargo/
documentation:static:
rules:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
artifacts:
paths:
- documentation/public
expire_in: 1 week
<<: *rust
documentation:test:
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
<<: *rust
File moved
golangci-lint run\
--config .ci/.golangci-master.yml\
--out-format code-climate |\
jq -r '.[] | "\(.location.path):\(.location.lines.begin) \(.description)"'
\ No newline at end of file
jq -r '.[] | "\(.location.path):\(.location.lines.begin) \(.description)"'
sast:
variables:
SAST_ANALYZER_IMAGE_TAG: '2'
SAST_EXCLUDED_PATHS: spec, test, tests, tmp
SEARCH_MAX_DEPTH: '4'
include:
- template: Security/SAST.gitlab-ci.yml
- template: Dependency-Scanning.gitlab-ci.yml
- template: Security/License-Scanning.gitlab-ci.yml
package main
import (
pb "code.fbi.h-da.de/cocsn/gosdn/cliInterface"
pb "code.fbi.h-da.de/cocsn/gosdn/api/proto"
"code.fbi.h-da.de/cocsn/gosdn/log"
"context"
"flag"
......
File moved
File moved
#example gosdn.toml
CliSocket = "localhost:55055"
DatabaseSocket = "bolt://141.100.70.170:7687"
ConfigPath = "./gosdn.toml"
\ No newline at end of file
ConfigPath = "./configs/gosdn.toml"
File moved
# goSDN Documentation
- [Introduction](design/01-introduction.md)
- [Related Work](design/02-related-work.md)
- [Theoretical Background](design/03-theoretical-background.md)
- [Conceptual Design](design/04-conceptual-design.md)
- [Implementation](design/05-implementation.md)
\ No newline at end of file
[book]
authors = ["Martin Stiemerling", "Manuel Kieweg", "Malte Bauch"]
language = "en"
multilingual = false
src = "."
[output.html]
git-repository-url = "https://code.fbi.h-da.de/cocsn/gosdn"
git-repository-icon = "fa-gitlab"
site-url = "/public/"
\ No newline at end of file
......@@ -7,9 +7,9 @@
package nucleus
import (
pb "code.fbi.h-da.de/cocsn/gosdn/cliInterface"
pb "code.fbi.h-da.de/cocsn/gosdn/api/proto"
"code.fbi.h-da.de/cocsn/gosdn/log"
"code.fbi.h-da.de/cocsn/gosdn/restconf/client/ciena"
"code.fbi.h-da.de/cocsn/gosdn/sbi/restconf/client/ciena"
"context"
"google.golang.org/grpc"
"net"
......
......@@ -4,7 +4,7 @@ import (
"code.fbi.h-da.de/cocsn/gosdn/database"
"code.fbi.h-da.de/cocsn/gosdn/log"
"code.fbi.h-da.de/cocsn/gosdn/nucleus/interfaces"
"code.fbi.h-da.de/cocsn/gosdn/restconf/client/ciena"
"code.fbi.h-da.de/cocsn/gosdn/sbi/restconf/client/ciena"
"github.com/BurntSushi/toml"
"os"
)
......@@ -74,7 +74,7 @@ func (c *Core) Shutdown() {
func (c *Core) readControllerConfig(configFileController string) error {
if configFileController == "" {
configFileController = "gosdn.toml"
configFileController = "configs/gosdn.toml"
}
if _, err := os.Stat(configFileController); err != nil {
return err
......@@ -93,7 +93,7 @@ func (c *Core) readControllerConfig(configFileController string) error {
func (c *Core) readClientConfig(configFileClient string) error {
if configFileClient == "" {
configFileClient = "clients.toml"
configFileClient = "configs/clients.toml"
}
if _, err := os.Stat(configFileClient); err != nil {
return err
......
......@@ -5,7 +5,7 @@ import (
"code.fbi.h-da.de/cocsn/gosdn/database"
"code.fbi.h-da.de/cocsn/gosdn/log"
"code.fbi.h-da.de/cocsn/gosdn/nucleus/interfaces"
"code.fbi.h-da.de/cocsn/gosdn/restconf/util"
"code.fbi.h-da.de/cocsn/gosdn/sbi/restconf/util"
apiclient "code.fbi.h-da.de/cocsn/swagger/apis/mcp/client"
"crypto/tls"
"github.com/go-openapi/runtime"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment