Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

When I run pipeline getting error Task 'promoteArtifact' not found in root project 'build'.

Edited

 

+ ./gradlew promoteArtifact --track beta
.......................................................................................................................................................
Unzipping /root/.gradle/wrapper/dists/gradle-7.4-all/aadb4xli5jkdsnukm30eibyiu/gradle-7.4-all.zip to /root/.gradle/wrapper/dists/gradle-7.4-all/aadb4xli5jkdsnukm30eibyiu
Set executable permissions for: /root/.gradle/wrapper/dists/gradle-7.4-all/aadb4xli5jkdsnukm30eibyiu/gradle-7.4/bin/gradle
Welcome to Gradle 7.4!
Here are the highlights of this release:
- Aggregated test and JaCoCo reports
- Marking additional test source directories as tests in IntelliJ
- Support for Adoptium JDKs in Java toolchains
Starting a Gradle Daemon (subsequent builds will be faster)
FAILURE: Build failed with an exception.
* What went wrong:
Task 'promoteArtifact' not found in root project 'build'.
* Try:
> Run gradlew tasks to get a list of available tasks.
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
BUILD FAILED in 41s

 

image: androidsdk/android-30
definitions:
services:
docker:
memory: 512
docker-with-more-memory:
memory: 2048
type: docker
docker-with-large-memory:
memory: 5120
type: docker
pipelines:
branches:
develop:
# - parallel:
- step:
size: 2x
name: Build
caches:
- gradle
script:
- echo "$SIGNING_JKS_FILE" | base64 -di > android-signing-keystore.jks
- ./gradlew assembleRelease
artifacts:
- app/build/outputs/**
- step:
size: 2x
name: Build Debug
caches:
- gradle
script:
- echo "$SIGNING_JKS_FILE" | base64 -di > android-signing-keystore.jks
- ./gradlew assembleDebug
artifacts:
- app/build/outputs/**
- step:
size: 2x
name: Test
script:
- ./gradlew test
- step:
name: Push On Beta
trigger: manual
script:
- echo $GOOGLE_API_KEY_JSON > google_play_api_key.json
- ./gradlew promoteArtifact --track beta




1 answer

1 accepted

0 votes
Answer accepted
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Oct 24, 2022

Hi @Krunal Pandav and welcome to the community.

I see that you get this error when running the command

./gradlew promoteArtifact --track beta

in the last step of your pipeline. Does the execution of this command depend on files you modify or generate in previous steps, that you have not defined as artifacts yet?

Please keep in mind that for each step of your pipeline, a separate Docker container starts, the repo is cloned in that container, then this step's commands from the script are executed, and in the end, the container gets destroyed. Only files that you define as artifacts will be available for later steps.

One thing you could try, for debugging purposes, would be to combine all 4 steps into 1 and check if the command runs successfully then or not.

You could also debug this locally with Docker following the steps mentioned in the following doc, so that you don't consume any Pipelines minutes, and check if there is any configuration issue in your project causing this error:

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events