-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
shell-script for updating autodeploy xars on build time #3
Conversation
open for discussion though still see some room for improvement ;-) |
with information on new build-arg UPDATE_XARS
at the moment the packages to be pulled are hard coded, would it be better to iterate through the contents in the auto deploy directory to see which packages are in autodeploy? My impression is though, that this is quite stable over all version of eXist-db, or am I mistaken? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much for the PR!
Indeed, it's a great idea to fetch the latest XARs on image build and this should be added. In addition to the minor issues I added as comments, a major improvement would be to provide the list of XARs as a build ARG in the Dockerfile and then iterate over this list in the update-xars
script. Do you think that might be possible?
accidentally closed my tab before submitting a longish comment: wrap up:
|
add build ARG for updating autodeploy xars on build time Update README.md with information on new build-arg UPDATE_XARS update xars on build
…stdb-docker into autoupdate-autodeploy
@peterstadler please test the list of XARs is fixed for now; have to checkout how to submit an array as docker ARG for individualised XAR list. |
btw closes #2 |
@peterstadler actually there's one more thing I'd like to change: make the scrip runnable in standalone by:
if [[ -d "$3" ]]
then
DIR="$3"
CLEANUP=false
elif [[ "$3" != "" ]]
then
DIR=`mkdir -p "$3"`
else
DIR=`mktemp -d`
fi and # delete temporary dir
if [[ "$CLEANUP" = "false" ]]
then
echo "XARs are located at: $DIR"
else
echo "copy updated XARs to autodeploy folder"
cp "$DIR"/*.xar ${EXIST_HOME}/autodeploy/
rm -Rf "$DIR"
fi Is that ok with you? |
Hi @bwbohl, just a reminder what we decided at our last conference call:
|
add some documentation and user feedback
check second argument
indent
update setting XAR repo URL
update setting download folder
update user feedback
fix fail on more than one argument
fix fail on creating custom download directory
add documentation comments
* always create temporary download directory * if $3 is set use as $PUBIR * allow fourth argument if prune then delete XARs in $PUBDIR before copying
* Add documentation * Add help
* allow package names to be submitted as argument * reorder arguments
* completely reworked parsing of arguments to parsing of options * instead of relying on a specific order or $ARGS, e.g. `-v 5.2.0` can be used to pass the eXist-db version * ALERT: documentation still out of sync
* redefine bold and normal typeface shortcuts
* update documentation and help
add documentation comments
* always create temporary download directory * if $3 is set use as $PUBIR * allow fourth argument if prune then delete XARs in $PUBDIR before copying
* Add documentation * Add help
* allow package names to be submitted as argument * reorder arguments
* completely reworked parsing of arguments to parsing of options * instead of relying on a specific order or $ARGS, e.g. `-v 5.2.0` can be used to pass the eXist-db version * ALERT: documentation still out of sync
* redefine bold and normal typeface shortcuts
* update documentation and help
* for each XAR download check if file downloaded successfully, else exit
remove some trailing whitespaces and unnecessary line breaks
* add some documentation
* add license
…stdb-docker into autoupdate-autodeploy
everything's works fine so far but as the base-image has changed will have to do some update work and obviously with the new default packages for exist v5.3.0 we definitely need to get the default list from the exist repo (or somewhere else e.g. maintain a list here) |
linting
before this commit, there was a default list for older versions of eXist-db; now the list gets populated based on the install.xml in the exist-db repo
@peterstadler finally I found the time to implement a dynamic population of the default XAR_LIST based on the eXist-db $VERSION and |
btw: only adds functx if it is in the default deploys of the eXist-db version; so it closes #3 but functx might be missing for older db version that did not include in the default deploys |
ping |
Hi @bwbohl, sorry for the delay … |
yeah, you're probably right. The way you describe is just the way I use it e.g. in https://git.uni-paderborn.de/baz-ga/docker-website/-/blob/main/Dockerfile Should I create a docker-xar-download (or similar) Docker image that you could just use as FROM in your Dockerfile? |
This adds a shell script that will be copied into the container and executed if the docker --build-arg UPDATE_XARS=true. Submitting the $VERSION it will fetch apps.xml from eXist-db's public repo and fetch the latest XAR-versions for this eXist version.