I have added below script in pipeline, but it seems not working , every build take more than 30 min for mvn install , any problem recently for this cache function ?
image: maven:3.6.3
pipelines:
branches:
develop:
- step:
name: Build and Unit Test
artifacts:
- x_api/target/x_api.jar
- checkstyle-result.xml
image: maven:3.6.3
caches:
- maven
script:
#- mvn -B verify --file pom.xml
- cd x_api
- mvn install
- mvn package --batch-mode
- cd ../x_service
- mvn install
- mvn package --batch-mode
thank you,
Jonas
Hi Jonas,
I just wanted to let you know that we have a limit of 1GB for caches, only caches under 1GB once compressed are saved.
Maven cache is saved in the directory ~/.m2/repository, so I would suggest checking the size of this directory during the build and after dependencies are downloaded.
If the repo belongs in a workspace with a paid billing plan (I see you are an admin of such a workspace), you can also create a ticket with the Bitbucket Cloud support team to look into this and confirm if the issue is with the cache size or something different. You can create a support ticket via https://support.atlassian.com/contact/#/, in "What can we help you with?" select "Technical issues and bugs" and then Bitbucket Cloud as product.
Kind regards,
Theodora
thank you Theodora for guide , I submitted a ticket to see if any solution.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are welcome Jonas, please feel free to reach out if you ever need anything else.
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I saw below in pipeline log
Cache "maven": Not found
is there any limit like size of the maven cache , possible exceed the limit cause maven was not cached
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Zhenguo Li what image do you use? Please provide your full pipeline config and log output
Also take a look at this answer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
image: maven:3.6.3
pipelines:
branches:
develop:
- step:
name: Build and Unit Test
artifacts:
- x_api/target/x_api.jar
- checkstyle-result.xml
image: maven:3.6.1
caches:
- maven
script:
#- mvn -B verify --file pom.xml
- cd x_api
- mvn install
- mvn package --batch-mode
- cd ../x_service
- mvn install
- mvn package --batch-mode
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i can't paste full log here, it just said there is no cache for maven in build setup step.
and there is no any cache shows if I click the Cache button on pipeline's home page.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Zhenguo Li. To check if maven cache working or not you should try to run pipeline this example repo
If cache is not working its definitely a bug and you may report it.
If cache is working then problem is in your `script section`. I think the reason is that you changing folders and then run `mvn install` when your cache possibly is in upper folder, but i can be wrong.
Look at this answer to understand how to define cache for custom folder
P.S also you do not need
image: maven:3.6.1
in `step` section because you use
image: maven:3.6.3
in the beginning of your pipeline config. I understand that i suggested you to do it but also it explains why i asked you to provide the full pipeline config to provide better help.
Cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Zhenguo Li . At least you should add more details about your pipeline config.
Also take a look at this answer: maven cache not working .
There
image: maven:3.6.1
was added before caches, maybe this will fix your issue.
Cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.