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

ci: clean up logging and error handling on travis #14425

Merged
merged 1 commit into from Mar 2, 2017

Conversation

IgorMinar
Copy link
Contributor

No description provided.

@IgorMinar IgorMinar force-pushed the speed-up-ci branch 3 times, most recently from 315a162 to 5d3380f Compare February 12, 2017 04:59
@IgorMinar IgorMinar force-pushed the speed-up-ci branch 4 times, most recently from 7173c27 to ba98493 Compare February 20, 2017 23:05
fi


RED='\033[0;31m'
Copy link
Contributor Author

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 -
Copy link
Member

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.

Copy link
Contributor Author

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
Copy link
Member

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?

Copy link
Contributor Author

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.

# strip trailing "-"
sanitizedFoldName=${sanitizedFoldName%-}
local returnArrow="<=== ${foldName} <==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<==<=="
# keep all messages consistently wide 80chars regardless of the foldName
Copy link
Member

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.




#travis_fold:start:install
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this example syntax?

e2e)
travisFoldStart "deploy.packages"
./scripts/publish/publish-build-artifacts.sh
travisFoldStart "deploy.packages"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

travisFoldEnd?

Copy link
Contributor Author

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`
Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to check


echo 'travis_fold:end:test.unit.localChrome'
travisFoldStart "test.unit.localChrome"
Copy link
Member

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?

Copy link
Contributor Author

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

cd ../..

source ${TRAVIS_BUILD_DIR}/scripts/ci-lite/_travis_fold.sh
source ${TRAVIS_BUILD_DIR}/scripts/ci-lite/env.sh
Copy link
Member

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
Copy link
Member

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?

Copy link
Contributor Author

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
Copy link
Member

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?

Copy link
Contributor Author

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

@IgorMinar IgorMinar force-pushed the speed-up-ci branch 2 times, most recently from 3d42a5b to 79d5cad Compare February 22, 2017 11:08
@IgorMinar IgorMinar changed the title ci: clean up and speed up travis setup ci: clean up logging on travis Feb 23, 2017
@IgorMinar IgorMinar changed the title ci: clean up logging on travis ci: clean up logging and error handling on travis Feb 23, 2017
@IgorMinar IgorMinar force-pushed the speed-up-ci branch 8 times, most recently from 6568f75 to aa024fa Compare February 24, 2017 18:25
@IgorMinar IgorMinar merged commit a24e652 into angular:master Mar 2, 2017
@usernamealreadyis
Copy link

#9104

SamVerschueren pushed a commit to SamVerschueren/angular that referenced this pull request Mar 18, 2017
asnowwolf pushed a commit to asnowwolf/angular that referenced this pull request Aug 11, 2017
juleskremer pushed a commit to juleskremer/angular that referenced this pull request Aug 28, 2017
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants