diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 928770b7..80ef17ad 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,12 +1,10 @@ # SPDX-License-Identifier: Apache-2.0 # Copyright 2023 Canonical Ltd. # Copyright 2024-present Intel Corporation - # Timeline for each ecosystem is intentionally staggered to spread # Dependabot PRs over the week. version: 2 updates: - - package-ecosystem: "docker" directory: "/" schedule: @@ -14,7 +12,6 @@ updates: day: "sunday" time: "21:00" timezone: "America/Los_Angeles" - - package-ecosystem: "gomod" directory: "/" schedule: @@ -26,7 +23,6 @@ updates: omec-project: patterns: - "github.com/omec-project/*" - - package-ecosystem: github-actions directory: / schedule: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 91508bca..c27679e6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,7 +2,6 @@ # Copyright 2023 Canonical Ltd. # Copyright 2024 Intel Corporation name: CI Pipeline - on: pull_request: branches: @@ -10,10 +9,8 @@ on: push: branches: - main - permissions: contents: read - jobs: build: permissions: @@ -25,7 +22,6 @@ jobs: uses: omec-project/.github/.github/workflows/build.yml@c6f69e74f8ee9034dcc237ccbd719de59526aee5 # v0.0.30 with: branch_name: ${{ github.ref }} - build-ui: permissions: contents: read @@ -36,7 +32,6 @@ jobs: uses: omec-project/.github/.github/workflows/webconsole-build-ui.yml@c6f69e74f8ee9034dcc237ccbd719de59526aee5 # v0.0.30 with: branch_name: ${{ github.ref }} - docker-build: permissions: contents: read @@ -46,7 +41,6 @@ jobs: uses: omec-project/.github/.github/workflows/docker-build.yml@c6f69e74f8ee9034dcc237ccbd719de59526aee5 # v0.0.30 with: branch_name: ${{ github.ref }} - static-analysis: permissions: contents: read @@ -57,7 +51,6 @@ jobs: uses: omec-project/.github/.github/workflows/static-analysis.yml@c6f69e74f8ee9034dcc237ccbd719de59526aee5 # v0.0.30 with: branch_name: ${{ github.ref }} - lint: permissions: contents: read @@ -68,7 +61,6 @@ jobs: with: golangci_lint_version: 'v2.11.3' branch_name: ${{ github.ref }} - hadolint: permissions: contents: read @@ -78,7 +70,6 @@ jobs: uses: omec-project/.github/.github/workflows/hadolint.yml@c6f69e74f8ee9034dcc237ccbd719de59526aee5 # v0.0.30 with: branch_name: ${{ github.ref }} - license-check: permissions: contents: read @@ -87,7 +78,6 @@ jobs: uses: omec-project/.github/.github/workflows/license-check.yml@c6f69e74f8ee9034dcc237ccbd719de59526aee5 # v0.0.30 with: branch_name: ${{ github.ref }} - fossa-scan: permissions: contents: read @@ -97,7 +87,6 @@ jobs: uses: omec-project/.github/.github/workflows/fossa-scan.yml@c6f69e74f8ee9034dcc237ccbd719de59526aee5 # v0.0.30 with: branch_name: ${{ github.ref }} - unit-tests: permissions: contents: read @@ -107,7 +96,6 @@ jobs: uses: omec-project/.github/.github/workflows/unit-test.yml@c6f69e74f8ee9034dcc237ccbd719de59526aee5 # v0.0.30 with: branch_name: ${{ github.ref }} - analysis: if: github.repository_owner == 'omec-project' permissions: @@ -133,7 +121,6 @@ jobs: uses: omec-project/.github/.github/workflows/scorecard-analysis.yml@c6f69e74f8ee9034dcc237ccbd719de59526aee5 # v0.0.30 with: branch_name: ${{ github.ref }} - e2e-tests: if: github.event_name == 'pull_request' permissions: diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 8c1e5d10..49696d4b 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -2,17 +2,14 @@ # Copyright 2024-present Intel Corporation # Copyright 2025 Canonical Ltd. name: Release Pipeline - on: push: branches: - main paths: - "VERSION" - permissions: contents: read - jobs: tag-github: permissions: @@ -21,7 +18,6 @@ jobs: id-token: write uses: omec-project/.github/.github/workflows/tag-github.yml@c6f69e74f8ee9034dcc237ccbd719de59526aee5 # v0.0.30 secrets: inherit - release-image: needs: tag-github permissions: @@ -35,7 +31,6 @@ jobs: changed: ${{ needs.tag-github.outputs.changed }} version: ${{ needs.tag-github.outputs.version }} secrets: inherit - update-version: needs: tag-github permissions: @@ -48,7 +43,6 @@ jobs: changed: ${{ needs.tag-github.outputs.changed }} version: ${{ needs.tag-github.outputs.version }} secrets: inherit - sbom-source: needs: tag-github permissions: @@ -61,7 +55,6 @@ jobs: artifact_name: ${{ github.event.repository.name }}-${{ needs.tag-github.outputs.version }}.spdx.json sbom_format: spdx-json path: . - grype-scan: needs: [tag-github, sbom-source] permissions: diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index fd90cd5b..7a2f02cc 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -4,12 +4,10 @@ on: schedule: - cron: "0 0 * * *" - permissions: issues: write pull-requests: write contents: read - jobs: stale: permissions: diff --git a/.golangci.yml b/.golangci.yml index bcfaea80..358a1841 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,6 +1,5 @@ # SPDX-FileCopyrightText: 2025 Intel Corporation # SPDX-License-Identifier: Apache-2.0 - version: "2" run: concurrency: 4 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 37cbb5d7..5ae4e3ba 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,46 +1,49 @@ # SPDX-FileCopyrightText: 2025 Intel Corporation # SPDX-License-Identifier: Apache-2.0 - repos: -- repo: https://github.com/gitleaks/gitleaks - rev: v8.30.1 - hooks: - - id: gitleaks -- repo: local - hooks: - - id: gci - name: gci - entry: gci write - language: golang - types: [go] - additional_dependencies: - - github.com/daixiang0/gci@v0.14.0 - - id: staticcheck - name: staticcheck - entry: staticcheck ./... - language: golang - types: [go] - additional_dependencies: - - honnef.co/go/tools/cmd/staticcheck@v0.7.0 - pass_filenames: false - - id: go-test-race - name: go test -race - entry: go test -race ./... -count=1 - language: system - types: [go] - pass_filenames: false -- repo: https://github.com/golangci/golangci-lint - rev: v2.11.3 - hooks: - - id: golangci-lint-full -- repo: https://github.com/pre-commit/pre-commit-hooks - rev: v6.0.0 - hooks: - - id: end-of-file-fixer - - id: trailing-whitespace - args: - - --markdown-linebreak-ext=md -- repo: https://codeberg.org/fsfe/reuse-tool - rev: v6.2.0 - hooks: - - id: reuse + - repo: https://github.com/gitleaks/gitleaks + rev: v8.30.1 + hooks: + - id: gitleaks + - repo: local + hooks: + - id: gci + name: gci + entry: gci write + language: golang + types: [go] + additional_dependencies: + - github.com/daixiang0/gci@v0.14.0 + - id: staticcheck + name: staticcheck + entry: staticcheck ./... + language: golang + types: [go] + additional_dependencies: + - honnef.co/go/tools/cmd/staticcheck@v0.7.0 + pass_filenames: false + - id: go-test-race + name: go test -race + entry: go test -race ./... -count=1 + language: system + types: [go] + pass_filenames: false + - repo: https://github.com/golangci/golangci-lint + rev: v2.11.3 + hooks: + - id: golangci-lint-full + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v6.0.0 + hooks: + - id: end-of-file-fixer + - id: trailing-whitespace + args: + - --markdown-linebreak-ext=md + - repo: https://github.com/google/yamlfmt + rev: v0.21.0 + hooks: + - id: yamlfmt + - repo: https://codeberg.org/fsfe/reuse-tool + rev: v6.2.0 + hooks: + - id: reuse diff --git a/configapi/api/configapi.yaml b/configapi/api/configapi.yaml index c4386bba..c3c3fe00 100644 --- a/configapi/api/configapi.yaml +++ b/configapi/api/configapi.yaml @@ -2,7 +2,6 @@ # # SPDX-License-Identifier: Apache-2.0 # - openapi: 3.0.0 info: contact: @@ -12,19 +11,19 @@ info: title: Connectivity Service Configuration version: 1.0.0 servers: -- url: http://connectivity-config:8080 + - url: http://connectivity-config:8080 paths: /device-group/{group-name}: description: Add IMSIs to the group patch: parameters: - - explode: false - in: path - name: group-name - required: true - schema: - type: string - style: simple + - explode: false + in: path + name: group-name + required: true + schema: + type: string + style: simple requestBody: content: application/json: @@ -35,13 +34,13 @@ paths: description: Additional IMSIs in the existing group post: parameters: - - explode: false - in: path - name: group-name - required: true - schema: - type: string - style: simple + - explode: false + in: path + name: group-name + required: true + schema: + type: string + style: simple requestBody: content: application/json: @@ -54,14 +53,14 @@ paths: delete: description: delete network slice information parameters: - - explode: false - in: path - name: slice-name - required: true - schema: - example: slice1 - type: string - style: simple + - explode: false + in: path + name: slice-name + required: true + schema: + example: slice1 + type: string + style: simple responses: "200": description: successfully created network slice @@ -69,14 +68,14 @@ paths: post: description: Configure network slice parameters: - - explode: false - in: path - name: slice-name - required: true - schema: - example: slice1 - type: string - style: simple + - explode: false + in: path + name: slice-name + required: true + schema: + example: slice1 + type: string + style: simple requestBody: content: application/json: @@ -88,14 +87,14 @@ paths: put: description: Update network slice information parameters: - - explode: false - in: path - name: slice-name - required: true - schema: - example: slice1 - type: string - style: simple + - explode: false + in: path + name: slice-name + required: true + schema: + example: slice1 + type: string + style: simple requestBody: content: application/json: @@ -200,9 +199,9 @@ components: traffic-class: description: QCI/QFI for the traffic enum: - - platinum - - gold - - silver + - platinum + - gold + - silver type: string type: object type: object @@ -230,9 +229,9 @@ components: traffic-class: description: QCI/QFI for the traffic enum: - - platinum - - gold - - silver + - platinum + - gold + - silver type: string type: object slice_site_info_plmn: