Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ CONTRIBUTING.md
CHANGELOG.md
SECURITY.md
CODE_OF_CONDUCT.md
docs/
uploads/
data/
vendor/
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: CI

on:
push:
branches: [ main, develop ]
branches: [ main ]
pull_request:
branches: [ main, develop ]
branches: [ main ]

jobs:
build-and-test:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/github-event-notification.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ on:

jobs:
notify:
uses: berrybytes/actions/.github/workflows/notifications.yaml@main
uses: BerryBytes/workflows/.github/workflows/notifications.yaml@main
secrets:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }}
GOOGLE_CHAT_WEBHOOK: ${{ secrets.GOOGLE_CHAT_WEBHOOK }}
GOOGLE_CHAT_WEBHOOK: ${{ secrets.GOOGLE_CHAT_WEBHOOK }}
37 changes: 16 additions & 21 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,21 @@
name: 1. Lint Workflow

on:
push:
branches:
- 'feature/**'
- 'feat/**'
- 'fix/**'
- 'hotfix/**'
- 'refactor/**'
pull_request:

- feature/**
- feat/**
- fix/**
- fixes/**
- hotfix/**
- refactor/**
- enhance/**
- test/**
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22'
cache: true
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
version: v1.50.0
lint:
name: Lint
secrets: inherit
uses: BerryBytes/workflows/.github/workflows/lint.yaml@main
test:
name: Test
secrets: inherit
uses: BerryBytes/workflows/.github/workflows/test.yaml@main
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

# Test binary, built with `go test -c`
*.test

.codex
# Output of the go coverage tool, specifically when used with LiteIDE
*.out
cover.out
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ repos:
# ==========================================
- repo: local
hooks:
- id: trivy
name: trivy
entry: trivy fs . --scanners secret --severity CRITICAL,HIGH --exit-code 1
- id: trivy-fs
name: trivy fs scan
entry: bash -c 'if [ "$GITHUB_ACTIONS" = "true" ]; then echo "Skipping Trivy in CI"; exit 0; else trivy fs . --skip-dirs vendor --scanners misconfig,secret --exit-code 1; fi'
language: system
pass_filenames: false
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ RUN CGO_ENABLED=0 GOOS=linux go build -o main .

FROM alpine:3.19
RUN adduser -D nonroot
RUN apk add --no-cache wget
WORKDIR /app
RUN chown nonroot:nonroot /app
USER nonroot
RUN touch .env
COPY --chown=nonroot:nonroot --from=builder /app/main .
COPY --chown=nonroot:nonroot --from=builder /app/docs/* ./docs/
HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 CMD wget -qO- http://127.0.0.1:8081/ >/dev/null || exit 1
CMD ["./main"]
2 changes: 1 addition & 1 deletion api/controllers/environment_clone_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ func (server *Server) CloneEnvironment(w http.ResponseWriter, r *http.Request) {
return
}
}
if environmentCreated.ExternalLogging.RawMessage != nil && len(environmentCreated.ExternalLogging.RawMessage) > 0 {
if environmentCreated.ExternalLogging.RawMessage != nil && len(environmentCreated.ExternalLogging.RawMessage) > 0 {
loggingReq, err := logging.PrepareLoggingRequest(environmentCreated)
if err != nil {
responses.ERROR(w, http.StatusUnprocessableEntity, err)
Expand Down
7 changes: 1 addition & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@ module 01cloud-api

go 1.22


require (
cloud.google.com/go/pubsub v1.3.1
cloud.google.com/go/storage v1.11.0
github.com/DATA-DOG/go-sqlmock v1.4.1
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751
github.com/ashwanthkumar/slack-go-webhook v0.0.0-20200209025033-430dd4e66960
github.com/aws/aws-sdk-go v1.34.27
github.com/berrybytes/01cloud-store v0.0.0-00010101000000-000000000000
github.com/berrybytes/01cloud-store v1.0.0
github.com/berrybytes/dockerhub-go v1.0.3
github.com/cloudflare/cloudflare-go v0.16.0
github.com/dgrijalva/jwt-go v3.2.0+incompatible
Expand Down Expand Up @@ -53,10 +52,6 @@ require (
k8s.io/apimachinery v0.18.3
)

// require github.com/berrybytes/01cloud-store v0.0.0-00010101000000-000000000000

require github.com/berrybytes/01cloud-store v0.0.0-00010101000000-000000000000

require (
cloud.google.com/go v0.66.0 // indirect
cloud.google.com/go/firestore v1.2.0 // indirect
Expand Down
7 changes: 7 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/berrybytes/01cloud-store v1.0.0 h1:6ApAgcueO8LfLE0dfzoigcYAnYgdzf/y7dtD5wJZS1M=
github.com/berrybytes/01cloud-store v1.0.0/go.mod h1:o8tj6sBLg/TPk0FOF0ht7I4ezWMkCRqCAwZe7kaxX+U=
github.com/berrybytes/dockerhub-go v1.0.3 h1:gY71yn7KxslJS8AeY5uSTtuPnOrgoAf896vFNOYWtUI=
github.com/berrybytes/dockerhub-go v1.0.3/go.mod h1:+4swgWxnXkQX2MTAbS2GOFgaN+Es3Vx+UlnitrKUU3Y=
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
Expand Down Expand Up @@ -203,6 +205,7 @@ github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwo
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
github.com/gabriel-vasile/mimetype v1.1.0 h1:+ahX+MvQPFve4kO9Qjjxf3j49i0ACdV236kJlOCRAnU=
github.com/gabriel-vasile/mimetype v1.1.0/go.mod h1:6CDPel/o/3/s4+bp6kIbsWATq8pmgOisOPG40CJa6To=
github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY=
Expand Down Expand Up @@ -521,16 +524,19 @@ github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+
github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE=
github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs=
github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
github.com/opencontainers/go-digest v1.0.0-rc1 h1:WzifXhOVOEOuFYOJAW6aQqW0TooG2iki3E3Ii+WN7gQ=
Expand Down Expand Up @@ -705,6 +711,7 @@ go.opencensus.io v0.22.4 h1:LYy1Hy3MJdrCdMwwzxA/dRok4ejH+RwNGbuoD9fCjto=
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
Expand Down
Loading