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

should output the log as the command goes when using travis_wait #4190

Closed
Da-Huang opened this issue Jul 4, 2015 · 6 comments
Closed

should output the log as the command goes when using travis_wait #4190

Da-Huang opened this issue Jul 4, 2015 · 6 comments

Comments

@Da-Huang
Copy link

Da-Huang commented Jul 4, 2015

When travis_wait is added as prefix, the log should be output as the command goes, instead of after it finishes.

@BanzaiMan
Copy link
Contributor

Sorry, that is how the function is implemented right now. If you have suggestions for improvement, you can look at the code here: https://github.com/travis-ci/travis-build/blob/68cdaaf2cfcad54671c3b5896cd867e21a63c737/lib/travis/build/templates/header.sh#L108-145

@joshk
Copy link
Contributor

joshk commented Jul 8, 2015

Hi @Da-Huang

Thanks for your suggestion.

As @BanzaiMan suggested, we are happy to take PRs to improve this. I'm going to close this issue for now as we can discuss any changes within the PR.

Thanks a bundle

Josh

@evilaliv3
Copy link

@Da-Huang enjoy the following solution:

  long-living-command & # send the long living command to background!

  minutes=0
  limit=30
  while kill -0 $! >/dev/null 2>&1; do
    echo -n -e " \b" # never leave evidences!

    if [ $minutes == $limit ]; then
      break;
    fi

    minutes=$((minutes+1))

    sleep 60
  done

@Da-Huang
Copy link
Author

Da-Huang commented Jan 8, 2016

Wow, cool! Thanks, @evilaliv3

@abitrolly
Copy link

I replaced travis_wait with this

 install:
    # Output something every 10 minutes or Travis kills the job
    - while sleep 9m; do echo "=====[ $SECONDS seconds still running ]====="; done &
    - long-living-command
    # Killing background sleep loop
    - kill %1

wkentaro added a commit to ros-perception/perception_pcl that referenced this issue Apr 30, 2018
This enables writing log before the command finishes.

travis-ci/travis-ci#4190 (comment)
wangyum added a commit to spark-mler/spark that referenced this issue May 17, 2018
@Gama11
Copy link

Gama11 commented May 27, 2018

Thanks @abitrolly, that works perfectly. 👍 I ran into some issues with OSX jobs though, it looks like "minutes" / the m is just ignored by the sleep command there, meaning the keep-alive-output is printed every 9 seconds. Replacing sleep 9m with sleep 540 fixes that (and still works fine on Linux).

simonbasle added a commit to reactor/reactor-core that referenced this issue Jun 13, 2018
This is done by having an echo on the background with 3x5min sleeps.
The echo is killed if the rest of the travis_script takes less time
to complete.

Solution inspired from this issue comment while looking at travis_wait:
travis-ci/travis-ci#4190 (comment)
simonbasle added a commit to reactor/reactor-core that referenced this issue Jun 13, 2018
This is done by having an echo on the background with 3x5min sleeps.
The echo is killed if the rest of the travis_script takes less time
to complete.

Solution inspired from this issue comment while looking at travis_wait:
travis-ci/travis-ci#4190 (comment)
smokris added a commit to vuo/conan-qt that referenced this issue Sep 19, 2018
lierdakil added a commit to lierdakil/pandoc-crossref that referenced this issue Jan 23, 2019
krassowski added a commit to krassowski/meningitis-integration that referenced this issue Jul 16, 2019
krassowski added a commit to krassowski/meningitis-integration that referenced this issue Jul 17, 2019
* First attempt to setup Travis integration
* Set dist to bionic
* Add R and graphiz
* Add R and Python cache
* Update apt-get before installs
* sudo-install R packages
* Use R 3.5.2
* Fix sources list
* Add key for CRAN
* Send artefacts back to GitHub
* Fix version setup
* Add tag utility
* Ignore R version for now, R team should have kept 3.5 alone..
* Update setup to properly install R 3.5
* [9 debugging commits]
* Fix R setup setup
* Attempts to fix the problem with too long logs
  * Ignore deprecated
  * Try quiet installs
* Add explicit install of readat dependency
* More quiet arguments & debugs
* Move travis_wait to setup.sh
* Use workaround for travis_wait consuming the logs, see: travis-ci/travis-ci#4190 (comment)
* More improvements to Travis build
* Try to make better use of cache (manual, no sudo)
* Add quiet to devtools::install_url
* Local R lib setup attempts:
  * With .Renviron?
  * In home?
  * With mkdir and standard path
* Make sure interactive is on
* Try to install limma with Bioconductor
* Comment-out unnecessary env change & cleanup
* Use a single tag to force Travis to use cache
* Upgrade pip packages for reproducibility builds & revert
* Run nbpipeline from root
* Add raw samples data
* Enable Travis cache for notebooks
* Do not attempt to display graph in Travis console
* Remove spurious apt: true
JelleAalbers added a commit to JelleAalbers/base_environment that referenced this issue Jul 21, 2019
matzbot pushed a commit to ruby/ruby that referenced this issue Jul 29, 2019
and thus it does not work with `-v` for investigating hangs well.
This seems to be by design: travis-ci/travis-ci#4190

Also I simplified a comment about `homebrew.update`.
I had this in-flight change while editing e05f397
but forgot to ammend this.
krassowski added a commit to krassowski/meningitis-integration that referenced this issue Aug 21, 2019
* First attempt to setup Travis integration
* Set dist to bionic
* Add R and graphiz
* Add R and Python cache
* Update apt-get before installs
* sudo-install R packages
* Use R 3.5.2
* Fix sources list
* Add key for CRAN
* Send artefacts back to GitHub
* Fix version setup
* Add tag utility
* Ignore R version for now, R team should have kept 3.5 alone..
* Update setup to properly install R 3.5
* [9 debugging commits]
* Fix R setup setup
* Attempts to fix the problem with too long logs
  * Ignore deprecated
  * Try quiet installs
* Add explicit install of readat dependency
* More quiet arguments & debugs
* Move travis_wait to setup.sh
* Use workaround for travis_wait consuming the logs, see: travis-ci/travis-ci#4190 (comment)
* More improvements to Travis build
* Try to make better use of cache (manual, no sudo)
* Add quiet to devtools::install_url
* Local R lib setup attempts:
  * With .Renviron?
  * In home?
  * With mkdir and standard path
* Make sure interactive is on
* Try to install limma with Bioconductor
* Comment-out unnecessary env change & cleanup
* Use a single tag to force Travis to use cache
* Upgrade pip packages for reproducibility builds & revert
* Run nbpipeline from root
* Add raw samples data
* Enable Travis cache for notebooks
* Do not attempt to display graph in Travis console
* Remove spurious apt: true
lstipakov added a commit to lstipakov/openvpn that referenced this issue Nov 8, 2019
Use trick from

travis-ci/travis-ci#4190 (comment)

to make travis not to abort build if no
output produced for over 10 minutes.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2maz added a commit to 2maz/rock-package_set that referenced this issue Mar 5, 2020
chrjohn added a commit to chrjohn/quickfixj that referenced this issue Oct 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants