Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • master
  • v1.0.0
  • v1.0.1
  • v1.1.0
  • v1.10.0
  • v1.10.1
  • v1.10.2
  • v1.11.0
  • v1.12.0
  • v1.12.1
  • v1.12.2
  • v1.12.3
  • v1.12.4
  • v1.12.5
  • v1.12.6
  • v1.12.7
  • v1.12.8
  • v1.13.0
  • v1.13.1
  • v1.13.2
  • v1.14.0
  • v1.15.0
  • v1.15.1
  • v1.15.10
  • v1.15.11
  • v1.15.12
  • v1.15.13
  • v1.15.14
  • v1.15.15
  • v1.15.16
  • v1.15.17
  • v1.15.2
  • v1.15.3
  • v1.15.4
  • v1.15.5
  • v1.15.6
  • v1.15.7
  • v1.15.8
  • v1.15.9
  • v1.16.0
  • v1.16.1
  • v1.17.0
  • v1.18.0
  • v1.18.1
  • v1.18.2
  • v1.19.0
  • v1.19.1
  • v1.19.2
  • v1.19.3
  • v1.19.4
  • v1.2.0
  • v1.20.0
  • v1.20.1
  • v1.20.2
  • v1.20.3
  • v1.21.0
  • v1.21.1
  • v1.22.0
  • v1.23.0
  • v1.23.1
  • v1.23.2
  • v1.3.0
  • v1.3.1
  • v1.3.2
  • v1.4.0
  • v1.5.0
  • v1.5.1
  • v1.6.0
  • v1.6.1
  • v1.7.0
  • v1.7.1
  • v1.7.2
  • v1.7.3
  • v1.8.0
  • v1.8.1
  • v1.9.0
76 results

Target

Select target project
  • oss/libraries/go/services/job-queues
1 result
Select Git revision
  • master
  • v1.0.0
  • v1.0.1
  • v1.1.0
  • v1.10.0
  • v1.10.1
  • v1.10.2
  • v1.11.0
  • v1.12.0
  • v1.12.1
  • v1.12.2
  • v1.12.3
  • v1.12.4
  • v1.12.5
  • v1.12.6
  • v1.12.7
  • v1.12.8
  • v1.13.0
  • v1.13.1
  • v1.13.2
  • v1.14.0
  • v1.15.0
  • v1.15.1
  • v1.15.10
  • v1.15.11
  • v1.15.12
  • v1.15.13
  • v1.15.14
  • v1.15.15
  • v1.15.16
  • v1.15.17
  • v1.15.2
  • v1.15.3
  • v1.15.4
  • v1.15.5
  • v1.15.6
  • v1.15.7
  • v1.15.8
  • v1.15.9
  • v1.16.0
  • v1.16.1
  • v1.17.0
  • v1.18.0
  • v1.18.1
  • v1.18.2
  • v1.19.0
  • v1.19.1
  • v1.19.2
  • v1.19.3
  • v1.19.4
  • v1.2.0
  • v1.20.0
  • v1.20.1
  • v1.20.2
  • v1.20.3
  • v1.21.0
  • v1.21.1
  • v1.22.0
  • v1.23.0
  • v1.23.1
  • v1.23.2
  • v1.3.0
  • v1.3.1
  • v1.3.2
  • v1.4.0
  • v1.5.0
  • v1.5.1
  • v1.6.0
  • v1.6.1
  • v1.7.0
  • v1.7.1
  • v1.7.2
  • v1.7.3
  • v1.8.0
  • v1.8.1
  • v1.9.0
