Image-sequencer: IS Nightly

Created on 15 Mar 2019  ยท  101Comments  ยท  Source: publiclab/image-sequencer

@jywarren @publiclab/is-reviewers how about creating an IS nightly website where daily builds are pushed? The page can be updated everyday after all the PRs of that day are merged. It will be different from the sequencer.publiclab.org website since only stable versions are pushed there. This will help users find bugs in the latest code easily and be like beta testers without having to clone the repo and do all the things the developers do. This can be like an end user feedback form. What are your thoughts??


Thank you!

Your help makes Public Lab better! We deeply appreciate your helping refine and improve this site.

To learn how to write really great issues, which increases the chances they'll be resolved, see:

https://publiclab.org/wiki/developers#Contributing+for+non-coders

discussion

All 101 comments

Hi, I think this is a cool idea; we might start with weekly to make it a
bit easier? Would we run it from another account's github pages? And could
there be some automation to help this go smoother? For example, who would
do the updating? Would they have to run a script each day?

Thanks for this cool idea!

On Fri, Mar 15, 2019 at 3:09 AM Harsh Khandeparkar notifications@github.com
wrote:

@jywarren https://github.com/jywarren @publiclab/is-reviewers
https://github.com/orgs/publiclab/teams/is-reviewers how about creating
an IS nightly website where daily builds are pushed? The page can be
updated everyday after all the PRs of that day are merged. It will be
different from the sequencer.publiclab.org website since only stable
versions are pushed there. This will help users find bugs in the latest
code easily and be like beta testers without having to clone the repo and
do all the things the developers do. This can be like an end user feedback

form. What are your thoughts??

Thank you!

Your help makes Public Lab better! We deeply appreciate your helping
refine and improve this site.

To learn how to write really great issues, which increases the chances
they'll be resolved, see:

https://publiclab.org/wiki/developers#Contributing+for+non-coders

โ€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/image-sequencer/issues/857, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AABfJ_XvynSQSUqH8jxwWdCJF8DV5QR1ks5vW0bmgaJpZM4b11xV
.

How about runing it on jywarren/image-sequencer? Can you update it yourself?

I don't think i could keep up -- i'm already struggling a bit to stay
current. This is one reason I thought of an automated solution. Or if
someone wants to volunteer?

On Fri, Mar 15, 2019 at 2:22 PM Harsh Khandeparkar notifications@github.com
wrote:

How about runing it on jywarren/image-sequencer? Can you update it
yourself?

โ€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/image-sequencer/issues/857#issuecomment-473393878,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJ_FsYzDweiz9YuDgSvTuhSkcW9U1ks5vW-TUgaJpZM4b11xV
.

It can be hosted on maybe sequencer.beta.publiclab.org and since prs are not merged everyday, it can be updated when they are. What do you say? Can you do that? Just merging gh-pages with publicab/main every night(when prs are merged)??

Is there a bot which can help?

I would have been more than happy to volunteer but I will be busy for 2 yrs as I have mentioned many times bfore.

There is a way to automate this....

Does PL have a server which runs 24hrs?

@subhahu123 do you have any good ideas for this?

@Harshithpabbati

Yeah !!

Do you know some way to do this auto updating? A bit maybe?

I will check through this.

Or else I can volunteer for this to update them.

Oh Awesome. You can ask @jywarren about that. Thank you.

Do you use linux btw? @Harshithpabbati

Yeah.

I can write a script for you if you want. You can type update-is in the terminal and it will do everything for you and finally ask for your github username. Shall I do that. It won't be very difficult.

Ok thanks for that!!

Cool. Should it be update-is or something else?

Make it update-is no prob.

Ok. The script is really easy actually.

Edit: posted below

This will ask for your username and password.

You can create a directory named bin in your home folder /home/[username]/

create a file named update-is without any extension in the bin folder. Drop the code mentioned above and run this command

username@pc:~$ sudo chmod +x ~/bin/update-is

That is it.

You can try this out right now. You will have to initialize gh-pages though. Please note that this will directly copy the code here and it will not work if you have the /image-sequencer/ in the URL as the manifest.json will not allow you to do that. So you will have to host this on some actual URL like beta.sequencer.publiclab.org. I don't know how you can do that but you can ask @jywarren for the hosting. To redirect to that URL you can change the file CNAME and the script already does that. Thank you.

Thanks @harshkhandeparkar

I have edited the comment. Please read it again

@HarshKhandeparkar hey did you renamed it as is ???

Renamed what?

Getting an error when i tried to run it.

Can you please tell me the error?

update
see this.

Sorry for that. I have updated the comment again.

Btw you dont have to cd image-sequencer

Another update. Just enhanced the script.

Reposting full script
Edit: reposted below.

Done !! Thanks :+1:

Cool!

but i can't get the node modules .

I can't see a gh-pages branch in your fork.

Please initialize github pages for your fork in the repo settings.

It's not working.

Error?

no. I made it but the changes were not done. I am doing it manually now.

Have you initialised GitHub pages?

You will see something like this in the settings of your fork

edit: img not reqd

yeah.

Totally awesome!!

@jywarren Harshithpabbati has agreed to volunteer. We have managed to automate the process. We have even changed the CNAME to beta.sequencer.publiclab.org can we host his gh-pages on beta.sequencer.publiclab.org?

@Harshithpabbati can you document this somewhere?

@harshkhandeparkar what should I do?? I mean documentation.

Should I write the process what we want to do??

We can just add a line linking to this website once it is hosted on beta.sequencer.publiclab.org.

You can update this whenever you get time. Try to do this daily after all the prs are merged. Since the timezones do not match, you can update at any time of the day. No need to update if no prs have been merged.

Thanks a ton!!

Ha ok. I have a how to link it to beta.sequencer.publiclab.org???

You can add a line to the CONTRIBUTING.md file or add a link in the webpage footer or both. But lets wait for @jywarren's thoughts on this and lets wait to get this hosted on beta.sequencer.publiclab.org. The full link will have https:// i.e. https://beta.sequencer.publiclab.org

@Harshithpabbati wherever your main clone of image-sequencer is on your pc, it will not be touched. You can run this command from any directory and your main clone will not get affected and nothing will change on your system. You can run the command as many times as you want.

Yeah I know it.

When we get permission to host on beta.sequencer.publiclab.org, opening harshithpabbati.github.io/image-sequencer will redirect to that. You probably don't have to do anything. @jywarren will give you further instructions and provide permissions to the domain. You just have to update your gh-pages. Maybe the main stable website sequencer.publiclab.org can be updated every month? Any thoughts on this? Improvements? Other ideas? Finishing touches?

Yeah it's fine :)

@harshkhandeparkar I runned it but it is not working .

I mean there is no change in gh-pages

terminal
see this I was not asked with github username and password.

Ok I guess the remote has to be adder manually. Wait a min. I will change that.

Reposted . @Harshithpabbati try making these changes.

Edit: reposted below

check
see this @HarshKhandeparkar

A small change, now it will not ask for anything.

Edit: reposted below

Everytime when i run this. It is cloning again.

It has to clone again to make sure that no old changes conflict with the latest version. Myabe the branch was changed somehwere else, but the local was not changed. So it clones everytime.

css
See the css @HarshKhandeparkar

I think @aashna27 is fixing this issue.

Great! Edge detect PR changes have been added.

Another small change. Sorry @Harshithpabbati
Edit: reposted below

@jywarren what do you say ???

Oh my goodness so much happened in this thread. ๐Ÿ˜…

This looks great. I'll repoint beta.x and perhaps we can do a few things
next:

  1. if the script is confirmed to be working, could we make it into a Grunt
    or npm task?
  2. maybe icarito can set this up for us in Jenkins as a regular task once
    we test it out a bit

Thanks!

On Mon, Mar 18, 2019 at 4:26 AM Harshith pabbati notifications@github.com
wrote:

@jywarren https://github.com/jywarren what do you say ???

โ€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/image-sequencer/issues/857#issuecomment-473813746,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJ-tcjRxPf0XGYkF-DU7wUNTKyEtHks5vX02igaJpZM4b11xV
.

This is not a js script but instead it is a bash script which runs on the pc and also it is specific for harshith's account. It clones his repo and checks out gh-pages and merges with main, builds dist, force commits node_modules and pushes to his gh-pages by asking for a password.

So what it does is it clones the repo in a hidden folder on his pc's home folder (in linux) and does all of the processing/updating there.

For sure, but npm scripts don't need to be JS - they can run shell scripts
too. Would it be possible to adapt it to take inputs or otherwise detect
your github username/branch etc? Thanks! Just trying to think how we'd
adapt this for a bot to use, for example.

On Mon, Mar 18, 2019 at 12:33 PM Harsh Khandeparkar <
[email protected]> wrote:

This is not a js script but instead it is a bash script which runs on the
pc and also it is specific for harshith's account. It clones his repo
and checks out gh-pages and merges with main, builds dist, force commits
node_modules and pushes to his gh-pages by asking for a password.

So what it does is it clones the repo in a hidden folder on his pc's
home folder (in linux) and does all of the processing/updating there.

โ€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/image-sequencer/issues/857#issuecomment-473992840,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJyz5qS5TxZ3IFLSRQP6_O4ZVJ5Kpks5vX7-ngaJpZM4b11xV
.

