Created
November 30, 2015 14:05
-
-
Save StevenMMortimer/4e4871ae367ea7805016 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# travis encrypted vars don't seem to work on Windows machines, so if you need them, create a virtualbox (I'm running ubuntu here) | |
# and install travis CLI tools in order to encrypt them and add to your repo | |
# setup virtual machine running ubuntu, here is the vagrant script | |
Vagrant.configure(2) do |config| | |
config.vm.box = "ubuntu/trusty64" | |
config.vm.provider "virtualbox" do |vb| | |
vb.customize ["modifyvm", :id, "--memory", "4048"] | |
vb.customize ["modifyvm", :id, "--cpus", "2"] | |
end | |
$script = <<BOOTSTRAP | |
sudo apt-get update | |
sudo apt-get install ruby1.9.3-dev | |
sudo gem install travis | |
BOOTSTRAP | |
config.vm.provision :shell, :inline => $script | |
end | |
# create the virtual machine | |
vagrant up | |
# ssh into it | |
vagrant ssh | |
# copy over private key so github package can be cloned | |
scp -P 2222 /cygdrive/c/users/steven.mortimer/.ssh/id_rsa [email protected]:~/.ssh | |
# change key permissions | |
chmod 600 id_rsa | |
# clone repo so travis knows how to associate the encrypted vars | |
git clone [email protected]:ReportMort/{this-git-repo}.git | |
# copy over the files we want to encrypt | |
scp -P 2222 /cygdrive/c/users/steven.mortimer/documents/{this-library-folder}/tests/testthat/token.rds [email protected]:~/{this-library-folder}/tests/testthat | |
scp -P 2222 /cygdrive/c/users/steven.mortimer/documents/{this-library-folder}/tests/testthat/options.rds [email protected]:~/{this-library-folder}/tests/testthat | |
# log into travis | |
travis login | |
# tar the files together | |
tar cvf setup.tar token.rds options.rds | |
# encrypt | |
travis encrypt-file setup.tar | |
# copy back out and dont forget about adding to the travis yaml | |
scp -P 2222 [email protected]:~/{this-library-folder}/tests/testthat/setup.tar.enc /cygdrive/c/users/steven.mortimer/documents/{this-library-folder}/tests/testthat/setup.tar.enc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment