Hi there,
we currently try to migrate from our Jenkins server to Bitbucket Pipelines.
We have a multi module Maven / Spring Project which is painfully slow in build times and takes around 60 minutes in pipelines, while only taking around 10 minutes in our Jenkins server.
I therefore went ahead and pulled the docker container locally and started it exactly as described here https://support.atlassian.com/bitbucket-cloud/docs/debug-pipelines-locally-with-docker/ and issued the mvn command.
On my machine the build is just fine and fast as always, it only seems to be slow within the Bitbucket Pipelines cloud.
bitbucket-pipelines.yml (we first setup the build environment with a few npm commands. These take time as well, but they are not the problem here)
image:
name: privateregistry/privateimage
username: $_USER
password: $_PASS
email: someone@example
pipelines:
default:
- step:
name: Build
size: 2x
caches:
- maven
- node
- docker
script:
- bash create-settings.sh
- npm install --prefix web
- npm install grunt-cli@1.2.0 --save --prefix web
- npm install --prefix web2
- npm install grunt-cli@1.2.0 --save --prefix web2
- npm install --prefix web3
- npm install grunt-cli@1.2.0 --save --prefix web3
- npm install --prefix web4
- npm install grunt-cli@1.2.0 --save --prefix web4
- npm install --prefix web5
- npm install grunt-cli@1.2.0 --save --prefix web5
- npm install --prefix web6
- npm install grunt-cli@1.2.0 --save --prefix web6
- npm install --prefix web7
- npm install grunt-cli@1.2.0 --save --prefix web7
- npm install --prefix web8
- npm install grunt-cli@1.2.0 --save --prefix web8
- npm install --prefix web9
- npm install grunt-cli@1.2.0 --save --prefix web9
- MAVEN_OPTS="-Dorg.slf4j.simpleLogger.showDateTime=true -Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss" mvn -B -s settings.xml verify deploy --file pom.xml -P someprofiles
after-script:
# Collect checkstyle results, if any, and convert to Bitbucket Code Insights.
- pipe: atlassian/checkstyle-report:0.2.0
Looking through the logs it occurs to me that some of the dependencies might not be stored in the cache and are downloaded on every build.
Furthermore, I am wondering why our private registry docker image is pulled every single time entirely. This seems like a waste of time and bandwith.
Is there something that I miss? Like a "faster" switch?
I already went through a lot of documentation.