Skip to content

Commit

Permalink
feat(build): #37 update repo
Browse files Browse the repository at this point in the history
- Update repo to the latest `Makes` version

Signed-off-by: Robin Quintero <rohaquinlop301@gmail.com>
  • Loading branch information
rohaquinlop authored and Robin Quintero committed Jan 26, 2024
1 parent 79c0f5b commit 3d40bf7
Show file tree
Hide file tree
Showing 11 changed files with 288 additions and 169 deletions.
39 changes: 13 additions & 26 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ jobs:
- uses: docker://ghcr.io/fluidattacks/makes/amd64:latest
name: /api/deploy
with:
set-safe-directory: /github/workspace
args: m . /api/deploy dev
args: sh -c "chown -R root:root /github/workspace && m . /api/deploy dev"
env:
STACKHERO_SERVICE_ID: ${{ secrets.STACKHERO_SERVICE_ID }}
STACKHERO_PASSWORD: ${{ secrets.STACKHERO_PASSWORD }}
Expand All @@ -28,8 +27,7 @@ jobs:
- uses: docker://ghcr.io/fluidattacks/makes/amd64:latest
name: /formatBash
with:
set-safe-directory: /github/workspace
args: m . /formatBash
args: sh -c "chown -R root:root /github/workspace && m . /formatBash"

formatMarkdown:
runs-on: ubuntu-latest
Expand All @@ -38,8 +36,7 @@ jobs:
- uses: docker://ghcr.io/fluidattacks/makes/amd64:latest
name: /formatMarkdown
with:
set-safe-directory: /github/workspace
args: m . /formatMarkdown
args: sh -c "chown -R root:root /github/workspace && m . /formatMarkdown"

formatNix:
runs-on: ubuntu-latest
Expand All @@ -48,8 +45,7 @@ jobs:
- uses: docker://ghcr.io/fluidattacks/makes/amd64:latest
name: /formatNix
with:
set-safe-directory: /github/workspace
args: m . /formatNix
args: sh -c "chown -R root:root /github/workspace && m . /formatNix"

formatPython_default:
runs-on: ubuntu-latest
Expand All @@ -58,8 +54,7 @@ jobs:
- uses: docker://ghcr.io/fluidattacks/makes/amd64:latest
name: /formatPython/default
with:
set-safe-directory: /github/workspace
args: m . /formatPython/default
args: sh -c "chown -R root:root /github/workspace && m . /formatPython/default"

lintBash:
runs-on: ubuntu-latest
Expand All @@ -70,8 +65,7 @@ jobs:
- uses: docker://ghcr.io/fluidattacks/makes/amd64:latest
name: /lintBash
with:
set-safe-directory: /github/workspace
args: m . /lintBash
args: sh -c "chown -R root:root /github/workspace && m . /lintBash"

lintGitCommitMsg:
runs-on: ubuntu-latest
Expand All @@ -82,8 +76,7 @@ jobs:
- uses: docker://ghcr.io/fluidattacks/makes/amd64:latest
name: /lintGitCommitMsg
with:
set-safe-directory: /github/workspace
args: m . /lintGitCommitMsg
args: sh -c "chown -R root:root /github/workspace && m . /lintGitCommitMsg"

lintGitMailMap:
runs-on: ubuntu-latest
Expand All @@ -94,8 +87,7 @@ jobs:
- uses: docker://ghcr.io/fluidattacks/makes/amd64:latest
name: /lintGitMailMap
with:
set-safe-directory: /github/workspace
args: m . /lintGitMailMap
args: sh -c "chown -R root:root /github/workspace && m . /lintGitMailMap"

lintMarkdown_readme:
runs-on: ubuntu-latest
Expand All @@ -104,8 +96,7 @@ jobs:
- uses: docker://ghcr.io/fluidattacks/makes/amd64:latest
name: /lintMarkdown/readme
with:
set-safe-directory: /github/workspace
args: m . /lintMarkdown/readme
args: sh -c "chown -R root:root /github/workspace && m . /lintMarkdown/readme"

