Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schema 2.0 #40

Merged
merged 65 commits into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
7fdc8c9
refactor: move examples
franklinkim Sep 21, 2023
2b4348f
chore: change changelog
franklinkim Sep 21, 2023
51f06aa
chore: update test output
franklinkim Sep 21, 2023
2cc181e
test: update tests
franklinkim Sep 21, 2023
c0c52b8
feat: add squadron name to schema
franklinkim Sep 21, 2023
bede368
feat: add tags
franklinkim Sep 21, 2023
442323c
feat: add builds for dependencies
franklinkim Sep 25, 2023
ff880ac
refactor: update diff
franklinkim Sep 25, 2023
7308826
feat: add charts to list
franklinkim Sep 27, 2023
80a9de2
feat: fix race conditions
franklinkim Sep 27, 2023
1d00f57
feat: update versions
franklinkim Dec 20, 2023
e33a919
feat: add yamllint
franklinkim Dec 20, 2023
bd1211b
feat: bump deps
franklinkim Dec 20, 2023
793d3de
feat: remove deprecations
franklinkim Dec 20, 2023
527b0ac
docs: update todos
franklinkim Dec 20, 2023
e6738a5
style: format code
franklinkim Jan 3, 2024
65b9a53
feat: add tags
franklinkim Jan 3, 2024
d034c0a
feat: only show output if not empty
franklinkim Jan 3, 2024
740a565
refactor: use pointer
franklinkim Jan 3, 2024
684859a
feat: set stdin
franklinkim Jan 3, 2024
d65d946
feat: update dependencies
franklinkim Jan 3, 2024
f72cf48
style: format code
franklinkim Jan 3, 2024
f5aaffc
feat: add debug
franklinkim Jan 3, 2024
761faac
refactor: simplify
franklinkim Jan 3, 2024
626a5f5
test: update snapshots
franklinkim Jan 3, 2024
17cf94c
style: cleanup
franklinkim Jan 3, 2024
2565542
Merge branch 'main' of github.com:foomo/squadron into schema-2.0
franklinkim Jan 3, 2024
a596b9a
chore: bump deps
franklinkim Jan 4, 2024
be02a24
chore: bump deps
franklinkim Jan 4, 2024
f625c21
fix: values
franklinkim Jan 4, 2024
0c124cd
chore: set prerelease to auto
franklinkim Jan 4, 2024
fc81aff
fix: pass name to template
franklinkim Jan 12, 2024
5fed842
feat: only render config if needed
franklinkim Jan 24, 2024
ef88b13
revert: only render config if needed
franklinkim Jan 25, 2024
04b8fe6
feat: add kustomize
franklinkim Jan 26, 2024
5e8747e
docs: update readme
franklinkim Jan 26, 2024
1827167
feat: split up chart args
franklinkim Jan 29, 2024
454121b
feat: add with-tags
franklinkim Jan 30, 2024
cdd2dc9
feat: support oci on other commands
franklinkim Jan 31, 2024
db791ae
fix: parallel local dependencies update
franklinkim Feb 5, 2024
df1d8a8
chore: change release
franklinkim Feb 5, 2024
3495437
feat: update deps
franklinkim Feb 5, 2024
1ca4d77
chore: remove field
franklinkim Feb 5, 2024
d1d5b20
fix: nil pointer
franklinkim Feb 5, 2024
ec3024a
feat: replace OP_MODE
franklinkim Feb 5, 2024
ce9e507
feat: check for OP_SERVICE_ACCOUNT_TOKEN
franklinkim Feb 5, 2024
7e5d5df
fix: pass vaultUUID
franklinkim Feb 5, 2024
a7b1f4f
feat: set perm
franklinkim Mar 25, 2024
2fefe60
fix: add post render args
franklinkim Mar 25, 2024
7e0c91d
chore: update linter
franklinkim Mar 25, 2024
85faef4
chore: update setup
franklinkim Mar 25, 2024
b845f23
feat: update deps
franklinkim Mar 25, 2024
3921c79
feat: wrap errors
franklinkim Apr 23, 2024
62d5f40
feat: check for op signin only once
franklinkim Apr 23, 2024
f0e6abe
feat: bump deps
franklinkim Apr 23, 2024
19cfe00
Merge branch 'main' of github.com:foomo/squadron into schema-2.0
franklinkim Apr 23, 2024
aa6a5bd
feat: switch to warning
franklinkim Apr 23, 2024
489d6ba
feat: add to string
franklinkim Apr 30, 2024
75a04bd
feat: switch to StringArray
franklinkim Apr 30, 2024
1e6ce0b
feat: allow build arg override
franklinkim Apr 30, 2024
9689064
feat: switch to StringArray
franklinkim Apr 30, 2024
9bafb55
revert: run and return
franklinkim Apr 30, 2024
8617fba
fix: init cache
franklinkim Apr 30, 2024
63e63f8
feat: allow dynamic docker command arguements
franklinkim May 2, 2024
2d8210b
feat: add opDoc template func
franklinkim Jun 6, 2024
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
17 changes: 6 additions & 11 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
- package-ecosystem: github-actions
directory: '/'
schedule:
interval: "weekly"
- package-ecosystem: "gomod"
directory: "/"
interval: weekly
- package-ecosystem: gomod
directory: '/'
schedule:
interval: "weekly"
interval: weekly
39 changes: 39 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: checks

