-
Notifications
You must be signed in to change notification settings - Fork 98
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
chore: add hash.txt to the public folder #1010
Conversation
@NoamGaash Added comment from previous commit for context: In short, updated the commit hash in hash.txt in the build.yaml file seems like you're testing for the existence of public/hash.txt - and I don't think we should expect this file to be found in this stage because this job is not the same job that created this file. Updated this commit according to what you asked |
23d59a7
to
1d0f6b6
Compare
Updated the test in the validate section. It seems now that it redirects it to the main page again for my opinion ( this is why we have 3100 chars and not less than 100 ) |
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.
Great!
Try to run the image locally and see A) if it has the file inside the public
directory and b) if it serve it
.github/workflows/validate.yaml
Outdated
exit 1 | ||
fi | ||
mime_type=$(file --mime-type -b /tmp/hash.txt) | ||
if [ "$mime_type" != "text/html" ]; then |
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.
if [ "$mime_type" != "text/html" ]; then | |
if [ "$mime_type" != "text/plain" ]; then |
Hi Noam ,tried to run the docker locally. This is the output: ofirc/open-bus-map-search (test_hash_in_app)$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
open_bus latest 9e8f77ea18d0 2 minutes ago 160MB
ofirc/open-bus-map-search (test_hash_in_app)$ sudo docker run -d 9e8f77ea18d0
85559e94b7d7cf780b8325decbe9e5ce187f54c525af482a49946db99e2a1954
ofirc/open-bus-map-search (test_hash_in_app)$ sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
85559e94b7d7 9e8f77ea18d0 "/docker-entrypoint.…" 22 seconds ago Up 21 seconds 80/tcp focused_ellis
ofirc/open-bus-map-search (test_hash_in_app)$ sudo docker exec -it 85559e94b7d7 /bin/bash
root@85559e94b7d7:/# ls
bin boot dev docker-entrypoint.d docker-entrypoint.sh etc home lib lib64 media mnt opt proc root run sbin srv sys tmp usr var It seems we don't have the public directory locally. Any advise on how to debug it? |
I've tried the following: First, I created an empty docker build . -t noam
docker run noam and inside the image: root@90b4176d6842:/# cd /usr/share/nginx/html/
root@90b4176d6842:/usr/share/nginx/html# ls
50x.html bus-groups hello.txt marker-bus-stop.png operators-logos social-image.png
_redirects bus-logos index.html marker-dot.png robots.txt storybook
assets favicon.ico manifest.json marker-icon.png service-worker.js seems like
I see that the commit hash step is in the build.yml and not in the docker build - you can see inside the Dockerfile that when building the docker image we build databus from scratch and that's why the commit status wasn't included. Thank! |
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.
if you're good with those changes, please feel free to merge
fix: add test for checking existannce of public/hash.txt file