• Steve Azzopardi's avatar
    Use build timeout when shorter then session timeout · 5bac09cd
    Steve Azzopardi authored
    For `waitForTerminal` check if the build timeout is actually shorter
    then the terminal session timeout. If so, parse the time left, show it
    to the user and use it as a timeout as well.
    
    The reason `timeout` is being updated and used for `time.After` (in the
    select statement) is so we have a good seperation between when
    `ctx.Done` is being called because the user actually cancelled the build
    and when the context deadline is reached.
    
    Add `RoundDuration` which is the same as `time.duration.Round` but since
    we are using go1.8 it is missing.
    
    Add a test cases for each scenario `waitForTerminal` has.
    5bac09cd
Name
Last commit
Last update
.gitlab Loading commit data...
apps/gitlab-runner-helper Loading commit data...
cache Loading commit data...
ci Loading commit data...
commands Loading commit data...
common Loading commit data...
dockerfiles Loading commit data...
docs Loading commit data...
executors Loading commit data...
helpers Loading commit data...
log Loading commit data...
network Loading commit data...
packaging Loading commit data...
scripts Loading commit data...
session Loading commit data...
shells Loading commit data...
tests Loading commit data...
vendor Loading commit data...
.codeclimate.yml Loading commit data...
.dockerignore Loading commit data...
.env Loading commit data...
.gitignore Loading commit data...
.gitlab-ci.yml Loading commit data...
CHANGELOG.md Loading commit data...
CONTRIBUTING.md Loading commit data...
Dockerfile Loading commit data...
Gopkg.lock Loading commit data...
Gopkg.toml Loading commit data...
LICENSE Loading commit data...
Makefile Loading commit data...
Makefile.docker.mk Loading commit data...
NOTICE Loading commit data...
Procfile Loading commit data...
README.md Loading commit data...
VERSION Loading commit data...
config.toml.example Loading commit data...
install.sh Loading commit data...
main.go Loading commit data...