on:
push:
branches: [ main ]
pull_request:
merge_group:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'

- uses: gotesttools/gotestfmt-action@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}

- uses: golangci/golangci-lint-action@v4
with:
version: latest

- name: Run tests
run: make test
env:
SHELL: "/bin/zsh"

- uses: coverallsapp/github-action@v2
with:
file: coverage.out
34 changes: 0 additions & 34 deletions .github/workflows/release.yml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Release Tag

on:
push:
tags:
- v*.*.*
workflow_dispatch:

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Unshallow
run: git fetch --prune --unshallow

- uses: actions/setup-go@v5
with:
go-version-file: go.mod

- id: app_token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.TOKEN_APP_ID }}
private_key: ${{ secrets.TOKEN_APP_PRIVATE_KEY }}

- uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ steps.app_token.outputs.token }}
32 changes: 0 additions & 32 deletions .github/workflows/test.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
!.golangci.yml
!.goreleaser.yml
!.husky.yaml
!.yamllint.yaml
/bin/
/coverage.out
/coverage.html
Expand Down
17 changes: 14 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
run:
timeout: 5m
skip-dirs:
- tmp

linters-settings:
gocritic:
disabled-checks:
- ifElseChain
- commentFormatting
gosec:
excludes:
- G204

linters:
enable:
Expand All @@ -17,12 +28,12 @@ linters:
- forcetypeassert # finds forced type assertions [fast: true, auto-fix: false]
#- gochecknoinits # Checks that no init functions are present in Go code [fast: true, auto-fix: false]
#- goconst # Finds repeated strings that could be replaced by a constant [fast: true, auto-fix: false]
#- gocritic # Provides diagnostics that check for bugs, performance and style issues. [fast: false, auto-fix: false]
- gocritic # Provides diagnostics that check for bugs, performance and style issues. [fast: false, auto-fix: false]
- goimports # In addition to fixing imports, goimports also formats your code in the same style as gofmt. [fast: true, auto-fix: true]
#- gomoddirectives # Manage the use of 'replace', 'retract', and 'excludes' directives in go.mod. [fast: true, auto-fix: false]
- gomodguard # Allow and block list linter for direct Go module dependencies. This is different from depguard where there are different block types for example version constraints and module recommendations. [fast: true, auto-fix: false]
- goprintffuncname # Checks that printf-like functions are named with `f` at the end [fast: true, auto-fix: false]
#- gosec # (gas): Inspects source code for security problems [fast: false, auto-fix: false]
- gosec # (gas): Inspects source code for security problems [fast: false, auto-fix: false]
- grouper # An analyzer to analyze expression groups. [fast: true, auto-fix: false]
- importas # Enforces consistent import aliases [fast: false, auto-fix: false]
- maintidx # maintidx measures the maintainability index of each function. [fast: true, auto-fix: false]
Expand All @@ -31,7 +42,7 @@ linters:
- nakedret # Finds naked returns in functions greater than a specified function length [fast: true, auto-fix: false]
#- nestif # Reports deeply nested if statements [fast: true, auto-fix: false]
- nilerr # Finds the code that returns nil even if it checks that the error is not nil. [fast: false, auto-fix: false]
#- nilnil # Checks that there is no simultaneous return of `nil` error and an invalid value. [fast: false, auto-fix: false]
- nilnil # Checks that there is no simultaneous return of `nil` error and an invalid value. [fast: false, auto-fix: false]
- noctx # noctx finds sending http request without context.Context [fast: false, auto-fix: false]
- nolintlint # Reports ill-formed or insufficient nolint directives [fast: true, auto-fix: false]
#- nonamedreturns # Reports all named returns [fast: false, auto-fix: false]
Expand Down
61 changes: 21 additions & 40 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# .goreleaser.yml
# Build customization
project_name: squadron

