Skip to content

Commit

Permalink
feat: Switch to monorepo (#21)
Browse files Browse the repository at this point in the history
* feat: first commit

* feat: import wallet, fctl sdk and some stuff

* fix: make hooks enabled only if changes in the code

* feat: refine scripts

* chore: disable pre commit hooks

* chore: update payments

* feat: make all hooks pass

this has required modifications on almost each project

* git subrepo push services/webhooks

subrepo:
  subdir:   "services/webhooks"
  merged:   "ca5d19c5"
upstream:
  origin:   "webhooks"
  branch:   "main"
  commit:   "ca5d19c5"
git-subrepo:
  version:  "0.4.5"
  origin:   "ssh://git@github.com/ingydotnet/git-subrepo"
  commit:   "dbb99be"

* chore: push backport

* chore: backports

* chore: backports

* chore: backports

* chore: backports

* chore: backports

* chore: remove test code

* chore: backports

* fix: branch

* git subrepo push --branch=chore/backports --force services/fctl

subrepo:
  subdir:   "services/fctl"
  merged:   "0d98fdaa"
upstream:
  origin:   "fctl"
  branch:   "chore/backports"
  commit:   "0d98fdaa"
git-subrepo:
  version:  "0.4.5"
  origin:   "ssh://git@github.com/ingydotnet/git-subrepo"
  commit:   "dbb99be"

* feat(fctl): fix argument

* git subrepo push --branch=chore/backports --force services/fctl

subrepo:
  subdir:   "services/fctl"
  merged:   "5a7a41f9"
upstream:
  origin:   "fctl"
  branch:   "chore/backports"
  commit:   "5a7a41f9"
git-subrepo:
  version:  "0.4.5"
  origin:   "ssh://git@github.com/ingydotnet/git-subrepo"
  commit:   "dbb99be"

* feat: remove ledger

* git subrepo clone ledger services/ledger

subrepo:
  subdir:   "services/ledger"
  merged:   "ad57138a"
upstream:
  origin:   "ledger"
  branch:   "main"
  commit:   "ad57138a"
git-subrepo:
  version:  "0.4.5"
  origin:   "ssh://git@github.com/ingydotnet/git-subrepo"
  commit:   "dbb99be"

* feat(auth): fix dependencies

* chore: backports

* feat: remove ledger

* feat: add ledger

* feat: remove auth

* feat: fetch auth main

* feat: remove search

* feat: add search

* feat: remove submodules

* feat: reomve payments

* feat: add payments from main

* feat: add 'yarn install' before generate sdk

* feat: Update CI

* feat: remove fctl

* feat: add fctl

* chore: go mod tidy

* git subrepo push services/fctl

subrepo:
  subdir:   "services/fctl"
  merged:   "5d4c919"
upstream:
  origin:   "fctl"
  branch:   "main"
  commit:   "5d4c919"
git-subrepo:
  version:  "0.4.5"
  origin:   "ssh://git@github.com/ingydotnet/git-subrepo"
  commit:   "dbb99be"

* feat: add go-project-template

* feat: update go-project-template under new go libs

* git subrepo push libs/go-project-template

subrepo:
  subdir:   "libs/go-project-template"
  merged:   "40e49f0"
upstream:
  origin:   "go-project-template"
  branch:   "main"
  commit:   "40e49f0"
git-subrepo:
  version:  "0.4.5"
  origin:   "ssh://git@github.com/ingydotnet/git-subrepo"
  commit:   "dbb99be"

* fix: sdk hook

* feat: Update CI

* feat: Update CI

* feat: Update CI

* feat: Update CI

* feat: Update

* feat: CI Update

* feat: Clear CI

* feat: CI clear

* fee

* feat: CI

* feat: Update CI

* feat: Update CI

* feat: Desactivate release mode

* feat: Update CI

* feat: Update CI

* ci: upgrade

* feat: update go-libs

* feat(orchetration): init project

* git subrepo push libs/go-project-template

subrepo:
  subdir:   "libs/go-project-template"
  merged:   "cbead19"
upstream:
  origin:   "go-project-template"
  branch:   "main"
  commit:   "cbead19"
git-subrepo:
  version:  "0.4.5"
  origin:   "ssh://git@github.com/ingydotnet/git-subrepo"
  commit:   "dbb99be"

* fix: commitlint

* feat: little clean & fix pre-commit

* fix: for pre-commit

* ci: Improvement

* ci: Improvement

* ci: Improvement

* ci: Improvement

* ci: Improvement

* chore: add machine

* ci: Improvement

* ci: Improvement

* ci: Improvement

* ci: Improvement

* feat: Add all SDK

* ci: Improvement

* feat: Update taskfile & CI

* feat: Update taskfile & CI

* feat: List foliders in find

* feat: List foliders in find

* feat: List foliders in find

* feat: List foliders in find

* feat: List foliders in find

* feat: List foliders in find

* feat: Add GoBuild

* feat: Add GoBuild

* feat: Add GoBuild

* feat: Add GoBuild

* feat: Add GoBuild

* feat: Add GoBuild

* feat: Add GoBuild

* feat: Add GoBuild

* feat: Add GoBuild

* feat: Add GoBuild

* chore: Empty-Commit

* feat: Add GoBuild

* feat: Add GoBuild

* feat: Add GoBuild

* feat: Add GoBuild

* feat: Add GoBuild

* feat: Add GoBuild

* feat: Add GoBuild

* feat: Add GoBuild

* feat: Add GoBuild

* feat: Add GoBuild

* feat: Add GoBuild

* feat: Add GoBuild

* feat: Add GoBuild

* feat: Add GoBuild

* feat: big bang

* feat: big bang

* feat: big bang

* ci: Update

* ci: Add release

* ci: Update .goreleaser.yml

* feat(orchestration): first working version

* feat(operator): simplify

* feat(operator): factorize ingress, services, auth clients...

* feat(operator): remove resources

* fix: auth configuration causing pods reboot

* feat: Update gitpod configuration

* feat(gitpod): Add Garden

* feat(gitpod): Add rsync

* feat(gitpod): Add packages

* feat(gitpod): Add packages

* feat(gitpod): Optimize configuration

* feat(gitpod): restore default config

* feat(gitpod): Add port 80 & 443 on qemu

* feat(gitpod): Ignore .garden fodler

* feat(gitpod): Upgrade qemu

* feat: add 'stack' label on created objects

* feat: add taskfile operator to root taskfile

* feat(operator): add lint to taskfile

* feat(operator): add build.Dockerfile

* fix(operator): fix build.Dockerfile

* fix(operator): restore service names

* fix(operator): ingresses

* fix(operator): fix middlewares

* fix(operator): duplicate middlewares entries

* fix(operator): control ingress path prefix

* feat(operator): disable ingress on service if not specified in configuration

* fix(fctl): membership uri

* fix(orchestration): application/json content-type

* feat: wip

* fix: orchestration run ids

* fix: catch panic on workflow executions

Co-authored-by: Ragot Geoffrey <geoffrey.ragot@gmail.com>
Co-authored-by: Antoine Gelloz <antoine.gelloz@me.com>
  • Loading branch information
3 people committed Jan 25, 2023
0 parents commit 106f396
Show file tree
Hide file tree
Showing 158 changed files with 13,546 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

**Expected behavior**
A clear and concise description of what you expected to happen.

**Logs**
If applicable, add logs to help explain your problem.

**Environment (please complete the following information):**
- OS: [e.g. ubuntu 20.04]
- Numary Version [e.g. 1.0.0-beta.4]

**Additional context**
Add any other context about the problem here.
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement, rfc
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Summary**

**Solution proposal**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
33 changes: 33 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: "CodeQL"

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '35 21 * * 5'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'go' ]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
92 changes: 92 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
on:
push:
branches:
- 'main'
- 'features/**'
- 'feature/**'
- 'feat/**'
- 'fix/**'
- 'hotfix/**'
pull_request:
types: [ assigned, opened, synchronize, reopened ]
release:
types: [ prereleased, released ]

