I need to build my scala code and generate jar file using SBT ASSEMBLY and upload the jar into S3 .
# This is a sample build configuration for Scala.
# Check our guides at https://confluence.atlassian.com/x/5Q4SMw for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: bitbucketpipelines/scala-sbt:scala-2.12
pipelines:
default:
- step:
script: # Modify the commands below to build your repository.
- sbt assembly
- step:
name: Deploy
deployment: production
script:
- pipe: atlassian/aws-s3-deploy:0.2.4
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION
S3_BUCKET: 'MyS3Path'
ACL: 'public-read'
LOCAL_PATH: '/opt/atlassian/pipelines/agent/build/target/scala-2.11/'Getting failure as below
<span>aws s3 sync /opt/atlassian/pipelines/agent/build/target/scala-2.11/ s3://MyS3Path/ --acl=public-read</span><span>upload failed: <a href="https://bitbucket.org/oricadatalake/eventstoreingestion/src/2dee0ed7f9b892665fd5b7adf8dc578198a6a555/target/scala-2.11/resolution-cache/eventstoreingestion/eventstoreingestion_2.11/1.0/resolved.xml.properties" target="_blank" rel="noopener noreferrer">target/scala-2.11/resolution-cache/eventstoreingestion/eventstoreingestion_2.11/1.0/resolved.xml.properties</a> to s3://MyS3Path/resolution-cache/eventstoreingestion/eventstoreingestion_2.11/1.0/resolved.xml.properties An error occurred (AccessDenied) when calling the PutObject operation: Access Denied</span><span>Completed 5.6 KiB/~2.8 MiB (0 Bytes/s) with ~14 file(s) remaining (calculating...)</span>
Inside this path "/opt/atlassian/pipelines/agent/build/target/scala-2.11/" I have 2 directories and a JAR file. I just need JAR file to be uploaded into S3