Hi everyone, hope you’re having a wonderful Monday.
I’ve been getting increasingly frustrated over a problem I’ve been having with App Platform since the start - whenever I clear the build cache in hope of fetching updated versions of my other repos.
To clarify, I have a Python application(A) running in the App Platform, which is reliant on another repository hosted on GitHub(B). We download it and put it into the environment at build time, using build commands. We fetch versions based on tagging.
Whenever I release a new version of B, I need to re-build A. I do this with “clear build cache”, expecting the latest version of B to be fetched. In nearly all cases, A is built with the old version.
How can I make sure that the entire build cache is cleared?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Enter your email to get $200 in credit for your first 60 days with DigitalOcean.
New accounts only. By submitting your email you agree to our Privacy Policy.
Hey there 👋,
Hope that you are having a great start of the week too!
It sounds like the problem might be related to the fact that there have been no code changes to repo A. As a workaround, what you could do is introduce a dependency file where you change the tag version of your repo B. For example, if you were to add a file called
repo_b_version
to your repo A, then you could use the information in there for your build command and change the contents of that file so that it would trigger a new build each time that file is updated with the new version.You could get the version from the dependency file in your build command using the
cat
command for example, e.g.version=$(cat repo_b_version)
.If this workaround does not fit your needs, please reach out to our amazing support team who might be able to further assist you with the problem! :)
Hope that helps!
- Bobby.