Skip to content
Snippets Groups Projects
Verified Commit 1db13de5 authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

fix: update go libs #2

parent 0ca4c16d
No related branches found
No related tags found
No related merge requests found
...@@ -7,16 +7,12 @@ ...@@ -7,16 +7,12 @@
image: docker-registry.schukai.com:443/nixos-ci-devenv:latest image: docker-registry.schukai.com:443/nixos-ci-devenv:latest
services:
- docker:dind
variables: variables:
# The repo name as used in # The repo name as used in
# https://github.com/nix-community/NUR/blob/master/repos.json # https://github.com/nix-community/NUR/blob/master/repos.json
NIXOS_VERSION: "23.05" NIXOS_VERSION: "23.05"
NIXPKGS_ALLOW_UNFREE: "1" NIXPKGS_ALLOW_UNFREE: "1"
NIXPKGS_ALLOW_INSECURE: "1" NIXPKGS_ALLOW_INSECURE: "1"
DOCKER_DRIVER: overlay2
GIT_DEPTH: 10 GIT_DEPTH: 10
stages: stages:
...@@ -24,8 +20,6 @@ stages: ...@@ -24,8 +20,6 @@ stages:
- deploy - deploy
before_script: before_script:
- nix shell nixpkgs#coreutils-full -c mkdir -p /certs/client/
- nix shell nixpkgs#coreutils-full -c ln -fs /etc/ssl/certs/ca-bundle.crt /certs/client/ca.pem
- echo > .env-gitlab-ci - echo > .env-gitlab-ci
- variables=("HOME=$HOME" "CI_COMMIT_REF_NAME=$CI_COMMIT_REF_NAME" "CI_REPOSITORY_URL=$CI_REPOSITORY_URL" "GITLAB_TOKEN=$GITLAB_TOKEN" "CI_JOB_TOKEN=$CI_JOB_TOKEN" "GITLAB_USER_EMAIL=$GITLAB_USER_EMAIL" "GITLAB_USER_NAME=\"$GITLAB_USER_NAME\"" "CI_REGISTRY_USER=$CI_REGISTRY_USER" "CI_PROJECT_ID=$CI_PROJECT_ID" "CI_PROJECT_DIR=$CI_PROJECT_DIR" "CI_API_V4_URL=$CI_API_V4_URL" "CI_PROJECT_NAME=$CI_PROJECT_NAME" "CI_COMMIT_SHORT_SHA=$CI_COMMIT_SHORT_SHA"); for var in "${variables[@]}"; do echo "$var" >> .env-gitlab-ci; done - variables=("HOME=$HOME" "CI_COMMIT_REF_NAME=$CI_COMMIT_REF_NAME" "CI_REPOSITORY_URL=$CI_REPOSITORY_URL" "GITLAB_TOKEN=$GITLAB_TOKEN" "CI_JOB_TOKEN=$CI_JOB_TOKEN" "GITLAB_USER_EMAIL=$GITLAB_USER_EMAIL" "GITLAB_USER_NAME=\"$GITLAB_USER_NAME\"" "CI_REGISTRY_USER=$CI_REGISTRY_USER" "CI_PROJECT_ID=$CI_PROJECT_ID" "CI_PROJECT_DIR=$CI_PROJECT_DIR" "CI_API_V4_URL=$CI_API_V4_URL" "CI_PROJECT_NAME=$CI_PROJECT_NAME" "CI_COMMIT_SHORT_SHA=$CI_COMMIT_SHORT_SHA"); for var in "${variables[@]}"; do echo "$var" >> .env-gitlab-ci; done
- cat .env-gitlab-ci - cat .env-gitlab-ci
...@@ -63,7 +57,3 @@ deploy: ...@@ -63,7 +57,3 @@ deploy:
paths: paths:
- /nix/store - /nix/store
artifacts:
paths:
- dist
# Contributing to schukai GmbH Projects
## Code of Conduct
Be a human, not an asshole. Common sense and basic human decency apply.
## Getting Started
### Setting up the Project
1. Fork the project on GitLab.
2. Clone your fork locally. Replace `[your-username]` with your GitLab username and `[project-name]` with the actual project name:
```bash
git clone $(git config --get remote.origin.url)
```
3. Add the upstream repository. Replace `[original-username]` and `[project-name]` with the original repository's username and project name:
```bash
git remote add upstream https://gitlab.schukai.com/[original-username]/[project-name].git
```
### Making Changes
1. Create a new branch:
```bash
git checkout -b new-feature-branch
```
2. Make your changes.
3. Commit your changes:
```bash
git commit -m "Description of change"
```
### Submitting a Merge Request
1. Push your changes to your fork:
```bash
git push origin new-feature-branch
```
2. Navigate to the original project repository on `gitlab.schukai.com`.
3. Open a Merge Request and provide a clear description of the changes.
## Coding Guidelines
- Follow the coding style used in the project.
- Write unit tests for new features.
- Ensure that all tests pass before submitting a Merge Request.
## Reporting Issues
If you find an issue, please create a new issue on `gitlab.schukai.com`.
## Additional Resources
- [GitLab Flow](https://docs.gitlab.com/ee/topics/gitlab_flow.html)
- [GitLab Merge Request Guidelines](https://docs.gitlab.com/ee/user/project/merge_requests/)
Thank you for your contribution!
LICENSE Copyright (C) 2023 schukai GmbH
* All content residing under the "documentation/" directory of this repository is licensed under "Creative Commons: CC BY-SA 4.0 license". This program is free software: you can redistribute it and/or modify
* All content that resides under the "application/" directory of this repository, if that directory exists, is licensed under the license defined in "application/LICENSE". it under the terms of the GNU Affero General Public License as published
* All third-party components that are integrated into our software are licensed under the original licence provided by the owner of the respective component. by the Free Software Foundation, either version 3 of the License.
* Content outside the above directories or restrictions is available under the "AGPL 3.0" licence as defined here: https://www.gnu.org/licenses/agpl-3.0.en.html
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
...@@ -17,17 +17,22 @@ tasks: ...@@ -17,17 +17,22 @@ tasks:
test: test:
desc: Execute unit tests in Go. desc: Execute unit tests in Go.
env:
TEST_BY_TASK: true
cmds: cmds:
- echo "Execute unit tests in Go." - echo "Execute unit tests in Go."
- go test -cover -v ./... - gosec .
- go test -bench -v ./... - go test -tags=runOnTask -cover -v ./...
- go test -race -v ./... - go test -tags=runOnTask -bench -v ./...
- go test -tags=runOnTask -race -v ./...
test-fuzz: test-fuzz:
desc: Conduct fuzzing tests.# desc: Conduct fuzzing tests.#
env:
TEST_BY_TASK: true
cmds: cmds:
- echo "Conduct fuzzing tests." - echo "Conduct fuzzing tests."
- go test -v -fuzztime=30s -fuzz=Fuzz ./... - go test -tags=runOnTask -v -fuzztime=30s -fuzz=Fuzz ./...
add-licenses: add-licenses:
desc: Attach license headers to Go files. desc: Attach license headers to Go files.
......
...@@ -3,11 +3,11 @@ ...@@ -3,11 +3,11 @@
"devenv": { "devenv": {
"locked": { "locked": {
"dir": "src/modules", "dir": "src/modules",
"lastModified": 1692003204, "lastModified": 1698243190,
"narHash": "sha256-gO2DXwXuArjpywgtRTDb3aKscWMbnI7YwFaqvV46yv0=", "narHash": "sha256-n+SbyNQRhUcaZoU00d+7wi17HJpw/kAUrXOL4zRcqE8=",
"owner": "cachix", "owner": "cachix",
"repo": "devenv", "repo": "devenv",
"rev": "ade3ae522baf366296598e232b7b063d81740bbb", "rev": "86f476f7edb86159fd20764489ab4e4df6edb4b6",
"type": "github" "type": "github"
}, },
"original": { "original": {
...@@ -74,11 +74,11 @@ ...@@ -74,11 +74,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1691950488, "lastModified": 1698288402,
"narHash": "sha256-iUNEeudc4dGjx+HsHccnGiuZUVE/nhjXuQ1DVCsHIUY=", "narHash": "sha256-jIIjApPdm+4yt8PglX8pUOexAdEiAax/DXW3S/Mb21E=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "720e61ed8de116eec48d6baea1d54469b536b985", "rev": "60b9db998f71ea49e1a9c41824d09aa274be1344",
"type": "github" "type": "github"
}, },
"original": { "original": {
...@@ -106,11 +106,11 @@ ...@@ -106,11 +106,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1691950488, "lastModified": 1698288402,
"narHash": "sha256-iUNEeudc4dGjx+HsHccnGiuZUVE/nhjXuQ1DVCsHIUY=", "narHash": "sha256-jIIjApPdm+4yt8PglX8pUOexAdEiAax/DXW3S/Mb21E=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "720e61ed8de116eec48d6baea1d54469b536b985", "rev": "60b9db998f71ea49e1a9c41824d09aa274be1344",
"type": "github" "type": "github"
}, },
"original": { "original": {
...@@ -130,11 +130,11 @@ ...@@ -130,11 +130,11 @@
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
"lastModified": 1691747570, "lastModified": 1698227354,
"narHash": "sha256-J3fnIwJtHVQ0tK2JMBv4oAmII+1mCdXdpeCxtIsrL2A=", "narHash": "sha256-Fi5H9jbaQLmLw9qBi/mkR33CoFjNbobo5xWdX4tKz1Q=",
"owner": "cachix", "owner": "cachix",
"repo": "pre-commit-hooks.nix", "repo": "pre-commit-hooks.nix",
"rev": "c5ac3aa3324bd8aebe8622a3fc92eeb3975d317a", "rev": "bd38df3d508dfcdff52cd243d297f218ed2257bf",
"type": "github" "type": "github"
}, },
"original": { "original": {
......
{ pkgs, inputs, phps, lib, config, modulesPath, ... }: { pkgs ? import <nixpkgs> {}, inputs, phps, lib, config, modulesPath, ... }:
{ {
# https://devenv.sh/packages/ # https://devenv.sh/packages/
...@@ -9,12 +9,14 @@ ...@@ -9,12 +9,14 @@
blackbox-terminal blackbox-terminal
coreutils-full coreutils-full
dbeaver dbeaver
dbeaver
delve delve
dialog dialog
drill drill
exa exa
fd fd
fd fd
feh
gcc12 gcc12
gdlv gdlv
git git
...@@ -23,6 +25,7 @@ ...@@ -23,6 +25,7 @@
gnumake gnumake
gnused gnused
go-licenses go-licenses
gosec
go-task go-task
gum gum
httpie httpie
...@@ -34,6 +37,8 @@ ...@@ -34,6 +37,8 @@
memcached memcached
netcat netcat
nixfmt nixfmt
nodePackages.mermaid-cli
openssh
procps procps
ranger ranger
unixtools.xxd unixtools.xxd
...@@ -162,6 +167,84 @@ ...@@ -162,6 +167,84 @@
enterShell = '' enterShell = ''
cat <<'EOF' > CONTRIBUTING.md
# Contributing to schukai GmbH Projects
## Code of Conduct
Be a human, not an asshole. Common sense and basic human decency apply.
## Getting Started
### Setting up the Project
1. Fork the project on GitLab.
2. Clone your fork locally. Replace `[your-username]` with your GitLab username and `[project-name]` with the actual project name:
```bash
git clone $(git config --get remote.origin.url)
```
3. Add the upstream repository. Replace `[original-username]` and `[project-name]` with the original repository's username and project name:
```bash
git remote add upstream https://gitlab.schukai.com/[original-username]/[project-name].git
```
### Making Changes
1. Create a new branch:
```bash
git checkout -b new-feature-branch
```
2. Make your changes.
3. Commit your changes:
```bash
git commit -m "Description of change"
```
### Submitting a Merge Request
1. Push your changes to your fork:
```bash
git push origin new-feature-branch
```
2. Navigate to the original project repository on `gitlab.schukai.com`.
3. Open a Merge Request and provide a clear description of the changes.
## Coding Guidelines
- Follow the coding style used in the project.
- Write unit tests for new features.
- Ensure that all tests pass before submitting a Merge Request.
## Reporting Issues
If you find an issue, please create a new issue on `gitlab.schukai.com`.
## Additional Resources
- [GitLab Flow](https://docs.gitlab.com/ee/topics/gitlab_flow.html)
- [GitLab Merge Request Guidelines](https://docs.gitlab.com/ee/user/project/merge_requests/)
Thank you for your contribution!
EOF
cat <<'EOF' > LICENSE
Copyright (C) 2023 schukai GmbH
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
EOF
cat <<'EOF' > Taskfile.yml cat <<'EOF' > Taskfile.yml
# THIS FILE IS AUTOGENERATED BY THE DEVENVSHELL # THIS FILE IS AUTOGENERATED BY THE DEVENVSHELL
...@@ -182,17 +265,22 @@ ...@@ -182,17 +265,22 @@
test: test:
desc: Execute unit tests in Go. desc: Execute unit tests in Go.
env:
TEST_BY_TASK: true
cmds: cmds:
- echo "Execute unit tests in Go." - echo "Execute unit tests in Go."
- go test -cover -v ./... - gosec .
- go test -bench -v ./... - go test -tags=runOnTask -cover -v ./...
- go test -race -v ./... - go test -tags=runOnTask -bench -v ./...
- go test -tags=runOnTask -race -v ./...
test-fuzz: test-fuzz:
desc: Conduct fuzzing tests.# desc: Conduct fuzzing tests.#
env:
TEST_BY_TASK: true
cmds: cmds:
- echo "Conduct fuzzing tests." - echo "Conduct fuzzing tests."
- go test -v -fuzztime=30s -fuzz=Fuzz ./... - go test -tags=runOnTask -v -fuzztime=30s -fuzz=Fuzz ./...
add-licenses: add-licenses:
desc: Attach license headers to Go files. desc: Attach license headers to Go files.
...@@ -234,16 +322,12 @@ ...@@ -234,16 +322,12 @@
image: docker-registry.schukai.com:443/nixos-ci-devenv:latest image: docker-registry.schukai.com:443/nixos-ci-devenv:latest
services:
- docker:dind
variables: variables:
# The repo name as used in # The repo name as used in
# https://github.com/nix-community/NUR/blob/master/repos.json # https://github.com/nix-community/NUR/blob/master/repos.json
NIXOS_VERSION: "23.05" NIXOS_VERSION: "23.05"
NIXPKGS_ALLOW_UNFREE: "1" NIXPKGS_ALLOW_UNFREE: "1"
NIXPKGS_ALLOW_INSECURE: "1" NIXPKGS_ALLOW_INSECURE: "1"
DOCKER_DRIVER: overlay2
GIT_DEPTH: 10 GIT_DEPTH: 10
stages: stages:
...@@ -251,8 +335,6 @@ ...@@ -251,8 +335,6 @@
- deploy - deploy
before_script: before_script:
- nix shell nixpkgs#coreutils-full -c mkdir -p /certs/client/
- nix shell nixpkgs#coreutils-full -c ln -fs /etc/ssl/certs/ca-bundle.crt /certs/client/ca.pem
- echo > .env-gitlab-ci - echo > .env-gitlab-ci
- variables=("HOME=$HOME" "CI_COMMIT_REF_NAME=$CI_COMMIT_REF_NAME" "CI_REPOSITORY_URL=$CI_REPOSITORY_URL" "GITLAB_TOKEN=$GITLAB_TOKEN" "CI_JOB_TOKEN=$CI_JOB_TOKEN" "GITLAB_USER_EMAIL=$GITLAB_USER_EMAIL" "GITLAB_USER_NAME=\"$GITLAB_USER_NAME\"" "CI_REGISTRY_USER=$CI_REGISTRY_USER" "CI_PROJECT_ID=$CI_PROJECT_ID" "CI_PROJECT_DIR=$CI_PROJECT_DIR" "CI_API_V4_URL=$CI_API_V4_URL" "CI_PROJECT_NAME=$CI_PROJECT_NAME" "CI_COMMIT_SHORT_SHA=$CI_COMMIT_SHORT_SHA"); for var in "''${variables[@]}"; do echo "$var" >> .env-gitlab-ci; done - variables=("HOME=$HOME" "CI_COMMIT_REF_NAME=$CI_COMMIT_REF_NAME" "CI_REPOSITORY_URL=$CI_REPOSITORY_URL" "GITLAB_TOKEN=$GITLAB_TOKEN" "CI_JOB_TOKEN=$CI_JOB_TOKEN" "GITLAB_USER_EMAIL=$GITLAB_USER_EMAIL" "GITLAB_USER_NAME=\"$GITLAB_USER_NAME\"" "CI_REGISTRY_USER=$CI_REGISTRY_USER" "CI_PROJECT_ID=$CI_PROJECT_ID" "CI_PROJECT_DIR=$CI_PROJECT_DIR" "CI_API_V4_URL=$CI_API_V4_URL" "CI_PROJECT_NAME=$CI_PROJECT_NAME" "CI_COMMIT_SHORT_SHA=$CI_COMMIT_SHORT_SHA"); for var in "''${variables[@]}"; do echo "$var" >> .env-gitlab-ci; done
- cat .env-gitlab-ci - cat .env-gitlab-ci
...@@ -290,14 +372,8 @@ ...@@ -290,14 +372,8 @@
paths: paths:
- /nix/store - /nix/store
artifacts:
paths:
- dist
EOF EOF
''; '';
scripts.do-git-commit.exec = '' scripts.do-git-commit.exec = ''
...@@ -635,4 +711,5 @@ ...@@ -635,4 +711,5 @@
printLogfileAndExit 0 printLogfileAndExit 0
''; '';
} }
...@@ -10,5 +10,7 @@ gitlab.schukai.com/oss/libraries/go/utilities/pathfinder v0.4.0 h1:eAEsq3lsHwMe5 ...@@ -10,5 +10,7 @@ gitlab.schukai.com/oss/libraries/go/utilities/pathfinder v0.4.0 h1:eAEsq3lsHwMe5
gitlab.schukai.com/oss/libraries/go/utilities/pathfinder v0.4.0/go.mod h1:UvdD4NAf3gLKYafabJD7e9ZCOetzM9JZ9y4GkZukPVU= gitlab.schukai.com/oss/libraries/go/utilities/pathfinder v0.4.0/go.mod h1:UvdD4NAf3gLKYafabJD7e9ZCOetzM9JZ9y4GkZukPVU=
gitlab.schukai.com/oss/libraries/go/utilities/pathfinder v0.8.1 h1:A3KvLvu4rV3OstgEn6xHulhQaXawVvzFzbafYHWHUfs= gitlab.schukai.com/oss/libraries/go/utilities/pathfinder v0.8.1 h1:A3KvLvu4rV3OstgEn6xHulhQaXawVvzFzbafYHWHUfs=
gitlab.schukai.com/oss/libraries/go/utilities/pathfinder v0.8.1/go.mod h1:MqCBFv7DXKoBE2rZDc51LGvl2QI7Kz0D+XkQ0izj+ws= gitlab.schukai.com/oss/libraries/go/utilities/pathfinder v0.8.1/go.mod h1:MqCBFv7DXKoBE2rZDc51LGvl2QI7Kz0D+XkQ0izj+ws=
gitlab.schukai.com/oss/libraries/go/utilities/pathfinder v0.9.1 h1:WpM6PcFqQZWPBGDEuMILWHq98dPVBLAxi8ae9QMWWbM=
gitlab.schukai.com/oss/libraries/go/utilities/pathfinder v0.9.1/go.mod h1:MqCBFv7DXKoBE2rZDc51LGvl2QI7Kz0D+XkQ0izj+ws=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment