Git Product home page Git Product logo

travis-scripts's People

Contributors

alrra avatar arthurvr avatar azu avatar bnjmnt4n avatar greenkeeperio-bot avatar mathiasbynens avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

travis-scripts's Issues

update-branch --distribution-repository

This is feature suggestion.

I want to deploy from org/name repository to org/org.github.io repository at times.

$(npm bin)/update-branch --commands "npm run build" \
                             --commit-message "Hey GitHub, this content is for you! [skip ci]" \
                             --directory "dist" \
                             --distribution-branch "gh-pages" \
                             --source-branch "master" \
                             --distribution-repository "[email protected]:org/org.github.io.git" # <= like this

UseCase:

I've developed almin/almin that is monorepo.
This mono repository includes website/ directory.
I want to deploy from almin/almin/website to almin/almin.github.io, but update-branch does not support distribution repository option.
Currently, I just use push-to-github-io.sh that is copied from alrra/travis-scripts.

Did you have any chance to support this feature?

Update `travis` instructions

After running gem install travis, you need to run another step if you use travis-ci.com instead of travis-ci.org (which is being deprecated). The step is:

travis endpoint --pro --set-default

Background (no need to mention this in the docs): this updates the local config at ~/.travis/config.yml and ensures the travis CLI is uploading the environment secrets to the .com domain.

Add support for using SSH URLs

GitHub repositories support Deploy Keys, to allow for a SSH key for a specific repository only. Using Deploy Keys is more secure than GitHub tokens as they can only be used for one repository. Therefore, allowing SSH URLs like [email protected] should be allowed.

Unable to deploy to master

Due to this line, the master branch cannot be deployed to, as master is the default branch and cannot be created again. Perhaps a check could be added for the master branch?

How to run this script?

This throws me errors, what was going on?

node update_site_branch.sh

Might be a bug in master so a patch release HIGHLY welcomed.

set-up-ssh: Consider using `--iv` instead of `-iv`, etc.

Please keep in mind that this is a really minor “issue”.

The current API looks like this:

$(npm bin)/set-up-ssh -k "$encrypted_ca2180397773_key" \
  -iv "$encrypted_ca2180397773_iv" \
  --path-encrypted-key ".travis/github_deploy_key.enc"
  1. Why -iv and not --iv? Generally, single-char options use - and multi-char options use -- in CLIs.
  2. Why is there no long-form -- alternative for -k?

Add helper for SSH setup

Every repo using travis-scripts using deploy keys (as recommended) will include some boilerplate code like this:

# Decrypt the file containing the private key.

openssl aes-256-cbc \
    -K $encrypted_fa862907f31d_key \
    -iv $encrypted_fa862907f31d_iv \
    -in "$(dirname "${BASH_SOURCE}")/${PRIVATE_KEY_FILE_NAME}.enc" \
    -out ~/.ssh/${PRIVATE_KEY_FILE_NAME} -d;

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

# Enable SSH authentication.

chmod 600 ~/.ssh/${PRIVATE_KEY_FILE_NAME};
echo 'Host github.com' >> ~/.ssh/config;
echo "  IdentityFile ~/.ssh/${PRIVATE_KEY_FILE_NAME}" >> ~/.ssh/config;

Could travis-scripts include a helper utility that performs these tasks? The only variables are the encrypted key file name, and the key and IV variables. That would allow replacing the above with something like:

set-up-ssh --encrypted-key-file "github_deploy_key" \
           --key "$encrypted_fa862907f31d_key" \
           --iv "$encrypted_fa862907f31d_iv"

This would greatly simplify this section in the docs (ref. #20): https://github.com/alrra/travis-scripts/blob/master/doc/github-deploy-keys.md#26-setup-the-ssh-key-for-travis-ci

Update branch without overwriting?

We use this to update the gh-pages branch, but every time, it uses git init and starts a fresh branch. Is there any way it could keep the history? That way, I could use a build command that builds - for example - each SHA separately, and keep all of them intact for historical perusal.

Option to not suppress output?

For build tasks that take more than 10 minutes to run, travis-scripts has to be wrapped in travis_wait otherwise.

Adding an option to avoid suppressing the output would prevent this situation altogether, at least in my case.

update-branch: make `--commands` root-relative

Make the --commands argument to update-branch relative to the repository’s root directory rather than to the update-branch path (which may change between versions).

Example where I had expected this behavior and it caused the build to fail: https://travis-ci.org/tibiamaps/tibia-map-data/builds/116006101#L1387 Matching .travis.yml config: https://github.com/tibiamaps/tibia-map-data/blob/f70d9a2b92aae2d9e430941a4aef73534242ac36/.travis.yml#L12-L13, i.e.:

after_success:
  - "./scripts/travis/auto-deploy.sh"

Which includes https://github.com/tibiamaps/tibia-map-data/blob/f70d9a2b92aae2d9e430941a4aef73534242ac36/scripts/travis/auto-deploy.sh#L27:

$(npm bin)/update-branch --commands './travis/scripts/build.sh' […]

This could be as simple as running cd "${TRAVIS_BUILD_DIR}"; before evaluating the --commands.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.