Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Using artifacts in s3 deploy pipes

I have the following pipeline that I am struggling with

 

image: mingc/android-build-box:latest

pipelines:
branches:
development:
- step:
caches:
- gradle
script:
- chmod +x gradlew
- ./gradlew assembleDebug
artifacts:
- app/build/outputs/apk/debug/*.apk
release:
- step:
name: Build and Sign
caches:
- gradle
script:
- chmod +x gradlew
- ./gradlew clean assembleRelease
artifacts:
- app/build/outputs/apk/release/*.apk
- step:
name: Deploy to AWS
deployment: Production
script:
- pipe: atlassian/aws-s3-deploy:0.2.4
variables:
AWS_ACCESS_KEY_ID: 'mykeyid'
AWS_SECRET_ACCESS_KEY: 'myaccess'
AWS_DEFAULT_REGION: 'eu-west-2'
S3_BUCKET: 'mybucket'
LOCAL_PATH: '????'

 

Whatever I try as the local path for my artifact results in a 'local path must be a directory error'

 

How can I deploy my apk to s3? 

1 answer

1 accepted

1 vote
Answer accepted

Hi @dave_grix_pavers_co_uk

Thank you for adding the bitbucket-pipelines.yml file.

Assuming the release > Build and Sign step is correctly creating the files at <BITBUCKET_CLONE_DIR>/app/build/outputs/apk/release/ and the apk files are published, you should have them in the same path on release > Deploy to AWS step.

This should work for your LOCAL_PATH variable:

LOCAL_PATH: './app/build/outputs/apk/release'

 

If that does not work for you, please add the following line in your script section for the release > Deploy to AWS step:

 find ./app/build/outputs/apk/release

and check if you see the apk files there before the pipe.

Like Daniel Santos likes this

You are welcome!

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket Pipelines

What We Learned When We Researched Open Source Vulnerabilities in 7 Popular Coding Languages

...hey are a part of us, shaping how we interact with the world around us. The same holds true for programming languages when we think about how different kinds of vulnerabilities raise their heads in t...

1,225 views 0 3
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you