Skip to content

Commit

Permalink
Add jobConfig.yaml to be_next container
Browse files Browse the repository at this point in the history
  • Loading branch information
sbliven committed Nov 25, 2024
1 parent 0bf5974 commit 5bb59aa
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 2 deletions.
1 change: 1 addition & 0 deletions dev/config/backend_next/.env
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ CREATE_DATASET_GROUPS=group1,group2,group3
DELETE_GROUPS=archivemanager
ACCESS_GROUPS_STATIC_VALUES="ess"
CREATE_DATASET_WITH_PID_GROUPS="group2,group3"
JOB_CONFIGURATION_FILE=jobConfig.yaml
DATASET_CREATION_VALIDATION_ENABLED=true
DATASET_CREATION_VALIDATION_REGEX="^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$"
70 changes: 70 additions & 0 deletions dev/config/backend_next/jobConfig.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
configVersion: v1.0 2024-03-01 6f3f38
jobs:
- jobType: archive
create:
auth: "#datasetOwner"
actions:
- actionType: log
- actionType: url
url: http://localhost:3000/api/v3/health?jobid={{id}}
headers:
accept: application/json
- actionType: rabbitmq
hostname: rabbitmq
port: 5672
username: guest
password: guest
exchange: jobs.write
queue: client.jobs.write
key: jobqueue
- actionType: email
auth:
user: user
password: password
to: "{{contactEmail}}"
from: from
subject: "[SciCat] Your {{type}} job was submitted successfully"
bodyTemplateFile: src/common/email-templates/job-template-simplified.html
statusUpdate:
auth: archivemanager
actions:
- actionType: rabbitmq
hostname: rabbitmq
port: 5672
username: guest
password: guest
exchange: jobs.write
queue: client.jobs.write
key: jobqueue
- jobType: public
create:
auth: "#datasetPublic"
actions:
- actionType: validate
request:
jobParams.datasetList[*]:
type: object
required:
- pid
- files
statusUpdate:
auth: archivemanager
- jobType: validate
create:
auth: admin
actions:
- actionType: validate
request:
jobParams.requiredParam:
type: string
jobParams.arrayOfStrings:
type: array
items:
type: string
statusUpdate:
auth: admin
actions:
- actionType: validate
request:
jobResultObject.requiredString:
type: string
5 changes: 3 additions & 2 deletions dev/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ services:
profiles:
- fe

be_next_base:
be_next_base:
build:
context: ../scicat-backend-next/.
target: dev
Expand All @@ -89,10 +89,11 @@ services:
- /home/node/app/node_modules
- /home/node/app/dist
- ../scicat-backend-next/functionalAccounts.json.minimal.example:/home/node/app/functionalAccounts.json
- ./config/backend_next/jobConfig.yaml:/home/node/app/jobConfig.yaml
env_file: ./config/backend_next/.env
command: /bin/sh -c "while true; do sleep 600; done"
profiles:
- never
- never

test_be_next:
extends: be_next_base
Expand Down

0 comments on commit 5bb59aa

Please sign in to comment.