lintNix:
runs-on: ubuntu-latest
Expand All @@ -114,8 +105,7 @@ jobs:
- uses: docker://ghcr.io/fluidattacks/makes/amd64:latest
name: /lintNix
with:
set-safe-directory: /github/workspace
args: m . /lintNix
args: sh -c "chown -R root:root /github/workspace && m . /lintNix"

lintPython_module_api:
runs-on: ubuntu-latest
Expand All @@ -124,8 +114,7 @@ jobs:
- uses: docker://ghcr.io/fluidattacks/makes/amd64:latest
name: /lintPython/module/api
with:
set-safe-directory: /github/workspace
args: m . /lintPython/module/api
args: sh -c "chown -R root:root /github/workspace && m . /lintPython/module/api"

lintWithLizard_api:
runs-on: ubuntu-latest
Expand All @@ -134,8 +123,7 @@ jobs:
- uses: docker://ghcr.io/fluidattacks/makes/amd64:latest
name: /lintWithLizard/api
with:
set-safe-directory: /github/workspace
args: m . /lintWithLizard/api
args: sh -c "chown -R root:root /github/workspace && m . /lintWithLizard/api"

securePythonWithBandit_api:
runs-on: ubuntu-latest
Expand All @@ -144,8 +132,7 @@ jobs:
- uses: docker://ghcr.io/fluidattacks/makes/amd64:latest
name: /securePythonWithBandit/api
with:
set-safe-directory: /github/workspace
args: m . /securePythonWithBandit/api
args: sh -c "chown -R root:root /github/workspace && m . /securePythonWithBandit/api"
name: dev
on:
pull_request:
Expand Down
39 changes: 13 additions & 26 deletions .github/workflows/prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ jobs:
- uses: docker://ghcr.io/fluidattacks/makes/amd64:latest
name: /api/deploy
with:
set-safe-directory: /github/workspace
args: m . /api/deploy prod
args: sh -c "chown -R root:root /github/workspace && m . /api/deploy prod"
env:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}
STACKHERO_SERVICE_ID: ${{ secrets.STACKHERO_SERVICE_ID }}
Expand All @@ -29,8 +28,7 @@ jobs:
- uses: docker://ghcr.io/fluidattacks/makes/amd64:latest
name: /formatBash
with:
set-safe-directory: /github/workspace
args: m . /formatBash
args: sh -c "chown -R root:root /github/workspace && m . /formatBash"
env:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}

Expand All @@ -41,8 +39,7 @@ jobs:
- uses: docker://ghcr.io/fluidattacks/makes/amd64:latest
name: /formatMarkdown
with:
set-safe-directory: /github/workspace
args: m . /formatMarkdown
args: sh -c "chown -R root:root /github/workspace && m . /formatMarkdown"
env:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}

Expand All @@ -53,8 +50,7 @@ jobs:
- uses: docker://ghcr.io/fluidattacks/makes/amd64:latest
name: /formatNix
with:
set-safe-directory: /github/workspace
args: m . /formatNix
args: sh -c "chown -R root:root /github/workspace && m . /formatNix"
env:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}

Expand All @@ -65,8 +61,7 @@ jobs:
- uses: docker://ghcr.io/fluidattacks/makes/amd64:latest
name: /formatPython/default
with:
set-safe-directory: /github/workspace
args: m . /formatPython/default
args: sh -c "chown -R root:root /github/workspace && m . /formatPython/default"
env:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}

Expand All @@ -79,8 +74,7 @@ jobs:
- uses: docker://ghcr.io/fluidattacks/makes/amd64:latest
name: /lintBash
with:
set-safe-directory: /github/workspace
args: m . /lintBash
args: sh -c "chown -R root:root /github/workspace && m . /lintBash"
env:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}

