-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1413 from dsalaza4/main
feat(cross): #1223 use jobs approach
- Loading branch information
Showing
23 changed files
with
146 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ __nixpkgs__, makeScript, outputs, projectPath, ... }: | ||
let makesVersion = "24.12"; | ||
in { | ||
imports = [ | ||
./tests/commitlint/makes.nix | ||
./tests/computeOnAwsBatch/makes.nix | ||
./tests/makeScript/makes.nix | ||
./tests/makeSearchPaths/makes.nix | ||
./tests/makeTemplate/makes.nix | ||
./tests/secretsForGpgFromEnv/makes.nix | ||
./utils/makePythonLock/makes.nix | ||
./utils/makeRubyLock/makes.nix | ||
]; | ||
|
||
jobs."/" = makeScript { | ||
aliases = [ "m-v${makesVersion}" "makes" "makes-v${makesVersion}" ]; | ||
replace = { | ||
__argMakesSrc__ = projectPath "/"; | ||
__argNix__ = __nixpkgs__.nixVersions.nix_2_15; | ||
}; | ||
entrypoint = '' | ||
__MAKES_SRC__=__argMakesSrc__ \ | ||
__NIX__=__argNix__ \ | ||
python -u __argMakesSrc__/src/cli/main/__main__.py "$@" | ||
''; | ||
searchPaths.source = [ outputs."/cli/env/runtime" ]; | ||
name = "m"; | ||
}; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ makeScript, __nixpkgs__, ... }: { | ||
jobs."/tests/commitlint" = makeScript { | ||
name = "commitlint"; | ||
entrypoint = '' | ||
pushd makes/tests/commitlint | ||
commit_hash="$(git --no-pager log --pretty=%h origin/main..HEAD)" | ||
info "Linting commit $commit_hash" | ||
git log -1 --pretty=%B $commit_hash | commitlint --parser-preset ./parser.js --config ./config.js | ||
''; | ||
searchPaths.bin = [ __nixpkgs__.commitlint __nixpkgs__.git ]; | ||
}; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ computeOnAwsBatch, ... }: { | ||
jobs."/tests/computeOnAwsBatch" = computeOnAwsBatch { | ||
dryRun = true; | ||
allowDuplicates = true; | ||
attempts = 1; | ||
attemptDurationSeconds = 60; | ||
command = [ "foo" ]; | ||
definition = "foo"; | ||
environment = [ ]; | ||
includePositionalArgsInName = true; | ||
name = "foo"; | ||
nextJob = { }; | ||
memory = 1; | ||
parallel = 1; | ||
propagateTags = true; | ||
queue = "foo"; | ||
setup = [ ]; | ||
tags = { }; | ||
vcpus = 1; | ||
}; | ||
} |
4 changes: 2 additions & 2 deletions
4
makes/tests/scriptWithHelp/README.md → makes/tests/makeScript/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# A Script With a Help | ||
|
||
- This is `makes/tests/scriptWithHelp/README.md` | ||
- This is `makes/tests/makeScript/README.md` | ||
- You might be looking at it beautifully rendered on GitHub / GitLab / etc. | ||
- You also might be looking at it beautifully rendedred on the CLI\*. | ||
|
||
\* `m . /tests/scriptWithHelp -h` (or `--help`) | ||
\* `m . /tests/makeScript -h` (or `--help`) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ makeScript, ... }: { | ||
jobs."/tests/makeScript" = makeScript { | ||
entrypoint = "echo A script with a help, call with --help or -h to see it!"; | ||
name = "help"; | ||
help = ./README.md; | ||
}; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ makeDerivation, ... }: { | ||
jobs."/tests/makeSearchPaths" = makeDerivation { | ||
builder = "touch $out"; | ||
name = "test-make-search-paths"; | ||
searchPaths.source = [[ ./template.sh "a" "b" "c" ]]; | ||
}; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ fromYaml, makeTemplate, ... }: | ||
let | ||
testFile = fromYaml (builtins.readFile ./test.yaml); | ||
testString = testFile.testTitle; | ||
in { | ||
jobs."/tests/makeTemplate" = makeTemplate { | ||
replace = { | ||
__argFirst__ = "aaaaaaaaa"; | ||
__argSecond__ = "bbbb"; | ||
__argThird__ = testString; | ||
}; | ||
name = "test-make-template"; | ||
template = ./template.txt; | ||
}; | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ makeScript, outputs, ... }: { | ||
jobs."/tests/secretsForGpgFromEnv" = makeScript { | ||
entrypoint = "echo $secret"; | ||
name = "tests-secrets-for-gpg-from-env"; | ||
searchPaths.source = [ | ||
outputs."/envVars/example" | ||
outputs."/secretsForGpgFromEnv/example" | ||
outputs."/secretsForEnvFromSops/example" | ||
]; | ||
}; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ __nixpkgs__, makeScript, ... }: { | ||
jobs."/utils/makePythonLock" = makeScript { | ||
entrypoint = ./entrypoint.sh; | ||
name = "make-python-lock"; | ||
searchPaths.bin = [ | ||
__nixpkgs__.poetry | ||
__nixpkgs__.python39 | ||
__nixpkgs__.python310 | ||
__nixpkgs__.python311 | ||
__nixpkgs__.python312 | ||
]; | ||
}; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ __nixpkgs__, makeScript, ... }: { | ||
jobs."/utils/makeRubyLock" = makeScript { | ||
entrypoint = ./entrypoint.sh; | ||
name = "make-ruby-lock"; | ||
replace = { | ||
__argParser__ = ./parser.rb; | ||
__argRuby31__ = __nixpkgs__.ruby_3_1; | ||
__argRuby32__ = __nixpkgs__.ruby_3_2; | ||
__argRuby33__ = __nixpkgs__.ruby_3_3; | ||
}; | ||
searchPaths.bin = [ __nixpkgs__.nixVersions.nix_2_15 __nixpkgs__.yj ]; | ||
}; | ||
} |