-
Notifications
You must be signed in to change notification settings - Fork 29
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
Service to download and serve a PR artifact #1754
Conversation
5734a09
to
89084bd
Compare
Codecov Report
@@ Coverage Diff @@
## master #1754 +/- ##
=======================================
Coverage 95.30% 95.30%
=======================================
Files 148 148
Lines 5328 5328
Branches 964 1019 +55
=======================================
Hits 5078 5078
Misses 203 203
Partials 47 47
Continue to review full report at Codecov.
|
89084bd
to
4dcd63e
Compare
You modified |
4dcd63e
to
b5555ce
Compare
Is anything special needed in regard to the personal token to make it work? For some reason I am getting no response from the API
|
ok basically pull/1754 won't work since it is on the upstream repo and not on a fork |
Also it seems that when running |
I tried quite a few times but things don't seem to work properly for me. Out of all the tries fetching worked once, most of the time it fails with In the one case where it finally worked, I could see no redirect to root. Could you describe how to replicate the redirect step by step? or provide a video of it happening if that is easier? |
This doesn't work because there's no such branch
No, it's not. If you look into the
This is a script error. Could be permissions or no artifact on given branch/PR. You can check the last script logs by running in parallel with the running compose (another terminal, same folder) something like: |
I fixed the redirect thing already on this PR, by moving router to |
b5555ce
to
1c3a944
Compare
I am gonna approve the PR but I have a last request. Can we also add a basic readme
|
9c64f69
to
ba71d9c
Compare
Fixes #1746 , #1749 and #1511
Short description
Provides a service to serve PR builds locally.
To test:
Create a
.env
file on theserve_pr
folder, containingCIRCLE_TOKEN=<your_token>
.Also, create a
serve_pr/app
folder and be sure it has write and execution permissions for user:groupnobody
, as nginx's process will try to run script and write to this folder as such.Then, after running
docker-compose up
, one should be able to go to https://localhost:8080/?branch=pull/1754 or any other PR/branch and get it downloaded and served on https://localhost:8080/pull/1754 . Notice the branch used on the first request needs to be the upstream branch: for PRs opened from external repo, it'll bepull/<#PR>
; for PRs opened from some upstream branch, it'll be the actual branch.To "refresh" the served files (e.g. after a new successful build), access the first (root+param) URL again.
One can also use the script directly, like:
The
-s
param will cause the build to be served on https://localhost:8080/ with apython -m http.server
.A README was added as per @kelsos request.
Definition of Done
Steps to manually test the change (dApp)