name: Main
jobs:
pr-style:
if: github.event_name == 'pull_request'
uses: numary/gh-workflows/.github/workflows/pr-style.yml@main

lint:
uses: numary/gh-workflows/.github/workflows/golang-lint.yml@main

test:
uses: numary/gh-workflows/.github/workflows/golang-test.yml@main

goreleaser-build:
if: github.event_name != 'release'
uses: numary/gh-workflows/.github/workflows/goreleaser-build.yml@main
needs:
- lint
- test

goreleaser-release:
if: github.event_name == 'release'
uses: numary/gh-workflows/.github/workflows/goreleaser-release.yml@main
secrets:
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
NUMARY_GITHUB_TOKEN: ${{ secrets.NUMARY_GITHUB_TOKEN }}
needs:
- lint
- test

docker-build-push:
runs-on: ubuntu-latest
needs:
- lint
- test
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
cache: true
- run: go mod vendor
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
with:
registry: ghcr.io
username: "NumaryBot"
password: ${{ secrets.NUMARY_GITHUB_TOKEN }}
- if: github.event.action == 'released'
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/formancehq/payments:latest,ghcr.io/formancehq/payments:${{ github.event.release.tag_name }}
build-args: |
APP_SHA=${{ github.sha }}
VERSION=${{ github.event.release.tag_name }}
- if: github.event.action == 'prereleased'
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/formancehq/payments:${{ github.event.release.tag_name }}
build-args: |
APP_SHA=${{ github.sha }}
VERSION=${{ github.event.release.tag_name }}
- if: github.event.action != 'released' || github.event.action != 'prereleased'
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/formancehq/payments:${{ github.sha }}
build-args: |
APP_SHA=${{ github.sha }}
VERSION=develop
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.DS_Store
.idea
vendor
.cloud/ressources/.terraform
.cloud/ressources/.terraform.lock.hcl
/.cloud/helm/charts/
coverage.out
dist/
.env
12 changes: 12 additions & 0 deletions .gitrepo
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
; DO NOT EDIT (unless you know what you are doing)
;
; This subdirectory is a git "subrepo", and this file is maintained by the
; git-subrepo command. See https://github.com/ingydotnet/git-subrepo#readme
;
[subrepo]
remote = payments
branch = main
commit = ae1fa5ec4508bc3a7603bd15953228b6a6152761
parent = e11fe64274a7326f57cf409cd542ce7a08b05233
method = merge
cmdver = 0.4.5
112 changes: 112 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
linters-settings:
dupl:
threshold: 30
funlen:
lines: 150
statements: 30
goconst:
min-len: 2
min-occurrences: 2
gocritic:
enabled-tags:
- diagnostic
- experimental
- opinionated
- performance
- style
cyclop:
max-complexity: 30
gocyclo:
min-complexity: 30
goimports:
local-prefixes: github.com/formancehq/payments
govet:
check-shadowing: true
lll:
line-length: 120
nakedret:
max-func-lines: 0
tagliatelle:
case:
rules:
json: goCamel
yaml: goCamel
bson: goCamel
gomnd:
ignored-numbers:
- '2'
- '5'
- '10'
- '100'
- '64'
- '256'
- '512'
varnamelen:
ignore-names:
- id
- i
- db
- m
- r
- c
- fn
- w
- h
- to
- fs

