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

Create Travis Cron job to check for current wq file #2

Closed
fawda123 opened this issue Jun 29, 2019 · 7 comments
Closed

Create Travis Cron job to check for current wq file #2

fawda123 opened this issue Jun 29, 2019 · 7 comments
Assignees

Comments

@fawda123
Copy link
Member

See notes on Google drive

@fawda123 fawda123 self-assigned this Jun 29, 2019
@bbest
Copy link
Contributor

bbest commented Jul 9, 2019

Hi @bbest ,

I took a stab at getting a cron job setup on our tbep repository yesterday. I think I’m 99% there but having some issues with the authentication to GitHub for the final push:

image

I followed the instructions for creating a token and then got an encryption key with the Travis CLI. You can see the Travis config file here: .travis.yml

-- @fawda123

@bbest
Copy link
Contributor

bbest commented Jul 9, 2019

Hey Marcus,

I'll have to try with my own credentials, which I can do tomorrow. Meanwhile here are a few links:

bbest added a commit that referenced this issue Jul 9, 2019
@bbest
Copy link
Contributor

bbest commented Jul 9, 2019

Ok, the above commit a75fcde seems to have worked as evidenced by the badge now in the repo's README:

image

Here's a couple of things I did that might've made the difference:

  1. I added the personal token to the file ~/.gh-token_tbep-tech then ran:

    echo GH_TOKEN=`cat ~/.gh-token_tbep-tech` | travis encrypt --add

    Note how this sets the GH_TOKEN variable which can then be accessed in the .travis.yml as $GH_TOKEN.

  2. Set the other environmental variables TRAVIS_REPO_SLUG and TRAVIS_BRANCH used in the git push statement:

    script:
    - git push https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git HEAD:${TRAVIS_BRANCH}
    
    env:
      global:
      - TRAVIS_REPO_SLUG=tbep-tech/tbep-tech.github.io
      - TRAVIS_BRANCH=master

@bbest
Copy link
Contributor

bbest commented Jul 9, 2019

Or on Windows:

travis encrypt GH_TOKEN="enteryoursecrettokeninfohere" --add

@fawda123 fawda123 reopened this Jul 10, 2019
@fawda123
Copy link
Member Author

This is still causing headaches... I got the authentication working but now the .Rmd render is getting stuck:

image

This goes back to the read_chkdate() function from tbeptools, specifically this line: https://github.com/tbep-tech/tbeptools/blob/15cdb9b1fb2d1c2ab0292602c21bb366bd3e9cf2/R/read_chkdate.R#L27

The URL it's trying to access is the TBEP server ftp://ftp.epchc.org/EPC_ERM_FTP/WQM_Reports/... works fine locally but seems to get hung on Travis. Any ideas?

@fawda123
Copy link
Member Author

Fixed after making some changes to tbeptools and the DESCRIPTION file here cf25345

I think it was just a matter of requiring RCurl to be installed for R on the Travis machine

@fawda123
Copy link
Member Author

fawda123 commented Aug 23, 2019

Yea this still isn't working.... created a new issue for this #5

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

No branches or pull requests

2 participants