release:
github:
owner: foomo
name: squadron
prerelease: auto

builds:
- binary: squadron
main: ./cmd/main.go
env:
- CGO_ENABLED=0
goos:
- windows
- darwin
Expand All @@ -13,55 +16,33 @@ builds:
- amd64
- arm64
goarm:
- 7
- '7'
env:
- CGO_ENABLED=0
main: ./cmd/main.go
flags:
- -trimpath
ldflags:
- -s -w -X github.com/foomo/squadron/cmd/actions.version={{.Version}}
ldflags: -s -w -X github.com/foomo/squadron/cmd/actions.version={{.Version}}

archives:
- format: tar.gz
format_overrides:
- goos: windows
format: zip
files:
- LICENSE
- README.md

changelog:
filters:
exclude:
- "^wip"
- "^test"
- "^docs"
- "^chore"
- "^style"
- "go mod tidy"
- "merge conflict"
- "Merge pull request"
- "Merge remote-tracking branch"
- "Merge branch"
groups:
- title: Features
regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$'
order: 0
- title: Dependency updates
regexp: '^.*?(feat|fix)\(deps\)!?:.+$'
order: 100
- title: "Bug fixes"
regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$'
order: 150
- title: "Security"
regexp: '^.*?sec(\([[:word:]]+\))??!?:.+$'
order: 200
- title: "Performace"
regexp: '^.*?perf(\([[:word:]]+\))??!?:.+$'
order: 250
- title: Other
order: 999
use: github-native

brews:
# Repository to push the tap to.
- tap:
- repository:
owner: foomo
name: homebrew-squadron
name: homebrew-tap
caveats: "squadron -h"
homepage: "https://github.com/foomo/squadron"
description: "CLI utility manage infrastructure as code with helm"
test: |
system "#{bin}/squadron --version"
8 changes: 8 additions & 0 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
extends: default

rules:
line-length: disable
document-start: disable
quoted-strings:
quote-type: single
required: false
19 changes: 5 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@

## === Tasks ===

## === Tasks ===

.PHONY: doc
## Run tests
doc:
Expand All @@ -29,19 +27,12 @@ doc:
.PHONY: test
## Run tests
test:
@go test -v ./...
@go test -coverprofile=coverage.out -race -json ./... | gotestfmt

.PHONY: test.update
## Run tests and update snapshots
test.update:
go test -update ./...

.PHONY: test.cover
## Run tests with coverage
test.cover:
@go test -v -coverprofile=coverage.out ./...
@go tool cover -func=coverage.out
@go tool cover -html=coverage.out
@go test -update -coverprofile=coverage.out -race -json ./... | gotestfmt

.PHONY: lint
## Run linter
Expand All @@ -65,12 +56,12 @@ outdated:

## Install binary
install:
go build -o ${GOPATH}/bin/squadron cmd/main.go
@go build -o ${GOPATH}/bin/squadron cmd/main.go

## Build binary
build:
mkdir -p bin
go build -o bin/squadron cmd/main.go
@mkdir -p bin
@go build -o bin/squadron cmd/main.go

## === Utils ===

Expand Down
Loading
Loading