Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
2584732
fix: experiment with WASI
dnitsch Nov 24, 2025
6b8689c
fix: release container
dnitsch Nov 24, 2025
f0582ec
fix: interim goplugin from hashicorp
dnitsch Nov 26, 2025
4f7aecc
fix: interim commit
dnitsch Nov 29, 2025
b1f3046
fix: plugin architecture working
dnitsch Nov 30, 2025
6f0a3ba
fix: add init as wip element
dnitsch Dec 8, 2025
bef899b
fix: rejig packages
dnitsch Mar 19, 2026
b641710
fix: rejig layout of sub modules
dnitsch Mar 19, 2026
746b1a5
fix: minor clean up
dnitsch Mar 19, 2026
5d65761
fix: interim
dnitsch Apr 2, 2026
a3f89bd
fix: add tests after re-work
dnitsch Apr 3, 2026
ccf0c38
fix: add more tests to store package
dnitsch Apr 4, 2026
a6e6706
fix: linter errors
dnitsch Apr 4, 2026
9d7cc13
fix: sonar and remove unused
dnitsch Apr 4, 2026
dcdc163
fix: update set up tasks
dnitsch Apr 4, 2026
e199688
fix: add more interim init changes
dnitsch Apr 7, 2026
9c7016b
fix: add single initialization to main
dnitsch Apr 7, 2026
41c8097
fix: init command
dnitsch Apr 9, 2026
66fcfd7
fix: update token cookie value
dnitsch Apr 9, 2026
4b8db7d
fix: add constant for LOG
dnitsch Apr 10, 2026
99961b0
fix: init
dnitsch May 11, 2026
c5b1f17
fix: bump toolchain
dnitsch May 11, 2026
eabeda5
fix: update eirctl deps
dnitsch May 26, 2026
bbc3b11
fix: add shared linter task
dnitsch May 26, 2026
f74d7c0
fix: unit tests
dnitsch Sep 20, 2026
c9f0639
fix: run pipeline
dnitsch Sep 22, 2026
023caea
fix: correct semver
dnitsch Sep 22, 2026
3011bb7
fix: add linter
dnitsch Sep 23, 2026
89f292e
fix: update action
dnitsch Sep 23, 2026
0025acf
fix: minor clean up
dnitsch Sep 23, 2026
dcd1452
fix: add user to sonar container
dnitsch Sep 23, 2026
7460255
fix: precreate scannerwork
dnitsch Sep 23, 2026
f5088f2
fix: bump to 1.27
dnitsch Sep 23, 2026
12b76a2
fix: GH sonar scan
dnitsch Sep 23, 2026
655500e
fix: remove uid:gid
dnitsch Sep 23, 2026
00fc127
fix: do full clone to allow for sonar git info
dnitsch Sep 23, 2026
361515e
fix: ci fixes
dnitsch Sep 23, 2026
022cc99
fix: update to actually accept container_arg
dnitsch Sep 23, 2026
8e49478
fix: without user override
dnitsch Sep 23, 2026
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
Empty file added .eirctl/.gitkeep
Empty file.
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
* text eol=lf
*.jpg binary
*.jpeg binary
*.png binary
*.gif binary
45 changes: 25 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
name: CI

on:
push:
branches: [master, main]
pull_request:
branches: [master, main]
branches: [master, main, v3]

