service: r-builds plugins: - serverless-python-requirements - serverless-step-functions - serverless-pseudo-parameters custom: ${file(./serverless-custom.yml)} package: exclude: - integration/** - builder/** - docs/** # Generated files by other tools - node_modules/** - .npm/** - .cache/** provider: name: aws runtime: python3.8 stage: ${opt:stage, self:custom.defaultStage} deploymentBucket: name: ${self:custom.deploymentBucket} stackTags: ${self:custom.${self:provider.stage}.stackTags} iamRoleStatements: - Effect: Allow Action: - "batch:*" Resource: '*' - Effect: Allow Action: - "s3:*" Resource: - arn:aws:s3:::${self:custom.${self:provider.stage}.s3Bucket} - arn:aws:s3:::${self:custom.${self:provider.stage}.s3Bucket}/* - Effect: Allow Action: - "sns:Publish" Resource: Ref: rBuildsTopic environment: S3_BUCKET: ${self:custom.${self:provider.stage}.s3Bucket} SNS_TOPIC_ARN: Ref: rBuildsTopic JOB_QUEUE_ARN: Ref: rBuildsBatchJobQueue JOB_DEFINITION_ARN_ubuntu_2004: Ref: rBuildsBatchJobDefinitionUbuntu2004 JOB_DEFINITION_ARN_ubuntu_2204: Ref: rBuildsBatchJobDefinitionUbuntu2204 JOB_DEFINITION_ARN_debian_10: Ref: rBuildsBatchJobDefinitionDebian10 JOB_DEFINITION_ARN_debian_11: Ref: rBuildsBatchJobDefinitionDebian11 JOB_DEFINITION_ARN_debian_12: Ref: rBuildsBatchJobDefinitionDebian12 JOB_DEFINITION_ARN_centos_7: Ref: rBuildsBatchJobDefinitionCentos7 JOB_DEFINITION_ARN_centos_8: Ref: rBuildsBatchJobDefinitionCentos8 JOB_DEFINITION_ARN_rhel_9: Ref: rBuildsBatchJobDefinitionRhel9 JOB_DEFINITION_ARN_opensuse_155: Ref: rBuildsBatchJobDefinitionOpensuse155 JOB_DEFINITION_ARN_opensuse_154: Ref: rBuildsBatchJobDefinitionOpensuse154 JOB_DEFINITION_ARN_fedora_37: Ref: rBuildsBatchJobDefinitionFedora37 JOB_DEFINITION_ARN_fedora_38: Ref: rBuildsBatchJobDefinitionFedora38 SUPPORTED_PLATFORMS: ubuntu-2004,ubuntu-2204,debian-10,debian-11,debian-12,centos-7,centos-8,rhel-9,opensuse-154,opensuse-155,fedora-37,fedora-38 functions: queueBuilds: timeout: 90 handler: handler.queue_builds jobQueueStatus: handler: handler.poll_running_jobs finished: handler: handler.finished stepFunctions: stateMachines: ${file(./serverless-stepf.yml)} resources: Resources: ${file(./serverless-resources.yml)}