Can a bot have repos?

Yeah we can take input and can make it run.

Oh yah the bot can't have the repo ๐Ÿ˜…

I will repost this such that everyone can use this .

@jywarren does PL have a server which runs 24x7??

Yes we do!

On Mon, Mar 18, 2019 at 1:34 PM Harsh Khandeparkar notifications@github.com
wrote:

@jywarren https://github.com/jywarren does PL have a server which runs
24x7??

โ€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/image-sequencer/issues/857#issuecomment-474022297,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJyFkiu6XsQLQ_gcJIeL5myDFqVc1ks5vX84KgaJpZM4b11xV
.

I also use my own publish to gh-pages script, fwiw:

git checkout main
git pull publiclab main
git checkout gh-pages
git merge main -m 'merge from main'
npm install
git add -f node_modules package-lock.json # inefficient because we don't really need ALL node modules...
git commit -m 'added node modules for gh-pages demo'
git push publiclab gh-pages
git checkout main
npm install

Also, i just released the latest to https://sequencer.publiclab.org and pointed beta.sequencer.publiclab.org to https://harshithpabbati.github.io/image-sequencer/!

@jywarren check the url beta.sequencer.publiclab.org i cant get it.

ah, you need to add a CNAME file!

Where should i add it ??? in gh-pages branch ??

That's right!

On Mon, Mar 18, 2019, 9:23 PM Harshith pabbati notifications@github.com
wrote:

Where should i add it in gh-pages branch ??

โ€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/image-sequencer/issues/857#issuecomment-474161448,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJ4u1vnStA044RBNpHudxDToekg8Uks5vYDvfgaJpZM4b11xV
.

Hello harshith, the last revision of the script I made actually creates the CNAME file and also points to beta.sequencer.publiclab.org. Please change your script locally.
Reposting

#!/bin/bash
set -e

if [ -d ~/.is ];
then
  pushd ~/.is

  if [ -d ~/.is/image-sequencer/ ];
  then
    rm -rf ~/.is/*
  fi
    git clone https://github.com/Harshithpabbati/image-sequencer.git

    pushd ~/.is/image-sequencer/
    git checkout gh-pages
    git remote add upstream https://github.com/publiclab/image-sequencer.git
    git fetch upstream
    git merge -f upstream/main
    npm run setup
    grunt browserify
    grunt uglify

    if [ ! -f CNAME ];
    then
      touch CNAME
    fi
    echo "beta.sequencer.publiclab.org" > CNAME

    git add .
    git add -f node_modules/
    git commit -m "update"
    git push

    popd 
    popd
else
  mkdir ~/.is
  update-is
fi

Hey harshith, would you mind posting the update script somewhere on github so I can propose cahnges whenever needed? When we add the dist files to gitignore, the script will have to be changed, if anything breaks, I can open a pr and then you can pull the latest script when ot gets updated. Would you mind putting it on github?

Ok where should I keep it ?? In my repos??

Anywhere you like. Just tell me where. Thanks.๐Ÿ˜Š

Fine i will create a repo and I will send you the link.

@Harshithlabbati a new pr was juet merged! Please run the script. Also please make sure that you have the latest version that I had posted. It adds the CNAME file to the branch. Let's see if beta.sequencer.publiclab.org redirects.

Yeah it's redirecting :+1:

I will close this issue in a pr where this is documented in README.md file. @jywarren I noticed that the description of this repo has the link http://sequencer.publiclab.org can it be changed to have https?

Yes that'd be great but I also set it up to force https now.

On Tue, Mar 19, 2019, 8:38 AM Harsh Khandeparkar notifications@github.com
wrote:

I will close this issue in a pr where this is documented in README.md
file. @jywarren https://github.com/jywarren I noticed that the
description of this repo has the link http://sequencer.publiclab.org can
it be changed to have https?

โ€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/image-sequencer/issues/857#issuecomment-474344056,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJ2KFzvDAaJfk6wN41fWaxQejLKtkks5vYNoLgaJpZM4b11xV
.

Do I need to document about beta.sequencer.publiclab.org

Ok I am done with the script.

I will do the documentation

Ok fine thanks.

Hi @harshithpabbati @HarshKhandeparkar shall we place this script in a /scripts/ folder in the repository? Thanks!

The core script is in my repo HarshKhandeparkar/Update-is and the github action is in Harshith's repo. We can definitely migrate the script but that won't change Harshith's github action.

Yes @jywarren, we can do that.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jywarren picture jywarren  ยท  5Comments

VladimirMikulic picture VladimirMikulic  ยท  3Comments

blurry-x-face picture blurry-x-face  ยท  4Comments

jywarren picture jywarren  ยท  5Comments

jywarren picture jywarren  ยท  5Comments