Skip to content
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

Merged
merged 12 commits into from
Feb 14, 2017
Merged

Kennric/better make tasks #133

merged 12 commits into from
Feb 14, 2017

Conversation

Kennric
Copy link
Contributor

@Kennric Kennric commented Feb 13, 2017

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:

  1. disable the jenkins production job
  2. merge this PR
  3. modify the jenkins job to build using the same general build steps as the PR build job (build html, rsync into place)
  4. set the jenkins job to build and rsync to a test directory under staging to test and debug
  5. push to master and test
    6 configure jenkins to rsync to the final production location

@Kennric
Copy link
Contributor Author

Kennric commented Feb 13, 2017

@ramereth

@Kennric
Copy link
Contributor Author

Kennric commented Feb 14, 2017

@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}"
Copy link
Member

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?

@ramereth
Copy link
Member

@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)
Copy link
Member

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 '
Copy link
Member

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!)

@Kennric
Copy link
Contributor Author

Kennric commented Feb 14, 2017

@ramereth formatting on the help text makes longer lines tricky, but how about 'copy web site locally via rsync'?

@ramereth
Copy link
Member

@Kennric that works

@Kennric
Copy link
Contributor Author

Kennric commented Feb 14, 2017

@ramereth how does that look?

@Kennric Kennric merged commit 4a38715 into master Feb 14, 2017
@ramereth ramereth deleted the kennric/better_make_tasks branch August 11, 2017 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants