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

fix: update ci #14

parent 9216f597
No related branches found
No related tags found
No related merge requests found
...@@ -8,15 +8,12 @@ ...@@ -8,15 +8,12 @@
modulesPath, modulesPath,
... ...
}: let }: let
taskfileYaml = let taskfileYaml = let
ciJobToken = builtins.getEnv "CI_JOB_TOKEN"; ciJobToken = builtins.getEnv "CI_JOB_TOKEN";
gitCommit= if ciJobToken == "" then gitCommit =
(builtins.getFlake "git+https://gitlab.schukai.com/schukai/entwicklung/nix-flakes").packages.${builtins.currentSystem}.git-commit if ciJobToken == ""
else then (builtins.getFlake "git+https://gitlab.schukai.com/schukai/entwicklung/nix-flakes").packages.${builtins.currentSystem}.git-commit
""; else "";
goPkgReleaseData = import ./project.nix; goPkgReleaseData = import ./project.nix;
goPkgName = goPkgReleaseData.name or "goPkg"; goPkgName = goPkgReleaseData.name or "goPkg";
...@@ -67,7 +64,7 @@ tasks: ...@@ -67,7 +64,7 @@ tasks:
command = "${pkgs.alejandra}/bin/alejandra" command = "${pkgs.alejandra}/bin/alejandra"
options = [] options = []
includes = [ "*.nix" ] includes = [ "*.nix" ]
excludes = [ "devenv.nix" ] #excludes = [ "devenv.nix" ]
[formatter.go] [formatter.go]
command = "${pkgs.go}/bin/gofmt" command = "${pkgs.go}/bin/gofmt"
...@@ -223,7 +220,8 @@ in { ...@@ -223,7 +220,8 @@ in {
env.APP_NAME = let env.APP_NAME = let
goPkgReleaseData = import ./project.nix; goPkgReleaseData = import ./project.nix;
goPkgMnemonic = goPkgReleaseData.mnemonic or "go-pkg"; goPkgMnemonic = goPkgReleaseData.mnemonic or "go-pkg";
in goPkgMnemonic; in
goPkgMnemonic;
# https://devenv.sh/packages/ # https://devenv.sh/packages/
packages = with pkgs; [ packages = with pkgs; [
...@@ -425,7 +423,6 @@ in { ...@@ -425,7 +423,6 @@ in {
''; '';
scripts.update-files.exec = '' scripts.update-files.exec = ''
#!${pkgs.bash}/bin/bash #!${pkgs.bash}/bin/bash
source common-functions source common-functions
...@@ -495,6 +492,23 @@ in { ...@@ -495,6 +492,23 @@ in {
echo "$hash" echo "$hash"
''; '';
## this script should be run after debugging the ci pipeline
scripts.delete-pipeline.exec = ''
#!${pkgs.bash}/bin/bash
pipeline_list=$(glab ci list)
commit_hashes=$(echo "$pipeline_list" | awk '/#/{print $3}')
for hash in $commit_hashes; do
hh=$(echo "$hash" | cut -d"#" -f2)
echo "found hash: $hh"
glab ci delete "$hh"
done
echo "done"
'';
scripts.build-app.exec = '' scripts.build-app.exec = ''
#!${pkgs.bash}/bin/bash #!${pkgs.bash}/bin/bash
${pkgs.treefmt}/bin/treefmt ${pkgs.treefmt}/bin/treefmt
......
/nix/store/wrp2lsy6h8mzr6fa4n71lqnxw5dliwmc-treefmt.toml /nix/store/f7brr7ah00s9303lhvk338lnyb1ifrys-treefmt.toml
\ No newline at end of file \ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment