Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Using artifacts in s3 deploy pipes

dave_grix_pavers_co_uk
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 16, 2019

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
Daniel Santos
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 17, 2019

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.

dave_grix_pavers_co_uk
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 20, 2019

Thank you

Like Daniel Santos likes this
Daniel Santos
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 20, 2019

You are welcome!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events