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
ci: clean up logging and error handling on travis #14425
Conversation
315a162
to
5d3380f
Compare
7173c27
to
ba98493
Compare
fi | ||
|
||
|
||
RED='\033[0;31m' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@StephenFluin please make this even more awesome
ln -s ../../../../node_modules/angular/angular.js . | ||
ln -s ../../../../bower_components/polymer . | ||
ln -s ../../../../node_modules/incremental-dom/dist/incremental-dom-cjs.js | ||
cd - |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works just as well, but I find pushd
/popd
a little more readable for things like this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is code I didn't want to touch because Jason is rewriting it. it can be much cleaner. I'll leave that for a followup pr
parent.sh
Outdated
@@ -0,0 +1,9 @@ | |||
#!/usr/bin/env bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a test file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes. I'll remove this.
scripts/ci-lite/_travis_fold.sh
Outdated
# strip trailing "-" | ||
sanitizedFoldName=${sanitizedFoldName%-} | ||
local returnArrow="<=== ${foldName} <==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==" | ||
# keep all messages consistently wide 80chars regardless of the foldName |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
100chars per the truncation, not 80.
scripts/ci-lite/_travis_fold.sh
Outdated
|
||
|
||
|
||
#[0Ktravis_fold:start:install |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this example syntax?
scripts/ci-lite/deploy.sh
Outdated
e2e) | ||
travisFoldStart "deploy.packages" | ||
./scripts/publish/publish-build-artifacts.sh | ||
travisFoldStart "deploy.packages" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
travisFoldEnd
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch!
echo 'travis_fold:end:test_saucelabs' | ||
travisFoldStart "test.unit.saucelabs" | ||
./scripts/sauce/sauce_connect_block.sh | ||
SAUCE_ACCESS_KEY=`echo $SAUCE_ACCESS_KEY | rev` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't set -x
print this out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to check
1a5ef45
to
6ea5373
Compare
|
||
echo 'travis_fold:end:test.unit.localChrome' | ||
travisFoldStart "test.unit.localChrome" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not related to this PR, but any idea what localChrome
refers to here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's a mode where we run our unit tests quickly on local chrome to verify that they pass. it give us faster response than SL/BS browsers
scripts/ci-lite/cleanup.sh
Outdated
cd ../.. | ||
|
||
source ${TRAVIS_BUILD_DIR}/scripts/ci-lite/_travis_fold.sh | ||
source ${TRAVIS_BUILD_DIR}/scripts/ci-lite/env.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't the check of TRAVIS_TEST_RESULT
in env.sh
abort cleanup.sh
in case of error?
echo ${enterArrow:0:100} | ||
# turn on verbose mode so that we have better visibility into what's going on | ||
# http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_02_03.html#table_02_01 | ||
set -x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be restored to the state before calling travisFoldStart
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, we actually want to turn on the xtrace at this point
} | ||
|
||
function travisFoldEnd() { | ||
set +x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't the flag be restored at the end of the function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nah. while possible, it's not trivial and in our case every travisFoldEnd is followed either by another travisFoldEnd or by travisFoldStart invocation
3d42a5b
to
79d5cad
Compare
6568f75
to
aa024fa
Compare
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
No description provided.