Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor fixes #361

Merged
merged 1 commit into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 38 additions & 38 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,44 +20,6 @@ repos:
- id: detect-aws-credentials
exclude: "^certificates/(.*)$"
args: ["--allow-missing-credentials"]
- repo: local
hooks:
- id: validate-template-dotenv
name: Validate template.env
description: Validate template.env
entry: 'scripts/pre-commit-hooks/validateTemplateDotEnv/launch.bash'
always_run: true
language: script
files: '^(.*)\/services\/(.*)(template\.env)$'
- id: validateDockerComposeNoDuplication
name: validateDockerComposeNoDuplication
description: validateDockerComposeNoDuplication
entry: 'scripts/pre-commit-hooks/validateDockerComposeNoDuplication/launch.bash'
always_run: true
language: script
files: '^(.*)(docker-compose.*\.y([a])?ml)$'
- id: validateMakeComposeSimcoreRuns
name: validateMakeComposeSimcoreRuns
description: validateMakeComposeSimcoreRuns
entry: 'scripts/pre-commit-hooks/validateMakeComposeSimcoreRuns/launch.bash'
always_run: true
language: script
files: '^(.*)\/services\/simcore/(docker-compose.*\.y([a])?ml)$'
- id: no-env-vars-exported-in-critical-pipeline-files
name: no-env-vars-exported-in-critical-pipeline-files
description: no-env-vars-exported-in-critical-pipeline-files
entry: 'scripts/pre-commit-hooks/no-env-vars-exported-in-critical-pipeline-files/launch.bash'
exclude: ^(services/maintenance-page/Makefile)$
always_run: true
language: script
files: '^(.*\/Makefile.*)|(.*\.deploy.sh)|(.*\/services/.*\/.*\.((sh)|(bash)))$'
- id: stack-yml-generated-is-valid
name: stack-yml-generated-is-valid
description: stack-yml-generated-is-valid
entry: 'scripts/pre-commit-hooks/stack-yml-generated-is-valid/launch.bash'
always_run: true
language: script
files: '^((.*)\/services\/simcore\/(.*))|((.*)\/services\/deployment-agent\/(.*))$'
# NOTE: Keep order as pyupgrade (will update code) then pycln (remove unused imports), then isort (sort them) and black (final formatting)
- repo: https://github.com/roy-ht/pre-commit-jupyter
rev: v1.2.1
Expand Down Expand Up @@ -117,3 +79,41 @@ repos:
hooks:
- id: black
name: black format code
- repo: local
hooks:
- id: validate-template-dotenv
name: Validate template.env
description: Validate template.env
entry: 'scripts/pre-commit-hooks/validateTemplateDotEnv/launch.bash'
always_run: true
language: script
files: '^(.*)\/services\/(.*)(template\.env)$'
- id: validateDockerComposeNoDuplication
name: validateDockerComposeNoDuplication
description: validateDockerComposeNoDuplication
entry: 'scripts/pre-commit-hooks/validateDockerComposeNoDuplication/launch.bash'
always_run: true
language: script
files: '^(.*)(docker-compose.*\.y([a])?ml)$'
- id: validateMakeComposeSimcoreRuns
name: validateMakeComposeSimcoreRuns
description: validateMakeComposeSimcoreRuns
entry: 'scripts/pre-commit-hooks/validateMakeComposeSimcoreRuns/launch.bash'
always_run: true
language: script
files: '^(.*)\/services\/simcore/(docker-compose.*\.y([a])?ml)$'
- id: no-env-vars-exported-in-critical-pipeline-files
name: no-env-vars-exported-in-critical-pipeline-files
description: no-env-vars-exported-in-critical-pipeline-files
entry: 'scripts/pre-commit-hooks/no-env-vars-exported-in-critical-pipeline-files/launch.bash'
exclude: ^(services/maintenance-page/Makefile)$
always_run: true
language: script
files: '^(.*\/Makefile.*)|(.*\.deploy.sh)|(.*\/services/.*\/.*\.((sh)|(bash)))$'
- id: stack-yml-generated-is-valid
name: stack-yml-generated-is-valid
description: stack-yml-generated-is-valid
entry: 'scripts/pre-commit-hooks/stack-yml-generated-is-valid/launch.bash'
always_run: true
language: script
files: '^((.*)\/services\/simcore\/(.*))|((.*)\/services\/deployment-agent\/(.*))$'
1 change: 0 additions & 1 deletion services/deployment-agent/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ up-local: up
.PHONY: down
down: ## Stops and remove stack from swarm
-@docker stack rm $(STACK_NAME)
-@docker stack rm ${SIMCORE_STACK_NAME}

.PHONY: ${DEPLOYMENT_AGENT_CONFIG}
${DEPLOYMENT_AGENT_CONFIG}: .env
Expand Down
2 changes: 1 addition & 1 deletion services/deployment-agent/startup_script.bash
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ set -o pipefail

# Argparse via https://stackoverflow.com/a/33826763
workdir=0
debug=1
debug=0
while [[ "$#" -gt 0 ]]; do
case $1 in
-w|--workdir) workdir="$2"; shift ;;
Expand Down