Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you install/use Travis Cli inside travis script?

As a part of my my customized travis build I would like to use Travis command-line client inside after_success script. I need that to trigger some operations on other travis jobs (other repositories) after each successfull build in this particular repo. So two questions:

  • Is it possible at all?
  • If so is there any smart or quick way to do that?

As far as I know Travis Cli has several ruby dependencies that may not be available by default. But perhaps it is by default installed on travis VMs.

like image 967
running.t Avatar asked Jul 30 '26 13:07

running.t


1 Answers

Yes, this is completely possible. However, this would only work for language: ruby jobs.

For your specific case, you can do:

after_success:
  # install travis cli
  - gem install --no-document travis
  # setup travis shell autocomplete
  - echo "y" | travis --version
  # do travis cli stuff
  - travis do stuff

If you have a project using another language, then this becomes much more complicated.

like image 129
Matt Schuchard Avatar answered Aug 03 '26 00:08

Matt Schuchard



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!