diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 3370b93d..8bacd111 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -35,22 +35,6 @@ jobs: - name: /deployTerraform/module run: nix-env -if . && m . /deployTerraform/module - linux_dev_example: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@f095bcc56b7c2baf48f3ac70d6d6782f4f553222 - - uses: docker://docker.io/nixos/nix@sha256:c3db4c484f6b1ee6c9bb8ca90307cfbeca8ef88156840911356a677eeaff4845 - name: /dev/example - with: - args: sh -c "chown -R root:root /github/workspace && nix-env -if . && m . /dev/example" - macos_dev_example: - runs-on: macos-latest - steps: - - uses: actions/checkout@f095bcc56b7c2baf48f3ac70d6d6782f4f553222 - - uses: cachix/install-nix-action@6ed004b9ccb68dbc28e7c85bee15fa93dbd214ac - - name: /dev/example - run: nix-env -if . && m . /dev/example - linux_dev_makes: runs-on: ubuntu-latest steps: @@ -388,7 +372,7 @@ jobs: - name: /testTerraform/module run: nix-env -if . && m . /testTerraform/module - linux_computeOnAwsBatch_module: + linux_tests_computeOnAwsBatch: runs-on: ubuntu-latest steps: - uses: actions/checkout@f095bcc56b7c2baf48f3ac70d6d6782f4f553222 @@ -396,7 +380,7 @@ jobs: name: /tests/computeOnAwsBatch with: args: sh -c "chown -R root:root /github/workspace && nix-env -if . && m . /tests/computeOnAwsBatch - macos_computeOnAwsBatch_module: + macos_tests_computeOnAwsBatch: runs-on: macos-latest steps: - uses: actions/checkout@f095bcc56b7c2baf48f3ac70d6d6782f4f553222 diff --git a/.github/workflows/prod.yml b/.github/workflows/prod.yml index b902c5c2..88e30da3 100644 --- a/.github/workflows/prod.yml +++ b/.github/workflows/prod.yml @@ -122,26 +122,6 @@ jobs: env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} - linux_dev_example: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@f095bcc56b7c2baf48f3ac70d6d6782f4f553222 - - uses: docker://docker.io/nixos/nix@sha256:c3db4c484f6b1ee6c9bb8ca90307cfbeca8ef88156840911356a677eeaff4845 - name: /dev/example - with: - args: sh -c "chown -R root:root /github/workspace && nix-env -if . && m . /dev/example" - env: - CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} - macos_dev_example: - runs-on: macos-latest - steps: - - uses: actions/checkout@f095bcc56b7c2baf48f3ac70d6d6782f4f553222 - - uses: cachix/install-nix-action@6ed004b9ccb68dbc28e7c85bee15fa93dbd214ac - - name: /dev/example - run: nix-env -if . && m . /dev/example - env: - CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} - linux_docs_deploy: runs-on: ubuntu-latest steps: @@ -544,7 +524,7 @@ jobs: env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} - linux_computeOnAwsBatch_module: + linux_tests_computeOnAwsBatch: runs-on: ubuntu-latest steps: - uses: actions/checkout@f095bcc56b7c2baf48f3ac70d6d6782f4f553222 @@ -552,7 +532,7 @@ jobs: name: /tests/computeOnAwsBatch with: args: sh -c "chown -R root:root /github/workspace && nix-env -if . && m . /tests/computeOnAwsBatch - macos_computeOnAwsBatch_module: + macos_tests_computeOnAwsBatch: runs-on: macos-latest steps: - uses: actions/checkout@f095bcc56b7c2baf48f3ac70d6d6782f4f553222 diff --git a/makes/container-image/makes.nix b/container/makes.nix similarity index 79% rename from makes/container-image/makes.nix rename to container/makes.nix index 13867708..8638caac 100644 --- a/makes/container-image/makes.nix +++ b/container/makes.nix @@ -1,5 +1,52 @@ { outputs, __nixpkgs__, ... }: { - jobs."/container-image" = __nixpkgs__.dockerTools.buildImage { + deployContainer = { + makesAmd64 = { + credentials = { + token = "GITHUB_TOKEN"; + user = "GITHUB_ACTOR"; + }; + image = "ghcr.io/fluidattacks/makes:amd64"; + src = outputs."/container"; + sign = true; + }; + makesArm64 = { + credentials = { + token = "GITHUB_TOKEN"; + user = "GITHUB_ACTOR"; + }; + image = "ghcr.io/fluidattacks/makes:arm64"; + src = outputs."/container"; + sign = true; + }; + }; + deployContainerManifest = { + makes = { + credentials = { + token = "GITHUB_TOKEN"; + user = "GITHUB_ACTOR"; + }; + image = "ghcr.io/fluidattacks/makes:latest"; + manifests = [ + { + image = "ghcr.io/fluidattacks/makes:amd64"; + platform = { + architecture = "amd64"; + os = "linux"; + }; + } + { + image = "ghcr.io/fluidattacks/makes:arm64"; + platform = { + architecture = "arm64"; + os = "linux"; + }; + } + ]; + sign = true; + tags = [ "24.12" ]; + }; + }; + jobs."/container" = __nixpkgs__.dockerTools.buildImage { config = { Env = [ "HOME=/home/root" @@ -24,7 +71,7 @@ User = "root:root"; WorkingDir = "/working-dir"; }; - name = "container-image"; + name = "container"; tag = "latest"; copyToRoot = __nixpkgs__.buildEnv { diff --git a/default.nix b/default.nix index a0a62180..f31ce15d 100644 --- a/default.nix +++ b/default.nix @@ -3,12 +3,9 @@ let agnostic = import ./src/args/agnostic.nix { inherit system; }; args = agnostic // { - outputs."/cli/env/runtime" = - (import ./makes/cli/env/runtime/makes.nix args).jobs."/cli/env/runtime"; - outputs."/cli/env/runtime/pypi" = - (import ./makes/cli/env/runtime/pypi/makes.nix - args).jobs."/cli/env/runtime/pypi"; + outputs."/src/cli/runtime" = + (import ./src/cli/makes.nix args).jobs."/src/cli/runtime"; projectPath = import ./src/args/project-path args; projectSrc = ./.; }; -in (import ./makes/makes.nix args).jobs."/" +in (import ./src/makes.nix args).jobs."/" diff --git a/makes.nix b/makes.nix index 8940bdae..b5b9a1a6 100644 --- a/makes.nix +++ b/makes.nix @@ -1,7 +1,4 @@ -{ fetchNixpkgs, fetchUrl, makeScript, outputs, projectPath, __nixpkgs__, ... -}: { - imports = [ ./docs/makes.nix ./makes/makes.nix ]; - projectIdentifier = "makes-repo"; +{ fetchNixpkgs, outputs, __nixpkgs__, ... }: { cache = { readNixos = true; extra = { @@ -16,78 +13,12 @@ }; }; }; - deployContainer = { - makesAmd64 = { - credentials = { - token = "GITHUB_TOKEN"; - user = "GITHUB_ACTOR"; - }; - image = "ghcr.io/fluidattacks/makes:amd64"; - src = outputs."/container-image"; - sign = true; - }; - makesArm64 = { - credentials = { - token = "GITHUB_TOKEN"; - user = "GITHUB_ACTOR"; - }; - image = "ghcr.io/fluidattacks/makes:arm64"; - src = outputs."/container-image"; - sign = true; - }; - }; - deployContainerManifest = { - makes = { - credentials = { - token = "GITHUB_TOKEN"; - user = "GITHUB_ACTOR"; - }; - image = "ghcr.io/fluidattacks/makes:latest"; - manifests = [ - { - image = "ghcr.io/fluidattacks/makes:amd64"; - platform = { - architecture = "amd64"; - os = "linux"; - }; - } - { - image = "ghcr.io/fluidattacks/makes:arm64"; - platform = { - architecture = "arm64"; - os = "linux"; - }; - } - ]; - sign = true; - tags = [ "24.12" ]; - }; - }; - deployTerraform = { - modules = { - module = { - src = "/test/terraform/module"; - version = "1.0"; - }; - }; - }; dev = { - example = { bin = [ __nixpkgs__.hello ]; }; makes = { bin = [ __nixpkgs__.just __nixpkgs__.reuse ]; - source = [ outputs."/cli/env/runtime" ]; - }; - }; - envVars = { - example = { - # Don't do this in production, it's unsafe. We do this for testing purposes. - PGP_PRIVATE = builtins.readFile ./makes/tests/secretsForGpgFromEnv/pgp; - PGP_PUBLIC = builtins.readFile ./makes/tests/secretsForGpgFromEnv/pgp.pub; - VAR_NAME = "test"; + source = [ outputs."/src/cli/runtime" ]; }; }; - envVarsForTerraform = { example = { VAR_NAME = "test"; }; }; - extendingMakesDirs = [ "/makes" ]; formatBash = { enable = true; targets = [ "/" ]; @@ -104,10 +35,13 @@ enable = true; targets = [ "/" ]; }; - helloWorld = { - enable = true; - name = "Jane Doe"; - }; + imports = [ + ./container/makes.nix + ./docs/makes.nix + ./src/makes.nix + ./tests/makes.nix + ./utils/makes.nix + ]; inputs = { nixpkgs = fetchNixpkgs { rev = "f88fc7a04249cf230377dd11e04bf125d45e9abe"; @@ -118,60 +52,11 @@ enable = true; targets = [ "/" ]; }; - lintGitMailMap = { enable = true; }; + lintGitMailMap.enable = true; lintNix = { enable = true; targets = [ "/" ]; }; - lintTerraform = { - modules = { - module = { - src = "/test/terraform/module"; - version = "1.0"; - }; - }; - }; - lintWithAjv = { - "test" = { - schema = "/test/lint-with-ajv/schema.json"; - targets = - [ "/test/lint-with-ajv/data.json" "/test/lint-with-ajv/data.yaml" ]; - }; - }; - pipelines = { - example = { - gitlabPath = "/test/pipelines/.gitlab-ci.yaml"; - jobs = [ - { - output = "/lintNix"; - args = [ ]; - } - { - output = "/helloWorld"; - args = [ "1" "2" "3" ]; - } - ]; - }; - }; - secretsForGpgFromEnv = { example = [ "PGP_PUBLIC" "PGP_PRIVATE" ]; }; - secretsForEnvFromSops = { - example = { - manifest = "/makes/tests/secretsForGpgFromEnv/secrets.yaml"; - vars = [ "secret" ]; - }; - }; - secretsForTerraformFromEnv = { example = { test = "VAR_NAME"; }; }; - testLicense = { enable = true; }; - testTerraform = { - modules = { - module = { - setup = [ - outputs."/envVars/example" - outputs."/secretsForTerraformFromEnv/example" - ]; - src = "/test/terraform/module"; - version = "1.0"; - }; - }; - }; + projectIdentifier = "makes-repo"; + testLicense.enable = true; } diff --git a/makes/cli/env/runtime/makes.nix b/makes/cli/env/runtime/makes.nix deleted file mode 100644 index 05826635..00000000 --- a/makes/cli/env/runtime/makes.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ __nixpkgs__, makeSearchPaths, outputs, ... }: { - jobs."/cli/env/runtime" = makeSearchPaths { - bin = [ - __nixpkgs__.cachix - __nixpkgs__.findutils - __nixpkgs__.git - __nixpkgs__.gnutar - __nixpkgs__.gzip - __nixpkgs__.nixVersions.nix_2_15 - __nixpkgs__.openssh - ]; - source = [ outputs."/cli/env/runtime/pypi" ]; - }; -} diff --git a/makes/cli/env/runtime/pypi/makes.nix b/makes/cli/env/runtime/pypi/makes.nix deleted file mode 100644 index c62ba588..00000000 --- a/makes/cli/env/runtime/pypi/makes.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ makePythonEnvironment, ... }: { - jobs."/cli/env/runtime/pypi" = makePythonEnvironment { - pythonProjectDir = ./.; - pythonVersion = "3.11"; - }; -} diff --git a/makes/makes.nix b/makes/makes.nix deleted file mode 100644 index 1d459a05..00000000 --- a/makes/makes.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ __nixpkgs__, makeScript, outputs, projectPath, ... }: -let makesVersion = "24.12"; -in { - imports = [ - ./cli/env/runtime/makes.nix - ./cli/env/runtime/pypi/makes.nix - ./container-image/makes.nix - ./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"; - }; -} diff --git a/src/cli/makes.nix b/src/cli/makes.nix new file mode 100644 index 00000000..fef66164 --- /dev/null +++ b/src/cli/makes.nix @@ -0,0 +1,21 @@ +{ __nixpkgs__, makePythonEnvironment, makeSearchPaths, outputs, ... }: { + jobs = { + "/src/cli/runtime" = makeSearchPaths { + bin = [ + __nixpkgs__.cachix + __nixpkgs__.findutils + __nixpkgs__.git + __nixpkgs__.gnutar + __nixpkgs__.gzip + __nixpkgs__.nixVersions.nix_2_15 + __nixpkgs__.openssh + ]; + source = [ + (makePythonEnvironment { + pythonProjectDir = ./.; + pythonVersion = "3.11"; + }) + ]; + }; + }; +} diff --git a/makes/cli/env/runtime/pypi/poetry.lock b/src/cli/poetry.lock similarity index 100% rename from makes/cli/env/runtime/pypi/poetry.lock rename to src/cli/poetry.lock diff --git a/makes/cli/env/runtime/pypi/pyproject.toml b/src/cli/pyproject.toml similarity index 100% rename from makes/cli/env/runtime/pypi/pyproject.toml rename to src/cli/pyproject.toml diff --git a/src/makes.nix b/src/makes.nix new file mode 100644 index 00000000..39578f86 --- /dev/null +++ b/src/makes.nix @@ -0,0 +1,18 @@ +{ __nixpkgs__, makeScript, projectPath, outputs, ... }: { + imports = [ ./cli/makes.nix ]; + jobs."/" = let makesVersion = "24.12"; + in 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."/src/cli/runtime" ]; + name = "m"; + }; +} diff --git a/test/dev/.envrc b/test/dev/.envrc deleted file mode 100644 index dc2e7605..00000000 --- a/test/dev/.envrc +++ /dev/null @@ -1,2 +0,0 @@ -cd ../../ -source "$(m . /dev/example)/template" diff --git a/makes/tests/commitlint/config.js b/tests/commitlint/config.js similarity index 100% rename from makes/tests/commitlint/config.js rename to tests/commitlint/config.js diff --git a/makes/tests/commitlint/makes.nix b/tests/commitlint/makes.nix similarity index 92% rename from makes/tests/commitlint/makes.nix rename to tests/commitlint/makes.nix index effe267f..77a9a834 100644 --- a/makes/tests/commitlint/makes.nix +++ b/tests/commitlint/makes.nix @@ -2,7 +2,7 @@ jobs."/tests/commitlint" = makeScript { name = "commitlint"; entrypoint = '' - pushd makes/tests/commitlint + pushd tests/commitlint commit_hash="$(git --no-pager log --pretty=%h origin/main..HEAD)" diff --git a/makes/tests/commitlint/parser.js b/tests/commitlint/parser.js similarity index 100% rename from makes/tests/commitlint/parser.js rename to tests/commitlint/parser.js diff --git a/makes/tests/computeOnAwsBatch/makes.nix b/tests/computeOnAwsBatch/makes.nix similarity index 100% rename from makes/tests/computeOnAwsBatch/makes.nix rename to tests/computeOnAwsBatch/makes.nix diff --git a/tests/helloWorld/makes.nix b/tests/helloWorld/makes.nix new file mode 100644 index 00000000..55b56697 --- /dev/null +++ b/tests/helloWorld/makes.nix @@ -0,0 +1,6 @@ +{ + helloWorld = { + enable = true; + name = "Jane Doe"; + }; +} diff --git a/test/lint-with-ajv/data.json b/tests/lintWithAjv/data.json similarity index 100% rename from test/lint-with-ajv/data.json rename to tests/lintWithAjv/data.json diff --git a/test/lint-with-ajv/data.yaml b/tests/lintWithAjv/data.yaml similarity index 100% rename from test/lint-with-ajv/data.yaml rename to tests/lintWithAjv/data.yaml diff --git a/tests/lintWithAjv/makes.nix b/tests/lintWithAjv/makes.nix new file mode 100644 index 00000000..fe7c7345 --- /dev/null +++ b/tests/lintWithAjv/makes.nix @@ -0,0 +1,9 @@ +{ + lintWithAjv = { + "test" = { + schema = "/tests/lintWithAjv/schema.json"; + targets = + [ "/tests/lintWithAjv/data.json" "/tests/lintWithAjv/data.yaml" ]; + }; + }; +} diff --git a/test/lint-with-ajv/schema.json b/tests/lintWithAjv/schema.json similarity index 100% rename from test/lint-with-ajv/schema.json rename to tests/lintWithAjv/schema.json diff --git a/makes/tests/makeScript/README.md b/tests/makeScript/README.md similarity index 82% rename from makes/tests/makeScript/README.md rename to tests/makeScript/README.md index 8d63dad3..c15debdd 100644 --- a/makes/tests/makeScript/README.md +++ b/tests/makeScript/README.md @@ -1,6 +1,6 @@ # A Script With a Help -- This is `makes/tests/makeScript/README.md` +- This is `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\*. diff --git a/makes/tests/makeScript/makes.nix b/tests/makeScript/makes.nix similarity index 100% rename from makes/tests/makeScript/makes.nix rename to tests/makeScript/makes.nix diff --git a/makes/tests/makeSearchPaths/makes.nix b/tests/makeSearchPaths/makes.nix similarity index 100% rename from makes/tests/makeSearchPaths/makes.nix rename to tests/makeSearchPaths/makes.nix diff --git a/makes/tests/makeSearchPaths/template.sh b/tests/makeSearchPaths/template.sh similarity index 100% rename from makes/tests/makeSearchPaths/template.sh rename to tests/makeSearchPaths/template.sh diff --git a/makes/tests/makeTemplate/makes.nix b/tests/makeTemplate/makes.nix similarity index 100% rename from makes/tests/makeTemplate/makes.nix rename to tests/makeTemplate/makes.nix diff --git a/makes/tests/makeTemplate/template.txt b/tests/makeTemplate/template.txt similarity index 100% rename from makes/tests/makeTemplate/template.txt rename to tests/makeTemplate/template.txt diff --git a/makes/tests/makeTemplate/test.yaml b/tests/makeTemplate/test.yaml similarity index 100% rename from makes/tests/makeTemplate/test.yaml rename to tests/makeTemplate/test.yaml diff --git a/tests/makes.nix b/tests/makes.nix new file mode 100644 index 00000000..1565c077 --- /dev/null +++ b/tests/makes.nix @@ -0,0 +1,14 @@ +{ + imports = [ + ./commitlint/makes.nix + ./computeOnAwsBatch/makes.nix + ./helloWorld/makes.nix + ./lintWithAjv/makes.nix + ./makeScript/makes.nix + ./makeSearchPaths/makes.nix + ./makeTemplate/makes.nix + ./pipelines/makes.nix + ./secretsForGpgFromEnv/makes.nix + ./terraform/makes.nix + ]; +} diff --git a/test/pipelines/.gitlab-ci.yaml b/tests/pipelines/.gitlab-ci.yaml similarity index 100% rename from test/pipelines/.gitlab-ci.yaml rename to tests/pipelines/.gitlab-ci.yaml diff --git a/tests/pipelines/makes.nix b/tests/pipelines/makes.nix new file mode 100644 index 00000000..fc40a042 --- /dev/null +++ b/tests/pipelines/makes.nix @@ -0,0 +1,17 @@ +{ + pipelines = { + example = { + gitlabPath = "/tests/pipelines/.gitlab-ci.yaml"; + jobs = [ + { + output = "/lintNix"; + args = [ ]; + } + { + output = "/helloWorld"; + args = [ "1" "2" "3" ]; + } + ]; + }; + }; +} diff --git a/tests/secretsForEnvFromSops/makes.nix b/tests/secretsForEnvFromSops/makes.nix new file mode 100644 index 00000000..a0d1959e --- /dev/null +++ b/tests/secretsForEnvFromSops/makes.nix @@ -0,0 +1,8 @@ +{ + secretsForEnvFromSops = { + example = { + manifest = "/tests/secretsForGpgFromEnv/secrets.yaml"; + vars = [ "secret" ]; + }; + }; +} diff --git a/makes/tests/secretsForGpgFromEnv/makes.nix b/tests/secretsForGpgFromEnv/makes.nix similarity index 51% rename from makes/tests/secretsForGpgFromEnv/makes.nix rename to tests/secretsForGpgFromEnv/makes.nix index 88f5ebe4..4eed1981 100644 --- a/makes/tests/secretsForGpgFromEnv/makes.nix +++ b/tests/secretsForGpgFromEnv/makes.nix @@ -1,4 +1,12 @@ { makeScript, outputs, ... }: { + envVars = { + example = { + # Don't do this in production, it's unsafe. We do this for testing purposes. + PGP_PRIVATE = builtins.readFile ./pgp; + PGP_PUBLIC = builtins.readFile ./pgp.pub; + VAR_NAME = "test"; + }; + }; jobs."/tests/secretsForGpgFromEnv" = makeScript { entrypoint = "echo $secret"; name = "tests-secrets-for-gpg-from-env"; @@ -8,4 +16,5 @@ outputs."/secretsForEnvFromSops/example" ]; }; + secretsForGpgFromEnv.example = [ "PGP_PUBLIC" "PGP_PRIVATE" ]; } diff --git a/makes/tests/secretsForGpgFromEnv/pgp b/tests/secretsForGpgFromEnv/pgp similarity index 100% rename from makes/tests/secretsForGpgFromEnv/pgp rename to tests/secretsForGpgFromEnv/pgp diff --git a/makes/tests/secretsForGpgFromEnv/pgp.pub b/tests/secretsForGpgFromEnv/pgp.pub similarity index 100% rename from makes/tests/secretsForGpgFromEnv/pgp.pub rename to tests/secretsForGpgFromEnv/pgp.pub diff --git a/makes/tests/secretsForGpgFromEnv/secrets.yaml b/tests/secretsForGpgFromEnv/secrets.yaml similarity index 100% rename from makes/tests/secretsForGpgFromEnv/secrets.yaml rename to tests/secretsForGpgFromEnv/secrets.yaml diff --git a/tests/terraform/makes.nix b/tests/terraform/makes.nix new file mode 100644 index 00000000..01b85507 --- /dev/null +++ b/tests/terraform/makes.nix @@ -0,0 +1,32 @@ +{ outputs, ... }: { + deployTerraform = { + modules = { + module = { + src = "/tests/terraform/module"; + version = "1.0"; + }; + }; + }; + envVarsForTerraform.example.VAR_NAME = "test"; + lintTerraform = { + modules = { + module = { + src = "/tests/terraform/module"; + version = "1.0"; + }; + }; + }; + secretsForTerraformFromEnv = { example = { test = "VAR_NAME"; }; }; + testTerraform = { + modules = { + module = { + setup = [ + outputs."/envVars/example" + outputs."/secretsForTerraformFromEnv/example" + ]; + src = "/tests/terraform/module"; + version = "1.0"; + }; + }; + }; +} diff --git a/test/terraform/module/main.tf b/tests/terraform/module/main.tf similarity index 100% rename from test/terraform/module/main.tf rename to tests/terraform/module/main.tf diff --git a/makes/utils/makePythonLock/entrypoint.sh b/utils/makePythonLock/entrypoint.sh similarity index 100% rename from makes/utils/makePythonLock/entrypoint.sh rename to utils/makePythonLock/entrypoint.sh diff --git a/makes/utils/makePythonLock/makes.nix b/utils/makePythonLock/makes.nix similarity index 100% rename from makes/utils/makePythonLock/makes.nix rename to utils/makePythonLock/makes.nix diff --git a/makes/utils/makeRubyLock/entrypoint.sh b/utils/makeRubyLock/entrypoint.sh similarity index 100% rename from makes/utils/makeRubyLock/entrypoint.sh rename to utils/makeRubyLock/entrypoint.sh diff --git a/makes/utils/makeRubyLock/makes.nix b/utils/makeRubyLock/makes.nix similarity index 100% rename from makes/utils/makeRubyLock/makes.nix rename to utils/makeRubyLock/makes.nix diff --git a/makes/utils/makeRubyLock/parser.rb b/utils/makeRubyLock/parser.rb similarity index 100% rename from makes/utils/makeRubyLock/parser.rb rename to utils/makeRubyLock/parser.rb diff --git a/utils/makes.nix b/utils/makes.nix new file mode 100644 index 00000000..c8da7eee --- /dev/null +++ b/utils/makes.nix @@ -0,0 +1 @@ +{ imports = [ ./makePythonLock/makes.nix ./makeRubyLock/makes.nix ]; }