I got
<span>> Keystore file '/opt/atlassian/pipelines/agent/build/app/keyStore.jks' not found for signing config 'release '.</span>
that is my script
image: mingc/android-build-box:latestpipelines:branches:development: - step:name: "Build [DEBUG] and run Unit Tests" script: - echo "START script build-debug.sh" - chmod +x build-debug.sh - ./build-debug.sh - echo "END script build-debug.sh - artifacts we [DEBUG] build can be downloaded..." - pipe: atlassian/bitbucket-upload-file:0.7.1variables:BITBUCKET_ACCESS_TOKEN: $BITBUCKET_ACCESS_TOKENFILENAME: "./app/build/outputs/apk/debug/app-debug.apk" FILE_PATH: "artifacts/app-debug.apk"
and that is build-debug.sh
#!/bin/bash# Exit immediately if a command exits with a non-zero statusset -e# Define some colors for better readability in logsGREEN='\033[0;32m'RED='\033[0;31m'NC='\033[0m' # No Color# Function to print messages in green colorfunction echo_green() {echo -e "${GREEN}$1${NC}"}# Function to print messages in red colorfunction echo_red() {echo -e "${RED}$1${NC}"}# Start the build processecho_green "Starting the build process..."chmod +x gradlew# Clean the projectecho_green "Cleaning the project..."./gradlew clean# Assemble the debug buildecho_green "Assembling the debug build..."./gradlew buildcd ./app/build/outputs/apk/debugls -la# Notify completion of the build processecho_green "Build process completed successfully."
Hi Ahmed and welcome to the community!
The error indicates that the build cannot find a certain file in the path /opt/atlassian/pipelines/agent/build/app/. Does the file exist in that directory?
Just to give you some context, Pipelines builds run in Docker containers. For every step of your build, a Docker container starts (the build container) using the image you have specified in your bitbucket-pipelines.yml file. The repo is cloned in the build container in the directory /opt/atlassian/pipelines/agent/build (this is the clone directory).
Does this file exist in your repo in the directory named app? Or are you downloading it during the build in that directory?
I suggest debugging this build locally with Docker first, and when you have a build that runs locally, it should work in Pipelines as well. You can follow this guide to debug the build locally with Docker:
Kind regards,Theodora
I don't have this path "/opt/atlassian/pipelines/agent/build/app/" to add a file to it
I need to add keystore.jks, key alias, and password to be used in singing for builds
the file is already exist in the repo inside the app folder of the Android project
Hi Ahmed,
The path /opt/atlassian/pipelines/agent/build/app/ is not a path on your repository. The path /opt/atlassian/pipelines/agent/build/ is a directory in the Docker container where your build runs during a Pipelines build. In that directory, your repo gets cloned, and the commands of your yml file get executed.
Did you try debugging the build locally as per the guide I shared in my previous reply?
What happens when you debug the build locally as per this guide?
It looks like you're new here. Sign in or register to get started.