I am currently trying to set up a project which is depending on another project on bitbucket.
I can compile everything with no issue, but I want to optimize the build procedure.
The project that I am depending on is quite large and does not change that often.
I am facing an issue right now: I am cloning the project at one step defined in the pipeline file. This is working but it rebuilds and installs the artifact every time to the local repository, which is not necessary because the same version is already existing.
How can I check if the cache already includes a certain artifact before cloning & installing the same thing over and over again?
Hello @Andreas Schröck ,
Thank you for reaching out to Atlassian Community.
From your description, I understand you are already using caches in your pipeline. What pipeline caches essentially do is zip a given folder and upload it to our infrastructure. On the subsequent runs, this zip will be downloaded and extracted in the same exact location it was generated, but it's up to the framework/tool you are using to make use of this cache.
We provide several pre-defined cache locations for commonly used language tools, as listed in the documentation below :
But you can also define custom cache locations if your application is looking at different folders :
As you mentioned you are cloning another huge dependency repository that does not change often, another option is for you to build your own custom docker image that already includes that dependency, and use that image in the steps that need the dependency. Since the image will already contain the repository, you will not need to clone it every time you do your build :
Hope that helps! Let me know in case you have any questions.
Thank you, @Andreas Schröck .
Kind regards,
Patrik S
Thx for the links!
The docker image must be on docker hub, correct?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Andreas Schröck ,
We support public and private Docker images including those hosted on Docker Hub, AWS, GCP, Azure and self-hosted registries accessible on the internet, so it's up to your choice where you better prefer to host your image :)
Kind regards,
Patrik S
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.
Hello @Andreas Schröck ,
There's no specific documentation on how to use Azure, but the following example is for private registries and should apply to Azure Container Registry (ACR) as well :
image:
name: myregistry.azurecr.io/samples/my_image
username: $USERNAME
password: $PASSWORD
You can find more details on ACR in Microsoft's documentation below :
Thank you, @Andreas Schröck .
Patrik S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.