From 73eae9892942be08de1c8ce28333405611adf342 Mon Sep 17 00:00:00 2001 From: Joakim Olsson Date: Sat, 17 Jan 2026 22:53:46 +0100 Subject: [PATCH] feat: migrate from GitLab CI to Gitea Actions - Update git remote to git.unbound.se - Add Gitea workflows: ci.yaml, pre-commit.yaml, release.yaml, goreleaser.yaml - Delete .gitlab-ci.yml - Update Go module path to gitea.unbound.se/unboundsoftware/schemas - Update all imports to new module path - Update Docker registry to oci.unbound.se - Update .goreleaser.yml for Gitea releases with internal cluster URL - Remove GitLab CI linter from pre-commit config - Use shared release workflow with tag_only for versioning Co-Authored-By: Claude Opus 4.5 --- .dockerignore | 3 +- .gitea/workflows/ci.yaml | 89 ++++++++++++++++++++++++++++++++ .gitea/workflows/goreleaser.yaml | 30 +++++++++++ .gitea/workflows/pre-commit.yaml | 25 +++++++++ .gitea/workflows/release.yaml | 11 ++++ .gitlab-ci.yml | 89 -------------------------------- .goreleaser.yml | 9 ++-- .pre-commit-config.yaml | 9 +--- cache/cache.go | 4 +- cache/cache_test.go | 4 +- cmd/schemactl/schemactl.go | 2 +- cmd/service/service.go | 18 +++---- cmd/service/service_test.go | 6 +-- domain/commands.go | 2 +- domain/commands_test.go | 2 +- go.mod | 2 +- graph/converter.go | 4 +- graph/cosmo.go | 2 +- graph/cosmo_test.go | 2 +- graph/generated/generated.go | 76 +++++++++++++-------------- graph/pubsub.go | 2 +- graph/pubsub_test.go | 2 +- graph/resolver.go | 6 +-- graph/schema.helpers.go | 4 +- graph/schema.resolvers.go | 12 ++--- k8s/deploy.yaml | 2 +- middleware/auth.go | 2 +- middleware/auth_test.go | 2 +- renovate.json | 2 +- 29 files changed, 240 insertions(+), 183 deletions(-) create mode 100644 .gitea/workflows/ci.yaml create mode 100644 .gitea/workflows/goreleaser.yaml create mode 100644 .gitea/workflows/pre-commit.yaml create mode 100644 .gitea/workflows/release.yaml delete mode 100644 .gitlab-ci.yml diff --git a/.dockerignore b/.dockerignore index 626ebaf..5bb86f6 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,6 +1,5 @@ .gitignore -/.gitlab -.gitlab-ci.yml +/.gitea .graphqlconfig /exported /k8s diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml new file mode 100644 index 0000000..bb1d7ef --- /dev/null +++ b/.gitea/workflows/ci.yaml @@ -0,0 +1,89 @@ +name: schemas + +on: + push: + branches: [main] + pull_request: + branches: [main] + workflow_dispatch: + inputs: + deploy_prod: + description: 'Deploy to production' + required: false + default: 'false' + type: boolean + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - uses: actions/setup-go@v6 + with: + go-version: 'stable' + - name: Generate and format check + run: | + go install mvdan.cc/gofumpt@latest + go install golang.org/x/tools/cmd/goimports@latest + go generate ./... + git diff --stat --exit-code + - name: Run tests + run: go test -race -coverprofile=coverage.txt ./... + + vulnerabilities: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - uses: actions/setup-go@v6 + with: + go-version: 'stable' + - name: Check vulnerabilities + run: | + go install golang.org/x/vuln/cmd/govulncheck@latest + govulncheck ./... + + check-release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + with: + fetch-depth: 0 + - uses: actions/setup-go@v6 + with: + go-version: 'stable' + - name: Check goreleaser config + uses: goreleaser/goreleaser-action@v6 + with: + version: '~> v2' + args: check + - name: Test release build + uses: goreleaser/goreleaser-action@v6 + with: + version: '~> v2' + args: release --snapshot --clean + + build: + needs: [check, vulnerabilities, check-release] + runs-on: ubuntu-latest + env: + BUILDTOOLS_CONTENT: ${{ secrets.BUILDTOOLS_CONTENT }} + GITEA_REPOSITORY: ${{ gitea.repository }} + steps: + - uses: actions/checkout@v6 + - uses: buildtool/setup-buildtools-action@v1 + - name: Build and push + run: unset GITEA_TOKEN && build && push + + deploy-prod: + needs: build + if: gitea.ref == 'refs/heads/main' + runs-on: ubuntu-latest + env: + BUILDTOOLS_CONTENT: ${{ secrets.BUILDTOOLS_CONTENT }} + GITEA_REPOSITORY: ${{ gitea.repository }} + environment: prod + steps: + - uses: actions/checkout@v6 + - uses: buildtool/setup-buildtools-action@v1 + - name: Deploy to production + run: deploy prod diff --git a/.gitea/workflows/goreleaser.yaml b/.gitea/workflows/goreleaser.yaml new file mode 100644 index 0000000..f2429a2 --- /dev/null +++ b/.gitea/workflows/goreleaser.yaml @@ -0,0 +1,30 @@ +name: Goreleaser + +on: + push: + tags: + - 'v*' + +env: + RELEASE_TOKEN_FILE: /runner-secrets/release-token + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + with: + fetch-depth: 0 + - uses: actions/setup-go@v6 + with: + go-version: 'stable' + - name: Install goreleaser + uses: goreleaser/goreleaser-action@v6 + with: + version: '~> v2' + install-only: true + - name: Release + run: | + GITEA_TOKEN=$(cat "${RELEASE_TOKEN_FILE}") + export GITEA_TOKEN + goreleaser release --clean diff --git a/.gitea/workflows/pre-commit.yaml b/.gitea/workflows/pre-commit.yaml new file mode 100644 index 0000000..5d34245 --- /dev/null +++ b/.gitea/workflows/pre-commit.yaml @@ -0,0 +1,25 @@ +name: pre-commit +permissions: read-all + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + pre-commit: + runs-on: ubuntu-latest + env: + SKIP: no-commit-to-branch + steps: + - uses: actions/checkout@v6 + - uses: actions/setup-go@v6 + with: + go-version: 'stable' + - uses: actions/setup-python@v6 + with: + python-version: '3.14' + - name: Install goimports + run: go install golang.org/x/tools/cmd/goimports@latest + - uses: pre-commit/action@v3.0.1 diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml new file mode 100644 index 0000000..40874ba --- /dev/null +++ b/.gitea/workflows/release.yaml @@ -0,0 +1,11 @@ +name: Release + +on: + push: + branches: [main] + +jobs: + release: + uses: unboundsoftware/shared-workflows/.gitea/workflows/Release.yml@main + with: + tag_only: true diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index cdf8623..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,89 +0,0 @@ -include: -- template: 'Workflows/MergeRequest-Pipelines.gitlab-ci.yml' -- project: unboundsoftware/ci-templates - file: Defaults.gitlab-ci.yml -- project: unboundsoftware/ci-templates - file: Release.gitlab-ci.yml -- project: unboundsoftware/ci-templates - file: Pre-Commit-Go.gitlab-ci.yml - -stages: -- build -- test -- deploy-prod -- release - -variables: - UNBOUND_RELEASE_TAG_ONLY: true - -.buildtools: - image: buildtool/build-tools:${BUILDTOOLS_VERSION} - -check: - stage: .pre - image: amd64/golang:1.25.6@sha256:9860925875ac68a8fb57416cfc5c1ee267a06226730434af677b9406e8ea6ee6 - script: - - go install mvdan.cc/gofumpt@latest - - go install golang.org/x/tools/cmd/goimports@latest - - go generate ./... - - git diff --stat --exit-code - -build: - extends: .buildtools - stage: build - script: - - build - - curl -Os https://uploader.codecov.io/latest/linux/codecov - - chmod +x codecov - - ./codecov -t ${CODECOV_TOKEN} -R $CI_PROJECT_DIR -C $CI_COMMIT_SHA -r $CI_PROJECT_PATH - - push - -vulnerabilities: - stage: build - image: amd64/golang:1.25.6@sha256:9860925875ac68a8fb57416cfc5c1ee267a06226730434af677b9406e8ea6ee6 - script: - - go install golang.org/x/vuln/cmd/govulncheck@latest - - govulncheck ./... - -deploy-prod: - extends: .buildtools - stage: deploy-prod - before_script: - - echo Deploy to prod - script: - - deploy prod - rules: - - if: $CI_COMMIT_BRANCH == "main" - environment: - name: prod - resource_group: prod - -check_release: - stage: test - image: - name: goreleaser/goreleaser:v2.13.3@sha256:846b7cad015f87712ad4e68d9cd59bfde4e59c9970265f76dd4e3b3b6f41c768 - entrypoint: [ '' ] - variables: - GOTOOLCHAIN: auto - script: | - goreleaser check - goreleaser release --snapshot --clean - -release: - stage: release - needs: - - unbound_release_prepare_release - image: - name: goreleaser/goreleaser:v2.13.3@sha256:846b7cad015f87712ad4e68d9cd59bfde4e59c9970265f76dd4e3b3b6f41c768 - entrypoint: [ '' ] - variables: - # Disable shallow cloning so that goreleaser can diff between tags to - # generate a changelog. - GIT_DEPTH: 0 - GITLAB_TOKEN: $GITLAB_CI_TOKEN - GOTOOLCHAIN: auto - # Only run this release job for tags, not every commit (for example). - rules: - - if: $CI_COMMIT_TAG - script: | - goreleaser release --clean --release-notes=CHANGES.md diff --git a/.goreleaser.yml b/.goreleaser.yml index de39241..4ea27a3 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,6 +1,10 @@ project_name: unbound-schemas version: 2 +gitea_urls: + api: http://gitea-http.gitea.svc.cluster.local:3000/api/v1 + download: https://gitea.unbound.se + env: - CGO_ENABLED=0 @@ -27,11 +31,6 @@ homebrew_casks: name: "Joakim Olsson" email: joakim@unbound.se homepage: "https://schemas.unbound.se/" - hooks: - post: - install: | - # replace foo with the actual binary name - system_command "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "#{staged_path}/schemactl"] archives: - id: unbound-schemas diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b65f6d7..0433be0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,13 +10,6 @@ repos: args: - --allow-multiple-documents - id: check-added-large-files -- repo: https://gitlab.com/devopshq/gitlab-ci-linter - rev: v1.0.6 - hooks: - - id: gitlab-ci-linter - args: - - --project - - unboundsoftware/schemas - repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook rev: v9.24.0 hooks: @@ -30,7 +23,7 @@ repos: - id: go-imports args: - -local - - gitlab.com/unboundsoftware/schemas + - git.unbound.se/unboundsoftware/schemas - repo: https://github.com/lietu/go-pre-commit rev: v1.0.0 hooks: diff --git a/cache/cache.go b/cache/cache.go index 65fa7af..5e0f761 100644 --- a/cache/cache.go +++ b/cache/cache.go @@ -9,8 +9,8 @@ import ( "github.com/sparetimecoders/goamqp" "gitlab.com/unboundsoftware/eventsourced/eventsourced" - "gitlab.com/unboundsoftware/schemas/domain" - "gitlab.com/unboundsoftware/schemas/hash" + "gitea.unbound.se/unboundsoftware/schemas/domain" + "gitea.unbound.se/unboundsoftware/schemas/hash" ) type Cache struct { diff --git a/cache/cache_test.go b/cache/cache_test.go index 872672d..3adbe70 100644 --- a/cache/cache_test.go +++ b/cache/cache_test.go @@ -12,8 +12,8 @@ import ( "github.com/stretchr/testify/require" "gitlab.com/unboundsoftware/eventsourced/eventsourced" - "gitlab.com/unboundsoftware/schemas/domain" - "gitlab.com/unboundsoftware/schemas/hash" + "gitea.unbound.se/unboundsoftware/schemas/domain" + "gitea.unbound.se/unboundsoftware/schemas/hash" ) func TestCache_OrganizationByAPIKey(t *testing.T) { diff --git a/cmd/schemactl/schemactl.go b/cmd/schemactl/schemactl.go index 16a063f..859ac59 100644 --- a/cmd/schemactl/schemactl.go +++ b/cmd/schemactl/schemactl.go @@ -10,7 +10,7 @@ import ( "github.com/alecthomas/kong" "github.com/apex/log" - "gitlab.com/unboundsoftware/schemas/ctl" + "gitea.unbound.se/unboundsoftware/schemas/ctl" ) type Context struct { diff --git a/cmd/service/service.go b/cmd/service/service.go index f6d3249..d190b69 100644 --- a/cmd/service/service.go +++ b/cmd/service/service.go @@ -26,15 +26,15 @@ import ( "gitlab.com/unboundsoftware/eventsourced/eventsourced" "gitlab.com/unboundsoftware/eventsourced/pg" - "gitlab.com/unboundsoftware/schemas/cache" - "gitlab.com/unboundsoftware/schemas/domain" - "gitlab.com/unboundsoftware/schemas/graph" - "gitlab.com/unboundsoftware/schemas/graph/generated" - "gitlab.com/unboundsoftware/schemas/health" - "gitlab.com/unboundsoftware/schemas/logging" - "gitlab.com/unboundsoftware/schemas/middleware" - "gitlab.com/unboundsoftware/schemas/monitoring" - "gitlab.com/unboundsoftware/schemas/store" + "gitea.unbound.se/unboundsoftware/schemas/cache" + "gitea.unbound.se/unboundsoftware/schemas/domain" + "gitea.unbound.se/unboundsoftware/schemas/graph" + "gitea.unbound.se/unboundsoftware/schemas/graph/generated" + "gitea.unbound.se/unboundsoftware/schemas/health" + "gitea.unbound.se/unboundsoftware/schemas/logging" + "gitea.unbound.se/unboundsoftware/schemas/middleware" + "gitea.unbound.se/unboundsoftware/schemas/monitoring" + "gitea.unbound.se/unboundsoftware/schemas/store" ) type CLI struct { diff --git a/cmd/service/service_test.go b/cmd/service/service_test.go index 0bad862..cafb012 100644 --- a/cmd/service/service_test.go +++ b/cmd/service/service_test.go @@ -10,9 +10,9 @@ import ( "github.com/stretchr/testify/require" "gitlab.com/unboundsoftware/eventsourced/eventsourced" - "gitlab.com/unboundsoftware/schemas/domain" - "gitlab.com/unboundsoftware/schemas/hash" - "gitlab.com/unboundsoftware/schemas/middleware" + "gitea.unbound.se/unboundsoftware/schemas/domain" + "gitea.unbound.se/unboundsoftware/schemas/hash" + "gitea.unbound.se/unboundsoftware/schemas/middleware" ) // MockCache is a mock implementation for testing diff --git a/domain/commands.go b/domain/commands.go index 9a42a84..8f06c8d 100644 --- a/domain/commands.go +++ b/domain/commands.go @@ -7,7 +7,7 @@ import ( "gitlab.com/unboundsoftware/eventsourced/eventsourced" - "gitlab.com/unboundsoftware/schemas/hash" + "gitea.unbound.se/unboundsoftware/schemas/hash" ) type AddOrganization struct { diff --git a/domain/commands_test.go b/domain/commands_test.go index db60663..86b2f0f 100644 --- a/domain/commands_test.go +++ b/domain/commands_test.go @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/require" "gitlab.com/unboundsoftware/eventsourced/eventsourced" - "gitlab.com/unboundsoftware/schemas/hash" + "gitea.unbound.se/unboundsoftware/schemas/hash" ) // AddOrganization tests diff --git a/go.mod b/go.mod index bbf9310..f3965c9 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module gitlab.com/unboundsoftware/schemas +module gitea.unbound.se/unboundsoftware/schemas go 1.25 diff --git a/graph/converter.go b/graph/converter.go index 57ae7d2..bbade2a 100644 --- a/graph/converter.go +++ b/graph/converter.go @@ -1,8 +1,8 @@ package graph import ( - "gitlab.com/unboundsoftware/schemas/domain" - "gitlab.com/unboundsoftware/schemas/graph/model" + "gitea.unbound.se/unboundsoftware/schemas/domain" + "gitea.unbound.se/unboundsoftware/schemas/graph/model" ) func ToGqlOrganizations(orgs []domain.Organization) []*model.Organization { diff --git a/graph/cosmo.go b/graph/cosmo.go index ac62fe2..d2e435b 100644 --- a/graph/cosmo.go +++ b/graph/cosmo.go @@ -8,7 +8,7 @@ import ( "gopkg.in/yaml.v3" - "gitlab.com/unboundsoftware/schemas/graph/model" + "gitea.unbound.se/unboundsoftware/schemas/graph/model" ) // CommandExecutor is an interface for executing external commands diff --git a/graph/cosmo_test.go b/graph/cosmo_test.go index f560fbf..bb24ab1 100644 --- a/graph/cosmo_test.go +++ b/graph/cosmo_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/require" "gopkg.in/yaml.v3" - "gitlab.com/unboundsoftware/schemas/graph/model" + "gitea.unbound.se/unboundsoftware/schemas/graph/model" ) // MockCommandExecutor implements CommandExecutor for testing diff --git a/graph/generated/generated.go b/graph/generated/generated.go index 58377bb..a9bc206 100644 --- a/graph/generated/generated.go +++ b/graph/generated/generated.go @@ -17,7 +17,7 @@ import ( gqlparser "github.com/vektah/gqlparser/v2" "github.com/vektah/gqlparser/v2/ast" - "gitlab.com/unboundsoftware/schemas/graph/model" + "gitea.unbound.se/unboundsoftware/schemas/graph/model" ) // region ************************** generated!.gotpl ************************** @@ -695,7 +695,7 @@ func (ec *executionContext) dir_auth_args(ctx context.Context, rawArgs map[strin func (ec *executionContext) field_Mutation_addAPIKey_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := graphql.ProcessArgField(ctx, rawArgs, "input", ec.unmarshalOInputAPIKey2ᚖgitlabᚗcomᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐInputAPIKey) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "input", ec.unmarshalOInputAPIKey2ᚖgiteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐInputAPIKey) if err != nil { return nil, err } @@ -760,7 +760,7 @@ func (ec *executionContext) field_Mutation_removeOrganization_args(ctx context.C func (ec *executionContext) field_Mutation_updateSubGraph_args(ctx context.Context, rawArgs map[string]any) (map[string]any, error) { var err error args := map[string]any{} - arg0, err := graphql.ProcessArgField(ctx, rawArgs, "input", ec.unmarshalNInputSubGraph2gitlabᚗcomᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐInputSubGraph) + arg0, err := graphql.ProcessArgField(ctx, rawArgs, "input", ec.unmarshalNInputSubGraph2giteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐInputSubGraph) if err != nil { return nil, err } @@ -966,7 +966,7 @@ func (ec *executionContext) _APIKey_organization(ctx context.Context, field grap return obj.Organization, nil }, nil, - ec.marshalNOrganization2ᚖgitlabᚗcomᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐOrganization, + ec.marshalNOrganization2ᚖgiteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐOrganization, true, true, ) @@ -1111,7 +1111,7 @@ func (ec *executionContext) _Mutation_addOrganization(ctx context.Context, field next = directive1 return next }, - ec.marshalNOrganization2ᚖgitlabᚗcomᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐOrganization, + ec.marshalNOrganization2ᚖgiteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐOrganization, true, true, ) @@ -1180,7 +1180,7 @@ func (ec *executionContext) _Mutation_addUserToOrganization(ctx context.Context, next = directive1 return next }, - ec.marshalNOrganization2ᚖgitlabᚗcomᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐOrganization, + ec.marshalNOrganization2ᚖgiteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐOrganization, true, true, ) @@ -1249,7 +1249,7 @@ func (ec *executionContext) _Mutation_addAPIKey(ctx context.Context, field graph next = directive1 return next }, - ec.marshalNAPIKey2ᚖgitlabᚗcomᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐAPIKey, + ec.marshalNAPIKey2ᚖgiteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐAPIKey, true, true, ) @@ -1324,7 +1324,7 @@ func (ec *executionContext) _Mutation_removeAPIKey(ctx context.Context, field gr next = directive1 return next }, - ec.marshalNOrganization2ᚖgitlabᚗcomᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐOrganization, + ec.marshalNOrganization2ᚖgiteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐOrganization, true, true, ) @@ -1452,7 +1452,7 @@ func (ec *executionContext) _Mutation_updateSubGraph(ctx context.Context, field next = directive1 return next }, - ec.marshalNSubGraph2ᚖgitlabᚗcomᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐSubGraph, + ec.marshalNSubGraph2ᚖgiteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐSubGraph, true, true, ) @@ -1566,7 +1566,7 @@ func (ec *executionContext) _Organization_users(ctx context.Context, field graph return obj.Users, nil }, nil, - ec.marshalNUser2ᚕᚖgitlabᚗcomᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐUserᚄ, + ec.marshalNUser2ᚕᚖgiteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐUserᚄ, true, true, ) @@ -1599,7 +1599,7 @@ func (ec *executionContext) _Organization_apiKeys(ctx context.Context, field gra return obj.APIKeys, nil }, nil, - ec.marshalNAPIKey2ᚕᚖgitlabᚗcomᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐAPIKeyᚄ, + ec.marshalNAPIKey2ᚕᚖgiteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐAPIKeyᚄ, true, true, ) @@ -1662,7 +1662,7 @@ func (ec *executionContext) _Query_organizations(ctx context.Context, field grap next = directive1 return next }, - ec.marshalNOrganization2ᚕᚖgitlabᚗcomᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐOrganizationᚄ, + ec.marshalNOrganization2ᚕᚖgiteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐOrganizationᚄ, true, true, ) @@ -1719,7 +1719,7 @@ func (ec *executionContext) _Query_allOrganizations(ctx context.Context, field g next = directive1 return next }, - ec.marshalNOrganization2ᚕᚖgitlabᚗcomᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐOrganizationᚄ, + ec.marshalNOrganization2ᚕᚖgiteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐOrganizationᚄ, true, true, ) @@ -1782,7 +1782,7 @@ func (ec *executionContext) _Query_supergraph(ctx context.Context, field graphql next = directive1 return next }, - ec.marshalNSupergraph2gitlabᚗcomᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐSupergraph, + ec.marshalNSupergraph2giteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐSupergraph, true, true, ) @@ -1846,7 +1846,7 @@ func (ec *executionContext) _Query_latestSchema(ctx context.Context, field graph next = directive1 return next }, - ec.marshalNSchemaUpdate2ᚖgitlabᚗcomᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐSchemaUpdate, + ec.marshalNSchemaUpdate2ᚖgiteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐSchemaUpdate, true, true, ) @@ -2062,7 +2062,7 @@ func (ec *executionContext) _SchemaUpdate_subGraphs(ctx context.Context, field g return obj.SubGraphs, nil }, nil, - ec.marshalNSubGraph2ᚕᚖgitlabᚗcomᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐSubGraphᚄ, + ec.marshalNSubGraph2ᚕᚖgiteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐSubGraphᚄ, true, true, ) @@ -2426,7 +2426,7 @@ func (ec *executionContext) _SubGraphs_subGraphs(ctx context.Context, field grap return obj.SubGraphs, nil }, nil, - ec.marshalNSubGraph2ᚕᚖgitlabᚗcomᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐSubGraphᚄ, + ec.marshalNSubGraph2ᚕᚖgiteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐSubGraphᚄ, true, true, ) @@ -2490,7 +2490,7 @@ func (ec *executionContext) _Subscription_schemaUpdates(ctx context.Context, fie next = directive1 return next }, - ec.marshalNSchemaUpdate2ᚖgitlabᚗcomᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐSchemaUpdate, + ec.marshalNSchemaUpdate2ᚖgiteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐSchemaUpdate, true, true, ) @@ -5156,11 +5156,11 @@ func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, o // region ***************************** type.gotpl ***************************** -func (ec *executionContext) marshalNAPIKey2gitlabᚗcomᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐAPIKey(ctx context.Context, sel ast.SelectionSet, v model.APIKey) graphql.Marshaler { +func (ec *executionContext) marshalNAPIKey2giteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐAPIKey(ctx context.Context, sel ast.SelectionSet, v model.APIKey) graphql.Marshaler { return ec._APIKey(ctx, sel, &v) } -func (ec *executionContext) marshalNAPIKey2ᚕᚖgitlabᚗcomᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐAPIKeyᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.APIKey) graphql.Marshaler { +func (ec *executionContext) marshalNAPIKey2ᚕᚖgiteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐAPIKeyᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.APIKey) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -5184,7 +5184,7 @@ func (ec *executionContext) marshalNAPIKey2ᚕᚖgitlabᚗcomᚋunboundsoftware if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNAPIKey2ᚖgitlabᚗcomᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐAPIKey(ctx, sel, v[i]) + ret[i] = ec.marshalNAPIKey2ᚖgiteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐAPIKey(ctx, sel, v[i]) } if isLen1 { f(i) @@ -5204,7 +5204,7 @@ func (ec *executionContext) marshalNAPIKey2ᚕᚖgitlabᚗcomᚋunboundsoftware return ret } -func (ec *executionContext) marshalNAPIKey2ᚖgitlabᚗcomᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐAPIKey(ctx context.Context, sel ast.SelectionSet, v *model.APIKey) graphql.Marshaler { +func (ec *executionContext) marshalNAPIKey2ᚖgiteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐAPIKey(ctx context.Context, sel ast.SelectionSet, v *model.APIKey) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") @@ -5246,7 +5246,7 @@ func (ec *executionContext) marshalNID2string(ctx context.Context, sel ast.Selec return res } -func (ec *executionContext) unmarshalNInputSubGraph2gitlabᚗcomᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐInputSubGraph(ctx context.Context, v any) (model.InputSubGraph, error) { +func (ec *executionContext) unmarshalNInputSubGraph2giteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐInputSubGraph(ctx context.Context, v any) (model.InputSubGraph, error) { res, err := ec.unmarshalInputInputSubGraph(ctx, v) return res, graphql.ErrorOnPath(ctx, err) } @@ -5267,11 +5267,11 @@ func (ec *executionContext) marshalNInt2int(ctx context.Context, sel ast.Selecti return res } -func (ec *executionContext) marshalNOrganization2gitlabᚗcomᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐOrganization(ctx context.Context, sel ast.SelectionSet, v model.Organization) graphql.Marshaler { +func (ec *executionContext) marshalNOrganization2giteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐOrganization(ctx context.Context, sel ast.SelectionSet, v model.Organization) graphql.Marshaler { return ec._Organization(ctx, sel, &v) } -func (ec *executionContext) marshalNOrganization2ᚕᚖgitlabᚗcomᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐOrganizationᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.Organization) graphql.Marshaler { +func (ec *executionContext) marshalNOrganization2ᚕᚖgiteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐOrganizationᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.Organization) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -5295,7 +5295,7 @@ func (ec *executionContext) marshalNOrganization2ᚕᚖgitlabᚗcomᚋunboundsof if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNOrganization2ᚖgitlabᚗcomᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐOrganization(ctx, sel, v[i]) + ret[i] = ec.marshalNOrganization2ᚖgiteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐOrganization(ctx, sel, v[i]) } if isLen1 { f(i) @@ -5315,7 +5315,7 @@ func (ec *executionContext) marshalNOrganization2ᚕᚖgitlabᚗcomᚋunboundsof return ret } -func (ec *executionContext) marshalNOrganization2ᚖgitlabᚗcomᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐOrganization(ctx context.Context, sel ast.SelectionSet, v *model.Organization) graphql.Marshaler { +func (ec *executionContext) marshalNOrganization2ᚖgiteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐOrganization(ctx context.Context, sel ast.SelectionSet, v *model.Organization) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") @@ -5325,11 +5325,11 @@ func (ec *executionContext) marshalNOrganization2ᚖgitlabᚗcomᚋunboundsoftwa return ec._Organization(ctx, sel, v) } -func (ec *executionContext) marshalNSchemaUpdate2gitlabᚗcomᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐSchemaUpdate(ctx context.Context, sel ast.SelectionSet, v model.SchemaUpdate) graphql.Marshaler { +func (ec *executionContext) marshalNSchemaUpdate2giteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐSchemaUpdate(ctx context.Context, sel ast.SelectionSet, v model.SchemaUpdate) graphql.Marshaler { return ec._SchemaUpdate(ctx, sel, &v) } -func (ec *executionContext) marshalNSchemaUpdate2ᚖgitlabᚗcomᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐSchemaUpdate(ctx context.Context, sel ast.SelectionSet, v *model.SchemaUpdate) graphql.Marshaler { +func (ec *executionContext) marshalNSchemaUpdate2ᚖgiteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐSchemaUpdate(ctx context.Context, sel ast.SelectionSet, v *model.SchemaUpdate) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") @@ -5385,11 +5385,11 @@ func (ec *executionContext) marshalNString2ᚕstringᚄ(ctx context.Context, sel return ret } -func (ec *executionContext) marshalNSubGraph2gitlabᚗcomᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐSubGraph(ctx context.Context, sel ast.SelectionSet, v model.SubGraph) graphql.Marshaler { +func (ec *executionContext) marshalNSubGraph2giteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐSubGraph(ctx context.Context, sel ast.SelectionSet, v model.SubGraph) graphql.Marshaler { return ec._SubGraph(ctx, sel, &v) } -func (ec *executionContext) marshalNSubGraph2ᚕᚖgitlabᚗcomᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐSubGraphᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.SubGraph) graphql.Marshaler { +func (ec *executionContext) marshalNSubGraph2ᚕᚖgiteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐSubGraphᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.SubGraph) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -5413,7 +5413,7 @@ func (ec *executionContext) marshalNSubGraph2ᚕᚖgitlabᚗcomᚋunboundsoftwar if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNSubGraph2ᚖgitlabᚗcomᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐSubGraph(ctx, sel, v[i]) + ret[i] = ec.marshalNSubGraph2ᚖgiteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐSubGraph(ctx, sel, v[i]) } if isLen1 { f(i) @@ -5433,7 +5433,7 @@ func (ec *executionContext) marshalNSubGraph2ᚕᚖgitlabᚗcomᚋunboundsoftwar return ret } -func (ec *executionContext) marshalNSubGraph2ᚖgitlabᚗcomᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐSubGraph(ctx context.Context, sel ast.SelectionSet, v *model.SubGraph) graphql.Marshaler { +func (ec *executionContext) marshalNSubGraph2ᚖgiteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐSubGraph(ctx context.Context, sel ast.SelectionSet, v *model.SubGraph) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") @@ -5443,7 +5443,7 @@ func (ec *executionContext) marshalNSubGraph2ᚖgitlabᚗcomᚋunboundsoftware return ec._SubGraph(ctx, sel, v) } -func (ec *executionContext) marshalNSupergraph2gitlabᚗcomᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐSupergraph(ctx context.Context, sel ast.SelectionSet, v model.Supergraph) graphql.Marshaler { +func (ec *executionContext) marshalNSupergraph2giteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐSupergraph(ctx context.Context, sel ast.SelectionSet, v model.Supergraph) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") @@ -5469,7 +5469,7 @@ func (ec *executionContext) marshalNTime2timeᚐTime(ctx context.Context, sel as return res } -func (ec *executionContext) marshalNUser2ᚕᚖgitlabᚗcomᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐUserᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.User) graphql.Marshaler { +func (ec *executionContext) marshalNUser2ᚕᚖgiteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐUserᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.User) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup isLen1 := len(v) == 1 @@ -5493,7 +5493,7 @@ func (ec *executionContext) marshalNUser2ᚕᚖgitlabᚗcomᚋunboundsoftwareᚋ if !isLen1 { defer wg.Done() } - ret[i] = ec.marshalNUser2ᚖgitlabᚗcomᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐUser(ctx, sel, v[i]) + ret[i] = ec.marshalNUser2ᚖgiteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐUser(ctx, sel, v[i]) } if isLen1 { f(i) @@ -5513,7 +5513,7 @@ func (ec *executionContext) marshalNUser2ᚕᚖgitlabᚗcomᚋunboundsoftwareᚋ return ret } -func (ec *executionContext) marshalNUser2ᚖgitlabᚗcomᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐUser(ctx context.Context, sel ast.SelectionSet, v *model.User) graphql.Marshaler { +func (ec *executionContext) marshalNUser2ᚖgiteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐUser(ctx context.Context, sel ast.SelectionSet, v *model.User) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { graphql.AddErrorf(ctx, "the requested element is null which the schema does not allow") @@ -5806,7 +5806,7 @@ func (ec *executionContext) marshalOBoolean2ᚖbool(ctx context.Context, sel ast return res } -func (ec *executionContext) unmarshalOInputAPIKey2ᚖgitlabᚗcomᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐInputAPIKey(ctx context.Context, v any) (*model.InputAPIKey, error) { +func (ec *executionContext) unmarshalOInputAPIKey2ᚖgiteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐInputAPIKey(ctx context.Context, v any) (*model.InputAPIKey, error) { if v == nil { return nil, nil } diff --git a/graph/pubsub.go b/graph/pubsub.go index c142574..6cc5eaf 100644 --- a/graph/pubsub.go +++ b/graph/pubsub.go @@ -3,7 +3,7 @@ package graph import ( "sync" - "gitlab.com/unboundsoftware/schemas/graph/model" + "gitea.unbound.se/unboundsoftware/schemas/graph/model" ) // PubSub handles publishing schema updates to subscribers diff --git a/graph/pubsub_test.go b/graph/pubsub_test.go index 0368835..8e85382 100644 --- a/graph/pubsub_test.go +++ b/graph/pubsub_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gitlab.com/unboundsoftware/schemas/graph/model" + "gitea.unbound.se/unboundsoftware/schemas/graph/model" ) func TestPubSub_SubscribeAndPublish(t *testing.T) { diff --git a/graph/resolver.go b/graph/resolver.go index 7b30ade..b8f74e1 100644 --- a/graph/resolver.go +++ b/graph/resolver.go @@ -7,13 +7,13 @@ import ( "gitlab.com/unboundsoftware/eventsourced/eventsourced" - "gitlab.com/unboundsoftware/schemas/cache" - "gitlab.com/unboundsoftware/schemas/middleware" + "gitea.unbound.se/unboundsoftware/schemas/cache" + "gitea.unbound.se/unboundsoftware/schemas/middleware" ) //go:generate go run github.com/99designs/gqlgen //go:generate gofumpt -w . -//go:generate goimports -w -local gitlab.com/unboundsoftware/schemas . +//go:generate goimports -w -local gitea.unbound.se/unboundsoftware/schemas . // This file will not be regenerated automatically. // diff --git a/graph/schema.helpers.go b/graph/schema.helpers.go index 6dc24d2..3799c27 100644 --- a/graph/schema.helpers.go +++ b/graph/schema.helpers.go @@ -5,8 +5,8 @@ import ( "gitlab.com/unboundsoftware/eventsourced/eventsourced" - "gitlab.com/unboundsoftware/schemas/domain" - "gitlab.com/unboundsoftware/schemas/graph/model" + "gitea.unbound.se/unboundsoftware/schemas/domain" + "gitea.unbound.se/unboundsoftware/schemas/graph/model" ) func (r *Resolver) fetchSubGraph(ctx context.Context, subGraphId string) (*domain.SubGraph, error) { diff --git a/graph/schema.resolvers.go b/graph/schema.resolvers.go index 276e877..84bfb76 100644 --- a/graph/schema.resolvers.go +++ b/graph/schema.resolvers.go @@ -12,12 +12,12 @@ import ( "gitlab.com/unboundsoftware/eventsourced/eventsourced" - "gitlab.com/unboundsoftware/schemas/domain" - "gitlab.com/unboundsoftware/schemas/graph/generated" - "gitlab.com/unboundsoftware/schemas/graph/model" - "gitlab.com/unboundsoftware/schemas/middleware" - "gitlab.com/unboundsoftware/schemas/rand" - "gitlab.com/unboundsoftware/schemas/sdlmerge" + "gitea.unbound.se/unboundsoftware/schemas/domain" + "gitea.unbound.se/unboundsoftware/schemas/graph/generated" + "gitea.unbound.se/unboundsoftware/schemas/graph/model" + "gitea.unbound.se/unboundsoftware/schemas/middleware" + "gitea.unbound.se/unboundsoftware/schemas/rand" + "gitea.unbound.se/unboundsoftware/schemas/sdlmerge" ) // AddOrganization is the resolver for the addOrganization field. diff --git a/k8s/deploy.yaml b/k8s/deploy.yaml index 62b196f..7c55136 100644 --- a/k8s/deploy.yaml +++ b/k8s/deploy.yaml @@ -61,7 +61,7 @@ spec: timeoutSeconds: 5 failureThreshold: 3 imagePullPolicy: IfNotPresent - image: registry.gitlab.com/unboundsoftware/schemas:${COMMIT} + image: oci.unbound.se/unboundsoftware/schemas:${COMMIT} ports: - name: api containerPort: 8080 diff --git a/middleware/auth.go b/middleware/auth.go index bac65ec..b31dba2 100644 --- a/middleware/auth.go +++ b/middleware/auth.go @@ -8,7 +8,7 @@ import ( "github.com/99designs/gqlgen/graphql" "github.com/golang-jwt/jwt/v5" - "gitlab.com/unboundsoftware/schemas/domain" + "gitea.unbound.se/unboundsoftware/schemas/domain" ) const ( diff --git a/middleware/auth_test.go b/middleware/auth_test.go index 7f2e3ee..124459f 100644 --- a/middleware/auth_test.go +++ b/middleware/auth_test.go @@ -14,7 +14,7 @@ import ( "github.com/stretchr/testify/require" "gitlab.com/unboundsoftware/eventsourced/eventsourced" - "gitlab.com/unboundsoftware/schemas/domain" + "gitea.unbound.se/unboundsoftware/schemas/domain" ) // MockCache is a mock implementation of the Cache interface diff --git a/renovate.json b/renovate.json index 46025ab..acd967b 100644 --- a/renovate.json +++ b/renovate.json @@ -9,7 +9,7 @@ "kubernetes" ], "matchPackageNames": [ - "registry.gitlab.com/unboundsoftware/schemas" + "oci.unbound.se/unboundsoftware/schemas" ], "enabled": false },