-
Notifications
You must be signed in to change notification settings - Fork 7
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
Kennric/better make tasks #133
Conversation
@ramereth Moved the rsync operation into the Makefile - this gives us a single build command for jenkins in production and pr builds job, and requires two environment variables to be set in jenkins, PELICAN_SITE_URL, and RSYNC_TARGET_DIR |
scripts/build.sh
Outdated
git checkout master | ||
git pull -q --ff-only | ||
# get out of here if the target directory is not set | ||
"${RSYNC_TARGET_DIR:?RSYNC_TARGET_DIR must be set}" |
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.
Should we have a sane default set for this instead of requiring it be added?
@Kennric Can you please add this new command to the help section of the Makefile? |
Makefile
Outdated
ssh_upload: publish | ||
scp -P $(SSH_PORT) -r $(OUTPUTDIR)/* $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR) | ||
|
||
rsync_upload: publish | ||
rsync -e "ssh -p $(SSH_PORT)" -P -rvzc --delete $(OUTPUTDIR)/ $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR) --cvs-exclude | ||
|
||
rsync_copy: publish | ||
rsync -racq --delete-after --force --cvs-exclude $(OUTPUTDIR)/ $(RSYNC_TARGET_DIR) |
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.
-r
is covered by -a
so it's safe to remove it here.
Makefile
Outdated
@@ -44,6 +45,7 @@ help: | |||
@echo ' make serve [PORT=8000] serve site at http://localhost:8000' | |||
@echo ' make devserver [PORT=8000] start/restart develop_server.sh ' | |||
@echo ' make stopserver stop local server ' | |||
@echo ' make rsync_copy copy the website files via rsync ' |
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.
Maybe instead be "copy the website files locally via rsync" (sorry to be so nit picky!)
@ramereth formatting on the help text makes longer lines tricky, but how about 'copy web site locally via rsync'? |
@Kennric that works |
@ramereth how does that look? |
These changes make the build process more generic. This PR by itself will disable the current production jenkins build, which will need to be reconfigured.
Proposed plan:
6 configure jenkins to rsync to the final production location