linters:
enable-all: true
disable:
- deadcode # deprecated
- maligned #deprecated
- golint # deprecated
- ifshort # deprecated
- structcheck # deprecated
- varcheck # deprecated
- interfacer # deprecated
- scopelint #deprecated
- nosnakecase # deprecated
- rowserrcheck # disabled due to generics
- sqlclosecheck # disabled due to generics
- structcheck # disabled due to generics
- wastedassign # disabled due to generics
- gci # conflicts with gofumpt
- goimports # conflicts with gofumpt
- testpackage # Disabled by design
- wrapcheck # Disabled by design
- exhaustivestruct # Disabled by design
- exhaustruct # Disabled by design
- exhaustive # Disabled by design
- dupl # Disabled by design
- godox # Disabled by design
- lll # Disabled by design
- funlen # Disabled by design
- misspell # Disabled by design
- ireturn # Disabled by design
- wsl # Disabled by design
- gocritic # TODO: FIX. Seems to have issues with generics
- gocognit # TODO: FIX
- goerr113 # TODO: FIX
- noctx # TODO: FIX
- contextcheck # TODO: FIX
- containedctx # TODO: FIX

issues:
exclude-rules:
- path: _test\.go
linters:
- goerr113
- varnamelen

- path: internal/app/migrations/
linters:
- gochecknoinits
- varnamelen

- linters:
- nolintlint
text: "should be written without leading space"

run:
timeout: 5m
Loading

0 comments on commit 106f396

Please sign in to comment.