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

PHP Laravel Pipeline: No Artifacts Uploaded

nymendaros June 9, 2022

My artifacts is not uploaded after successful run of test pipeline. Here's the yml:

BitbucketPipe.jpg

here's the result

BitbucketPipe01.jpgBitbucketPipe02.jpg

what should the correct code for the artifact?

1 answer

1 accepted

1 vote
Answer accepted
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 13, 2022

Hi @nymendaros,

I see two issues with the yml file you posted:

1st. The two steps are parallel. Parallel steps can only use artifacts produced by previous steps, not by steps in the same parallel set.

If you want the second step to use an artifact generated by the first step, you will need to remove the parallel keyword.


2nd. I'm afraid that the file path in artifacts cannot render variable names. We have a bug report about this in our issue tracker:

As a workaround, you can determine as an artifact any file with .zip extension as follows:

artifacts:
- "*.zip"

In case you have multiple zip files in the clone directory and you want to avoid having all of them uploaded as artifacts, you can generate this specific zip in a separate folder inside the clone directory, e.g. named 'app', and then define as an artifact any zip file in that directory

artifacts:
- app/*.zip

Please feel free to let me know how it goes and if you need further assistance.

Kind regards,
Theodora

nymendaros December 20, 2022

Sorry for late reply. Thank you for the assistance

This has been solved on the same month (June). We're able to fix the pipeline by removing the parallel directive for the 1st and 2nd step and among other things.

But the $BITBUCKET_BUILD_NUMBER is not incrementing.

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 21, 2022

Hi @nymendaros,

Thank you for the update and you are very welcome! It's good to hear that the issue was solved.

Regarding $BITBUCKET_BUILD_NUMBER not incrementing, have you perhaps defined a deployment variable, repository variable, or workspace variable with the same name? These variables will override default ones with the same name.

If you add the command ls -lah below the zip command as follows, does the number in the name of the zip not correspond to the build number?

- zip -r example-$BITBUCKET_BUILD_NUMBER.zip .
- ls -lah

In case you are generating the zip in a directory inside the clone directory, provide the directory name in the ls -lah command.

Kind regards,
Theodora

Suggest an answer

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

Atlassian Community Events