permissions:
contents: write
Expand All @@ -21,7 +19,7 @@ jobs:
outputs:
semVer: ${{ steps.gitversion.outputs.semVer }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7.0.1
with:
fetch-depth: 0
- name: install deps
Expand All @@ -31,12 +29,15 @@ jobs:
git config user.email ${{ github.actor }}-ci@gha.org
git config user.name ${{ github.actor }}
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v4.1.0
uses: gittools/actions/gitversion/setup@v4.7.0
with:
versionSpec: "6.x"
- name: Set SemVer Version
uses: gittools/actions/gitversion/execute@v4.1.0
uses: gittools/actions/gitversion/execute@v4.7.0
id: gitversion
with:
overrideConfig: |
next-version=3.0.0

- name: echo VERSIONS
run: |
Expand All @@ -52,19 +53,16 @@ jobs:
GIT_TAG: ${{ needs.set-version.outputs.semVer }}
GOVCS: false
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7.0.1
with:
fetch-depth: 1
fetch-depth: 0

- name: Install Eirctl
uses: ensono/actions/eirctl-setup@v0.3.1
with:
version: 0.9.3
isPrerelease: false

- name: Run Lint
run: |
eirctl run pipeline lints
eirctl run pipeline lint
- name: Run Tests
run: |
eirctl run pipeline gha:unit:test
Expand All @@ -75,16 +73,23 @@ jobs:
with:
report_paths: "**/.coverage/report-junit.xml"

- name: Analyze with SonarCloud
uses: SonarSource/sonarqube-scan-action@v6
- name: Run SonarCloud Scan
env:
# Needed to get PR information
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Generate a token on Sonarcloud.io, add it to the secrets of this repo with the name SONAR_TOKEN (Settings > Secrets > Actions > add new repository secret)
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
projectBaseDir: .
args: >
-Dsonar.projectVersion=${{ needs.set-version.outputs.semVer }}
-Dsonar.working.directory=.scannerwork
-Dsonar.scm.provider=git
run: |
mkdir -p ${PWD}/.scannerwork
chmod 0777 -R ${PWD}/.scannerwork
cp "$GITHUB_EVENT_PATH" .github/sonar-event.json
echo "current user: $(id -u):$(id -g)"
# EIRCTL_CONTAINER_ARG="--user=$(id -u):$(id -g)" \
set +e
GITHUB_EVENT_PATH=/eirctl/.github/sonar-event.json \
eirctl run pipeline sonar-scan -- -Dsonar.projectVersion=${{ needs.set-version.outputs.semVer }} \
-Dsonar.working.directory=/eirctl/.scannerwork \
-Dsonar.scm.provider=git || echo "deleting .scannerwork"
scan_status=$?
set -e
echo "Scan status: $scan_status"
21 changes: 11 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ name: release

on:
workflow_run:
workflows: ['CI']
workflows: ["CI"]
types:
- completed
branches:
- master
- main
- v3

permissions:
contents: write
Expand All @@ -22,7 +23,7 @@ jobs:
outputs:
semVer: ${{ steps.gitversion.outputs.semVer }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7.0.1
with:
fetch-depth: 0
- name: install deps
Expand All @@ -32,12 +33,15 @@ jobs:
git config user.email ${{ github.actor }}-ci@gha.org
git config user.name ${{ github.actor }}
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v4.1.0
uses: gittools/actions/gitversion/setup@v4.7.0
with:
versionSpec: '6.x'
versionSpec: "6.x"
- name: Set SemVer Version
uses: gittools/actions/gitversion/execute@v4.1.0
uses: gittools/actions/gitversion/execute@v4.7.0
id: gitversion
with:
overrideConfig: |
next-version=3.0.0

release:
name: Release
Expand All @@ -46,22 +50,19 @@ jobs:
env:
SEMVER: ${{ needs.set-version.outputs.semVer }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7.0.1
with:
fetch-depth: 1

- name: Install Eirctl
uses: ensono/actions/eirctl-setup@v0.3.1
with:
version: 0.7.6
isPrerelease: false

- name: build binary
run: |
VERSION=${SEMVER} REVISION=$GITHUB_SHA eirctl run pipeline build:bin

- name: Release binary
uses: softprops/action-gh-release@v2
uses: softprops/action-gh-release@v3.0.3
with:
tag_name: v${{ needs.set-version.outputs.semVer }}
# TODO: add additional info to the release
Expand Down
23 changes: 13 additions & 10 deletions .github/workflows/release_container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ name: Publish Container

on:
workflow_run:
workflows: ['Lint and Test']
workflows: ["CI"]
types:
- completed
branches:
branches:
- main

permissions:
contents: write
packages: write
packages: write

jobs:
set-version-tag:
Expand All @@ -19,18 +19,21 @@ jobs:
outputs:
semVer: ${{ steps.gitversion.outputs.semVer }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7.0.1
# get version
- uses: actions/checkout@v4
- uses: actions/checkout@v7.0.1
with:
fetch-depth: 0
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v3.0
uses: gittools/actions/gitversion/setup@v4.7.0
with:
versionSpec: '5.x'
versionSpec: "6.x"
- name: Set SemVer Version
uses: gittools/actions/gitversion/execute@v3.0
uses: gittools/actions/gitversion/execute@v4.7.0
id: gitversion
with:
overrideConfig: |
next-version=3.0.0

build-and-push:
runs-on: ubuntu-latest
Expand All @@ -39,7 +42,7 @@ jobs:
SEMVER: ${{ needs.set-version-tag.outputs.semVer }}
steps:
- name: Check out repository
uses: actions/checkout@v3
uses: actions/checkout@v7.0.1

- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
Expand All @@ -63,4 +66,4 @@ jobs:
build-args: Version=${{ needs.set-version-tag.outputs.semVer }},Revision=${{ github.sha }}
tags: |
ghcr.io/ensono/eirctl:${{ needs.set-version-tag.outputs.semVer }}
platforms: linux/amd64,linux/arm64 # adjust as needed
platforms: linux/amd64,linux/arm64 # adjust as needed
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,20 @@

# Go
vendor
bin
dist
.deps/

# generated
bin
plugins/**/bin

# tests
.coverage

# local testers and
local/
.bin
.configmanager
.trivy/fs-sbom-file.json
.eirctl/**/*
!.eirctl/.gitkeep
7 changes: 7 additions & 0 deletions .trivyignore.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
vulnerabilities:

secrets:

misconfigurations:

licenses:
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,10 @@ FROM docker.io/alpine:3

COPY --from=builder /app/bin/configmanager /usr/bin/configmanager

RUN chmod +x /usr/bin/configmanager

RUN adduser -D -s /bin/sh -h /home/configmanager configmanager

USER configmanager

ENTRYPOINT ["configmanager"]
9 changes: 9 additions & 0 deletions GitVersion.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Conventional Commits versioning rules:
# Major: any type with ! (e.g. feat!:, fix(scope)!:) or BREAKING CHANGE in commit footer
# Minor: feat: or feat(scope):
# Patch: all other types (fix:, refactor:, debug:, chore:, etc.)
mode: ContinuousDelivery
commit-message-incrementing: Enabled
major-version-bump-message: '^(\w+)(\(\w+\))?!:|BREAKING CHANGE'
minor-version-bump-message: '^feat(\(\w+\))?:'
patch-version-bump-message: '^(\w+)(\(\w+\))?:'
15 changes: 15 additions & 0 deletions buf.gen.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: v2
# this ensures we can store the .proto and generated files in the same directory
clean: false
plugins:
- remote: buf.build/protocolbuffers/go
out: tokenstore/proto
opt:
- paths=source_relative
- remote: buf.build/grpc/go:v1.3.0
out: tokenstore/proto
opt:
- paths=source_relative
- require_unimplemented_servers=false
inputs:
- directory: tokenstore/proto
9 changes: 9 additions & 0 deletions buf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: v2
modules:
- path: ./tokenstore/proto
lint:
use:
- STANDARD
breaking:
use:
- FILE
26 changes: 20 additions & 6 deletions cmd/configmanager/configmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"io"

"github.com/DevLabFoundry/configmanager/v3"
"github.com/DevLabFoundry/configmanager/v3/config"
"github.com/DevLabFoundry/configmanager/v3/generator"
"github.com/DevLabFoundry/configmanager/v3/internal/cmdutils"
"github.com/DevLabFoundry/configmanager/v3/internal/config"
"github.com/DevLabFoundry/configmanager/v3/internal/log"
"github.com/spf13/cobra"
)
Expand All @@ -23,6 +23,11 @@ type rootCmdFlags struct {
tokenSeparator string
keySeparator string
enableEnvSubst bool
// envsubstNoEmpty indicates whether the envsubst no empty flag is enabled
// only takes effect if enableEnvSubst is true
envsubstNoEmpty bool
// laxMode when enabled allows not found keys to be logged out instead of error
laxMode bool
}

type Root struct {
Expand All @@ -38,8 +43,9 @@ func NewRootCmd(logger log.ILogger) *Root { //channelOut, channelErr io.Writer
Short: fmt.Sprintf("%s CLI for retrieving and inserting config or secret variables", config.SELF_NAME),
Long: fmt.Sprintf(`%s CLI for retrieving config or secret variables.
Using a specific tokens as an array item`, config.SELF_NAME),
SilenceUsage: true,
Version: fmt.Sprintf("%s-%s", Version, Revision),
SilenceUsage: true,
SilenceErrors: true,
Version: fmt.Sprintf("%s-%s", Version, Revision),
},
logger: logger,
rootFlags: &rootCmdFlags{},
Expand All @@ -48,7 +54,8 @@ func NewRootCmd(logger log.ILogger) *Root { //channelOut, channelErr io.Writer
rc.Cmd.PersistentFlags().BoolVarP(&rc.rootFlags.verbose, "verbose", "v", false, "Verbosity level")
rc.Cmd.PersistentFlags().StringVarP(&rc.rootFlags.tokenSeparator, "token-separator", "s", "://", "Separator to use to mark concrete store and the key within it")
rc.Cmd.PersistentFlags().StringVarP(&rc.rootFlags.keySeparator, "key-separator", "k", "|", "Separator to use to mark a key look up in a map. e.g. AWSSECRETS:///token/map|key1")
rc.Cmd.PersistentFlags().BoolVarP(&rc.rootFlags.enableEnvSubst, "enable-envsubst", "e", false, "Enable envsubst on input. This will fail on any unset or empty variables")
rc.Cmd.PersistentFlags().BoolVarP(&rc.rootFlags.enableEnvSubst, "enable-envsubst", "e", false, "Enable envsubst on input. This will fail on any unset variables")
rc.Cmd.PersistentFlags().BoolVarP(&rc.rootFlags.enableEnvSubst, "envsubst-no-empty", "", false, "Enable envsubst no empty check. This will fail on any unset and/or empty variables")
addSubCmds(rc)
return rc
}
Expand All @@ -58,6 +65,7 @@ func addSubCmds(rootCmd *Root) {
newFromStrCmd(rootCmd)
newRetrieveCmd(rootCmd)
newInsertCmd(rootCmd)
newInitCmd(rootCmd)
}

func (rc *Root) Execute(ctx context.Context) error {
Expand All @@ -72,13 +80,19 @@ func cmdutilsInit(rootCmd *Root, cmd *cobra.Command, path string) (*cmdutils.Cmd
}

cm := configmanager.New(cmd.Context())
cm.Config.WithTokenSeparator(rootCmd.rootFlags.tokenSeparator).WithOutputPath(path).WithKeySeparator(rootCmd.rootFlags.keySeparator).WithEnvSubst(rootCmd.rootFlags.enableEnvSubst)
gnrtr := generator.NewGenerator(cmd.Context(), func(gv *generator.GenVars) {
cm.Config.WithTokenSeparator(rootCmd.rootFlags.tokenSeparator).
WithOutputPath(path).
WithKeySeparator(rootCmd.rootFlags.keySeparator).
WithEnvSubst(rootCmd.rootFlags.enableEnvSubst).
WithLaxMode(rootCmd.rootFlags.laxMode).
WithEnvSubstNoEmpty(rootCmd.rootFlags.envsubstNoEmpty)
gnrtr := generator.New(cmd.Context(), func(gv *generator.Generator) {
if rootCmd.rootFlags.verbose {
rootCmd.logger.SetLevel(log.DebugLvl)
}
gv.Logger = rootCmd.logger
}).WithConfig(cm.Config)

cm.WithGenerator(gnrtr)
return cmdutils.New(cm, rootCmd.logger, outputWriter), outputWriter, nil
}
Loading
Loading