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

Add image building/pushing back to Travis #835

Merged
merged 1 commit into from
Aug 14, 2019
Merged

Add image building/pushing back to Travis #835

merged 1 commit into from
Aug 14, 2019

Conversation

johnSchnake
Copy link
Contributor

What this PR does / why we need it:
Got authorization to re-add credentials for image pushing to
Travis via their recommended approach outlined here:
https://docs.travis-ci.com/user/encrypting-files/

Which issue(s) this PR fixes
Fixes #808

Special notes for your reviewer:

Release note:

NONE

- ./travis-ci.sh

script:
- VERBOSE=true make test int
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Most of these changes are due to the fact that the travis cli tool edits/rewrites the .travis.yml file. So it is probably just a serialization improvement even if both are technically valid.

@codecov-io
Copy link

codecov-io commented Aug 13, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@4c07889). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##             master    #835   +/-   ##
========================================
  Coverage          ?   46.9%           
========================================
  Files             ?      75           
  Lines             ?    4667           
  Branches          ?       0           
========================================
  Hits              ?    2189           
  Misses            ?    2348           
  Partials          ?     130

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4c07889...af5e829. Read the comment docs.

@johnSchnake
Copy link
Contributor Author

johnSchnake commented Aug 14, 2019

So this is a 👍 to moving to CI at some point I think:
https://graysonkoonce.com/getting-the-current-branch-name-during-a-pull-request-in-travis-ci/

He ended up creating an issue here: travis-ci/travis-ci#6652
and you can see the lack of responsiveness :(

We'll need to adjust this script to deal with fact that the TRAVIS_BRANCH isn't what we think here.

Got authorization to re-add credentials for image pushing to
Travis via their recommended approach outlined here:
https://docs.travis-ci.com/user/encrypting-files/

Fixes #808

Signed-off-by: John Schnake <[email protected]>

script:
- export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
- echo "TRAVIS_BRANCH=$TRAVIS_BRANCH, PR=$TRAVIS_PULL_REQUEST, BRANCH=$BRANCH"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added these 2 for clarity; very unintuitive how $TRAVIS_BRANCH won't be the PRs branch. See the issues/article I linked to elsewhere on this PR.

function gcr_push() {
openssl aes-256-cbc -K $encrypted_222a2009ef6d_key -iv $encrypted_222a2009ef6d_iv -in heptio-images-c14f11347d8b.json.enc -out heptio-images-c14f11347d8b.json -d
gcloud auth activate-service-account --key-file heptio-images-c14f11347d8b.json
# https://github.com/travis-ci/travis-ci/issues/9905
Copy link
Contributor

Choose a reason for hiding this comment

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

This issue was closed. Do we still need to do the unset below?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

/shrug

I was just adding back the exact code that we previously had done this work. Let's just leave it (if it works) since this is all probably temporary anyways.

Copy link
Contributor

@zubron zubron Aug 14, 2019

Choose a reason for hiding this comment

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

this is all probably temporary anyways

That is a very good point. Ignore that comment then :)

@johnSchnake johnSchnake merged commit 83e39f2 into vmware-tanzu:master Aug 14, 2019
@johnSchnake johnSchnake deleted the buildPushInTravis branch August 14, 2019 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Requirement to move builds off of older Jenkins servers
3 participants