76 results
Show changes
Commits on Source (6)
watch_file $(find . -name "*.nix" -printf '"%p" ') watch_file "./flake.nix" "./nix/scripts/build-cover-report.nix" "./nix/scripts/deploy.nix" "./nix/scripts/check-code.nix" "./nix/scripts/common.nix" "./nix/scripts/run-tests.nix" "./nix/scripts/run-ci-tests.nix" "./nix/scripts/run-extended-tests.nix" "./nix/scripts/clean-up.nix" "./nix/scripts/go-task.nix"
use flake use flake
# THIS FILE IS AUTOGENERATED BY THE DEVENVSHELL
# DO NOT EDIT THIS FILE MANUALLY
# INSTEAD EDIT THE DEVENVSHELL CONFIGURATION FILE devenv.nix
# AND OPEN A SHELL WITH THE COMMAND devenv shell
#
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 NIXOS_VERSION: "23.11"
# https://github.com/nix-community/NUR/blob/master/repos.json
NIXOS_VERSION: "23.05"
NIXPKGS_ALLOW_UNFREE: "1" NIXPKGS_ALLOW_UNFREE: "1"
NIXPKGS_ALLOW_INSECURE: "1" NIXPKGS_ALLOW_INSECURE: "1"
GIT_DEPTH: 10 GIT_DEPTH: 10
...@@ -22,13 +11,6 @@ stages: ...@@ -22,13 +11,6 @@ stages:
- test - test
- deploy - deploy
#before_script:
#- 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
#- cat .env-gitlab-ci
#- env
#- nix shell nixpkgs#docker-client -c docker info
after_script: after_script:
- if [ -f .env-gitlab-ci ]; then rm .env-gitlab-ci; fi - if [ -f .env-gitlab-ci ]; then rm .env-gitlab-ci; fi
......
...@@ -4,10 +4,7 @@ ...@@ -4,10 +4,7 @@
<option name="autoReloadType" value="SELECTIVE" /> <option name="autoReloadType" value="SELECTIVE" />
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="9979eb22-471e-4f2f-b624-fd3edb5e8c6e" name="Changes" comment=""> <list default="true" id="9979eb22-471e-4f2f-b624-fd3edb5e8c6e" name="Changes" comment="" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/manager_test.go" beforeDir="false" afterPath="$PROJECT_DIR$/manager_test.go" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
...@@ -28,10 +25,10 @@ ...@@ -28,10 +25,10 @@
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" /> <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component> </component>
<component name="PhpWorkspaceProjectConfiguration" interpreter_name="PHP 8.2" /> <component name="PhpWorkspaceProjectConfiguration" interpreter_name="PHP 8.2" />
<component name="ProjectColorInfo"><![CDATA[{ <component name="ProjectColorInfo">{
"customColor": "", &quot;customColor&quot;: &quot;&quot;,
"associatedIndex": 8 &quot;associatedIndex&quot;: 8
}]]></component> }</component>
<component name="ProjectId" id="2fGcSxoYpsPbNVbRh8sUxQtBiHv" /> <component name="ProjectId" id="2fGcSxoYpsPbNVbRh8sUxQtBiHv" />
<component name="ProjectViewState"> <component name="ProjectViewState">
<option name="flattenModules" value="true" /> <option name="flattenModules" value="true" />
...@@ -41,37 +38,37 @@ ...@@ -41,37 +38,37 @@
<option name="sortByType" value="true" /> <option name="sortByType" value="true" />
<option name="sortKey" value="BY_TYPE" /> <option name="sortKey" value="BY_TYPE" />
</component> </component>
<component name="PropertiesComponent"><![CDATA[{ <component name="PropertiesComponent">{
"keyToString": { &quot;keyToString&quot;: {
"DefaultGoTemplateProperty": "Go File", &quot;DefaultGoTemplateProperty&quot;: &quot;Go File&quot;,
"Go Test.TestDummyRunnable in gitlab.schukai.com/oss/libraries/go/services/job-queues.executor": "Debug", &quot;Go Test.TestDummyRunnable in gitlab.schukai.com/oss/libraries/go/services/job-queues.executor&quot;: &quot;Debug&quot;,
"Go Test.TestManagerEventHandling in gitlab.schukai.com/oss/libraries/go/services/job-queues.executor": "Debug", &quot;Go Test.TestManagerEventHandling in gitlab.schukai.com/oss/libraries/go/services/job-queues.executor&quot;: &quot;Debug&quot;,
"Go Test.TestResetStats in gitlab.schukai.com/oss/libraries/go/services/job-queues.executor": "Debug", &quot;Go Test.TestResetStats in gitlab.schukai.com/oss/libraries/go/services/job-queues.executor&quot;: &quot;Debug&quot;,
"Go Test.TestRoundTrip in gitlab.schukai.com/oss/libraries/go/services/job-queues.executor": "Debug", &quot;Go Test.TestRoundTrip in gitlab.schukai.com/oss/libraries/go/services/job-queues.executor&quot;: &quot;Debug&quot;,
"Go Test.TestScheduleJob in gitlab.schukai.com/oss/libraries/go/services/job-queues.executor": "Debug", &quot;Go Test.TestScheduleJob in gitlab.schukai.com/oss/libraries/go/services/job-queues.executor&quot;: &quot;Debug&quot;,
"Go Test.TestStructure in gitlab.schukai.com/oss/libraries/go/services/job-queues.executor": "Debug", &quot;Go Test.TestStructure in gitlab.schukai.com/oss/libraries/go/services/job-queues.executor&quot;: &quot;Debug&quot;,
"Go Test.TestTimeFunctionSame in gitlab.schukai.com/oss/libraries/go/services/job-queues.executor": "Debug", &quot;Go Test.TestTimeFunctionSame in gitlab.schukai.com/oss/libraries/go/services/job-queues.executor&quot;: &quot;Debug&quot;,
"Go Test.TestWriteToDB1 in gitlab.schukai.com/oss/libraries/go/services/job-queues.executor": "Debug", &quot;Go Test.TestWriteToDB1 in gitlab.schukai.com/oss/libraries/go/services/job-queues.executor&quot;: &quot;Debug&quot;,
"Go Test.TestWriteToDB2 in gitlab.schukai.com/oss/libraries/go/services/job-queues.executor": "Debug", &quot;Go Test.TestWriteToDB2 in gitlab.schukai.com/oss/libraries/go/services/job-queues.executor&quot;: &quot;Debug&quot;,
"Go Test.TestWriteToDB4 in gitlab.schukai.com/oss/libraries/go/services/job-queues.executor": "Debug", &quot;Go Test.TestWriteToDB4 in gitlab.schukai.com/oss/libraries/go/services/job-queues.executor&quot;: &quot;Debug&quot;,
"Go Test.go test gitlab.schukai.com/oss/libraries/go/services/job-queues.executor": "Debug", &quot;Go Test.go test gitlab.schukai.com/oss/libraries/go/services/job-queues.executor&quot;: &quot;Debug&quot;,
"RunOnceActivity.ShowReadmeOnStart": "true", &quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
"RunOnceActivity.go.formatter.settings.were.checked": "true", &quot;RunOnceActivity.go.formatter.settings.were.checked&quot;: &quot;true&quot;,
"RunOnceActivity.go.migrated.go.modules.settings": "true", &quot;RunOnceActivity.go.migrated.go.modules.settings&quot;: &quot;true&quot;,
"SHARE_PROJECT_CONFIGURATION_FILES": "true", &quot;SHARE_PROJECT_CONFIGURATION_FILES&quot;: &quot;true&quot;,
"git-widget-placeholder": "master", &quot;git-widget-placeholder&quot;: &quot;master&quot;,
"go.import.settings.migrated": "true", &quot;go.import.settings.migrated&quot;: &quot;true&quot;,
"go.sdk.automatically.set": "true", &quot;go.sdk.automatically.set&quot;: &quot;true&quot;,
"last_opened_file_path": "/home/vs/workspaces/oss/go-libs/job-queues/nix/scripts", &quot;last_opened_file_path&quot;: &quot;/home/vs/workspaces/oss/go-libs/job-queues/nix/scripts&quot;,
"node.js.detected.package.eslint": "true", &quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
"node.js.detected.package.tslint": "true", &quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
"node.js.selected.package.eslint": "(autodetect)", &quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
"node.js.selected.package.tslint": "(autodetect)", &quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
"nodejs_package_manager_path": "npm", &quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
"settings.editor.selected.configurable": "http.proxy", &quot;settings.editor.selected.configurable&quot;: &quot;http.proxy&quot;,
"vue.rearranger.settings.migration": "true" &quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
} }
}]]></component> }</component>
<component name="RecentsManager"> <component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS"> <key name="CopyFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/nix/scripts" /> <recent name="$PROJECT_DIR$/nix/scripts" />
...@@ -86,7 +83,7 @@ ...@@ -86,7 +83,7 @@
<module name="job-queues" /> <module name="job-queues" />
<working_directory value="$PROJECT_DIR$" /> <working_directory value="$PROJECT_DIR$" />
<go_parameters value="-i" /> <go_parameters value="-i" />
<kind /> <kind value="FILE" />
<directory value="$PROJECT_DIR$" /> <directory value="$PROJECT_DIR$" />
<filePath value="$PROJECT_DIR$" /> <filePath value="$PROJECT_DIR$" />
<method v="2" /> <method v="2" />
...@@ -150,7 +147,7 @@ ...@@ -150,7 +147,7 @@
<module name="job-queues" /> <module name="job-queues" />
<working_directory value="$PROJECT_DIR$" /> <working_directory value="$PROJECT_DIR$" />
<go_parameters value="-i" /> <go_parameters value="-i" />
<kind /> <kind value="DIRECTORY" />
<directory value="$PROJECT_DIR$" /> <directory value="$PROJECT_DIR$" />
<filePath value="$PROJECT_DIR$" /> <filePath value="$PROJECT_DIR$" />
<framework value="gotest" /> <framework value="gotest" />
......
...@@ -5,7 +5,6 @@ package jobqueue ...@@ -5,7 +5,6 @@ package jobqueue
import ( import (
"errors" "errors"
"fmt"
"gorm.io/gorm" "gorm.io/gorm"
"strings" "strings"
"time" "time"
...@@ -20,7 +19,6 @@ func (s *JobSyncer) CheckAndSaveOrUpdate(job JobPersistence) error { ...@@ -20,7 +19,6 @@ func (s *JobSyncer) CheckAndSaveOrUpdate(job JobPersistence) error {
} }
db := s.manager.database db := s.manager.database
fmt.Println("Database: ", db)
var existing JobPersistence var existing JobPersistence
result := db.Where("id = ?", job.GetID()).First(&existing) result := db.Where("id = ?", job.GetID()).First(&existing)
......
...@@ -34,7 +34,7 @@ in ...@@ -34,7 +34,7 @@ in
exit 1 exit 1
fi fi
echo_step "Running go test" echo_step "Running go-licenses"
readonly defaultPacke=$(awk -F ' ' '/^module / { print $2 }' ./go.mod) readonly defaultPacke=$(awk -F ' ' '/^module / { print $2 }' ./go.mod)
${pkgs.go-licenses}/bin/go-licenses save "$defaultPacke" --ignore "gitlab.schukai.com" --force --save_path ./licenses/ ${pkgs.go-licenses}/bin/go-licenses save "$defaultPacke" --ignore "gitlab.schukai.com" --force --save_path ./licenses/
...@@ -45,13 +45,6 @@ in ...@@ -45,13 +45,6 @@ in
exit 1 exit 1
fi fi
echo_step "Running go fmt"
if ! ${pkgs.go}/bin/go fmt .
then
echo_fail "go fmt failed"
exit 1
fi
echo_step "Running go mod tidy" echo_step "Running go mod tidy"
if ! ${pkgs.go}/bin/go mod tidy if ! ${pkgs.go}/bin/go mod tidy
then then
......
...@@ -49,10 +49,18 @@ in ...@@ -49,10 +49,18 @@ in
exit 1 exit 1
fi fi
${pkgs.git}/bin/git fetch --prune --prune-tags ${pkgs.git}/bin/git fetch --prune --prune-tags
echo_step "Bumping version" echo_step "Bumping version"
gitVersion=v$(version predict) gitVersion=$(version predict --exit-code-if-no-bump)
if [ -z "$gitVersion" ]; then
echo_ok "There is no version bump."
echo_ok "done"
exit 0
fi
gitVersion="v$gitVersion"
${pkgs.git}/bin/git tag -a $gitVersion -m"chore: bump version" ${pkgs.git}/bin/git tag -a $gitVersion -m"chore: bump version"
${pkgs.git}/bin/git --no-pager log --decorate=short --pretty=oneline -n 5 ${pkgs.git}/bin/git --no-pager log --decorate=short --pretty=oneline -n 5
${pkgs.git}/bin/git push -o ci.skip origin ''${CI_COMMIT_REF_NAME} --tags ${pkgs.git}/bin/git push -o ci.skip origin ''${CI_COMMIT_REF_NAME} --tags
......
{pkgs}: let {pkgs}: let
taskfile = builtins.toFile "taskfile.yml" '' taskfile = pkgs.writeTextFile {
version: '3' name = "taskfile.yml";
text = ''
version: '3'
tasks: tasks:
default: default:
cmds: cmds:
- task --list - task --list
silent: true silent: true
run-tests: run-tests:
desc: Execute all tests. desc: Execute all tests.
aliases: aliases:
- rt - rt
env: env:
TEST_BY_TASK: true TEST_BY_TASK: true
USER_WORKING_DIR: "{{.USER_WORKING_DIR}}" USER_WORKING_DIR: "{{.USER_WORKING_DIR}}"
cmds: cmds:
- run-tests - run-tests
silent: true silent: true
run-extended-tests: run-extended-tests:
desc: Execute all tests including cover, bench and race tests. desc: Execute all tests including cover, bench and race tests.
aliases: aliases:
- ret - ret
env: env:
TEST_BY_TASK: true TEST_BY_TASK: true
USER_WORKING_DIR: "{{.USER_WORKING_DIR}}" USER_WORKING_DIR: "{{.USER_WORKING_DIR}}"
cmds: cmds:
- run-extended-tests - run-extended-tests
silent: true silent: true
build-cover-report: build-cover-report:
desc: Build coverage report. desc: Build coverage report.
aliases: aliases:
- cr - cr
env: env:
TEST_BY_TASK: true TEST_BY_TASK: true
cmds: cmds:
- build-cover-report - build-cover-report
silent: true silent: true
check-code: check-code:
desc: Check code style, linting, and formatting. desc: Check code style, linting, and formatting.
aliases: aliases:
- cc - cc
env: env:
USER_WORKING_DIR: "{{.USER_WORKING_DIR}}" USER_WORKING_DIR: "{{.USER_WORKING_DIR}}"
cmds: cmds:
- check-code - check-code
silent: true silent: true
git-commit: git-commit:
desc: Commit changes. desc: Commit changes.
aliases: aliases:
- gc - gc
- commit - commit
cmds: cmds:
- check-code - check-code
- cd "{{.USER_WORKING_DIR}}" && cd $(git rev-parse --show-toplevel) && nix run git+https://gitlab.schukai.com/schukai/entwicklung/nix-flakes#git-commit --no-write-lock-file - cd "{{.USER_WORKING_DIR}}" && cd $(${pkgs.git}/bin/git rev-parse --show-toplevel) && nix run git+https://gitlab.schukai.com/schukai/entwicklung/nix-flakes#git-commit --no-write-lock-file
silent: true silent: true
env: env:
USER_WORKING_DIR: "{{.USER_WORKING_DIR}}" USER_WORKING_DIR: "{{.USER_WORKING_DIR}}"
'';
};
'';
in in
pkgs.writeShellScriptBin "task" '' pkgs.writeShellScriptBin "task" ''
${pkgs.go-task}/bin/task -t "${taskfile}" "$@" ${pkgs.go-task}/bin/task -t "${taskfile}" "$@"
......