Expand All @@ -93,8 +87,7 @@ jobs:
- uses: docker://ghcr.io/fluidattacks/makes/amd64:latest
name: /lintGitCommitMsg
with:
set-safe-directory: /github/workspace
args: m . /lintGitCommitMsg
args: sh -c "chown -R root:root /github/workspace && m . /lintGitCommitMsg"
env:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}

Expand All @@ -107,8 +100,7 @@ jobs:
- uses: docker://ghcr.io/fluidattacks/makes/amd64:latest
name: /lintGitMailMap
with:
set-safe-directory: /github/workspace
args: m . /lintGitMailMap
args: sh -c "chown -R root:root /github/workspace && m . /lintGitMailMap"
env:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}

Expand All @@ -119,8 +111,7 @@ jobs:
- uses: docker://ghcr.io/fluidattacks/makes/amd64:latest
name: /lintMarkdown/readme
with:
set-safe-directory: /github/workspace
args: m . /lintMarkdown/readme
args: sh -c "chown -R root:root /github/workspace && m . /lintMarkdown/readme"
env:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}

Expand All @@ -131,8 +122,7 @@ jobs:
- uses: docker://ghcr.io/fluidattacks/makes/amd64:latest
name: /lintNix
with:
set-safe-directory: /github/workspace
args: m . /lintNix
args: sh -c "chown -R root:root /github/workspace && m . /lintNix"
env:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}

Expand All @@ -143,8 +133,7 @@ jobs:
- uses: docker://ghcr.io/fluidattacks/makes/amd64:latest
name: /lintPython/module/api
with:
set-safe-directory: /github/workspace
args: m . /lintPython/module/api
args: sh -c "chown -R root:root /github/workspace && m . /lintPython/module/api"
env:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}

Expand All @@ -155,8 +144,7 @@ jobs:
- uses: docker://ghcr.io/fluidattacks/makes/amd64:latest
name: /lintWithLizard/api
with:
set-safe-directory: /github/workspace
args: m . /lintWithLizard/api
args: sh -c "chown -R root:root /github/workspace && m . /lintWithLizard/api"
env:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}

Expand All @@ -167,8 +155,7 @@ jobs:
- uses: docker://ghcr.io/fluidattacks/makes/amd64:latest
name: /securePythonWithBandit/api
with:
set-safe-directory: /github/workspace
args: m . /securePythonWithBandit/api
args: sh -c "chown -R root:root /github/workspace && m . /securePythonWithBandit/api"
env:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}
name: prod
Expand Down
1 change: 1 addition & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ Daniel Salazar <podany270895@gmail.com> Daniel Salazar <dsalazar@fluidattacks.co
Daniel Salazar <podany270895@gmail.com> Daniel Salazar <podany270895@gmail.com>
Github Octocat <noreply@github.com> GitHub <noreply@github.com>
Jason Chavarria <jchavarria@fluidattacks.com> Jason Chavarria <jchavarria@fluidattacks.com>
Robin Quintero <rohaquinlop301@gmail.com> Robin Quintero <rquintero@fluidattacks.com>
37 changes: 32 additions & 5 deletions api/env/main.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
{makePythonPypiEnvironment, ...}:
makePythonPypiEnvironment {
name = "api-env";
sourcesYaml = ./pypi-sources.yaml;
}
{makePythonEnvironment, ...}: let
overrideWithHome = pkg: super:
super.${pkg}.overridePythonAttrs (
old: {
preBuild = ''
export HOME="."
'';
}
);
packagesToOverride = [
"pytest"
"pylint"
"pylint-plugin-utils"
"pylint-django"
"pylint-celery"
"pylint-flask"
];
in
makePythonEnvironment {
pythonProjectDir = ./.;
pythonVersion = "3.11";
overrides = self: super:
builtins.listToAttrs (
builtins.map (
pkg: {
name = pkg;
value = overrideWithHome pkg super;
}
)
packagesToOverride
);
}
Loading

0 comments on commit 3d40bf7

Please sign in to comment.