-
Notifications
You must be signed in to change notification settings - Fork 211
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
Old, modified way of deploying repository #205
Conversation
@@ -3,6 +3,9 @@ | |||
hosts: all | |||
become: true | |||
tasks: | |||
- import_role: | |||
name: ../../../deployment/roles/common | |||
tasks_from: dependencies |
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.
Need to add dependencies in this test scenario because otherwise there is no git
installed on host machine
tar zxfv monorepo.tar.gz && rm monorepo.tar.gz | ||
mkdir -p contracts && tar zxfv contracts.tar.gz -C ./contracts && rm contracts.tar.gz | ||
# If this is a forked PR, the branch needs to be fetched in a special way | ||
[ ! "CIRCLE_PR_NUMBER" = "" ] && git fetch --force origin -- "{{ bridge_repo_branch }}/head:remotes/origin/{{ bridge_repo_branch }}" |
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.
CIRCLE_PR_NUMBER
is only available on forked PR. So if it is available, we fetch the forked branch in a special way.
@@ -2,8 +2,10 @@ | |||
cd $(dirname $0) | |||
set -e # exit when any command fails | |||
|
|||
CODEBASE_BRANCH=${CIRCLE_BRANCH-$(git symbolic-ref --short HEAD)} |
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.
will it still be possible to run e2e
deployment tests locally?
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 question.
- In a normal repository - yes
- In a forked repository - I will work on it now and make sure that it is possible
tar zxfv monorepo.tar.gz && rm monorepo.tar.gz | ||
mkdir -p contracts && tar zxfv contracts.tar.gz -C ./contracts && rm contracts.tar.gz | ||
# If this is a forked PR, the branch needs to be fetched in a special way | ||
[ ! "CIRCLE_PR_NUMBER" = "" ] && git fetch --force origin -- "{{ bridge_repo_branch }}/head:remotes/origin/{{ bridge_repo_branch }}" |
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.
does it make sense to limit the number of downloaded artifacts by --depth
parameter?
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 idea. Done in a4caf18
@akolotov I have trouble making it work on forked PRs. Turns out, the tests were passing before for the wrong reason. I found that I had two branches named the same way on both forked and original repository, and it was actually checking out the wrong one! My current opinion is that approach to When running
If something gets wrong, it is easy to overlook, because the codebase from original repository's I think that our current approach is better and simpler. The tasks to tar/untar are complex, but the principles are simple:
In conclusion, I argue that it would be better to leave our current approach with copying repository as it is. |
Thanks @rzadp for detailed explanation. Please add this comment to the issue #200. |
If nothing is going to be changed as part of this PR, please close it. |
rsync
#202