version: 0.2 # Buildspec Reference Doc: https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec-ref-syntax # run-as: Linux-user-name # env: # https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec.env # shell: shell-tag # variables: # key: "value" # key: "value" # parameter-store: # key: "value" # key: "value" # exported-variables: # - variable # - variable # secrets-manager: # key: secret-id:json-key:version-stage:version-id # git-credential-helper: no | yes # proxy: # https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec.proxy # upload-artifacts: no | yes # logs: no | yes # batch: # https://docs.aws.amazon.com/codebuild/latest/userguide/batch-build-buildspec.html#build-spec.batch # fast-fail: false | true # build-list: # build-matrix: # build-graph: phases: install: # run-as: Linux-user-name # on-failure: ABORT | CONTINUE runtime-versions: python: 3.8 # runtime: version # commands: # - command # - command # finally: # - command # - command # pre_build: # run-as: Linux-user-name # on-failure: ABORT | CONTINUE # commands: # - command # - command # finally: # - command # - command build: # run-as: Linux-user-name on-failure: ABORT commands: - echo "Starting SAM packaging `date` in `pwd`" - aws cloudformation package --template-file template.yaml --s3-bucket $BUILD_OUTPUT_BUCKET --output-template-file packaged.yaml # finally: # - command # - command post_build: # run-as: Linux-user-name # on-failure: ABORT | CONTINUE commands: - echo "SAM packaging completed on `date`" # finally: # - command # - command # reports: # https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec.reports # report-group-name-or-arn: # files: # - location # - location # base-directory: location # discard-paths: no | yes # file-format: report-format artifacts: # https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec.artifacts files: - packaged.yaml # - location name: artifact-name discard-paths: yes # base-directory: location # exclude-paths: excluded paths # enable-symlinks: no | yes # s3-prefix: prefix # secondary-artifacts: # artifactIdentifier: # files: # - location # - location # name: secondary-artifact-name # discard-paths: no | yes # base-directory: location # artifactIdentifier: # files: # - location # - location # discard-paths: no | yes # base-directory: location # cache: # https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec.cache # paths: # # - path # # - path