Skip to content
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.

[1.9.x] Fix for forked PRs. #373

Merged
merged 2 commits into from
Nov 6, 2019
Merged

Conversation

scottarnette
Copy link
Contributor

@scottarnette scottarnette commented Nov 6, 2019

Change Description

We have noticed several PRs from forked repositories are failing in Travis. This was determined to be caused by Travis builds being unable to determine the dependent eosio and eosio.cdt versions via the Github API.

Fixed CI issues regarding forked PRs:

  • If the build source is not Buildkite, we fall back to using other methods to determine dependencies as defined in pipeline.jsonc.
    • For the EOSIO dependency, this is easy because we already push docker images named by both branch name and commit hash. Buildkite still determines the latest commit hash if the dependency is a branch while Travis will just use the latest branch image if defined that way.
    • For the CDT dependency, this is a bit brute-forced since CDT binaries are stored by a shorted commit hash. This now clones the eosio.cdt repository and checkouts the defined dependency (branch or commit hash). Then, git rev-parse --verify HEAD is executed to determine the HEAD commit hash, just incase the dependency is referenced by branch. I am open to other suggestions for determining the CDT binary to install.

See:
https://travis-ci.com/EOSIO/eosio.contracts/builds/135300601 | Travis build non-forked.
https://travis-ci.com/EOSIO/eosio.contracts/builds/135301926 | Travis build from forked PR.
https://buildkite.com/EOSIO/eosio-dot-contracts/builds/784 | Unaffected Buildkite build.

Deployment Changes

  • Deployment Changes

API Changes

  • API Changes

Documentation Additions

  • Documentation Additions

@scottarnette scottarnette merged commit 1a2ba3f into release/1.9.x Nov 6, 2019
@scottarnette scottarnette deleted the cicd-fork-fix-r1.9 branch November 6, 2019 21:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants