Skip to content
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

Github action "Copy site to sourceforge" #12081

Closed
romani opened this issue Aug 21, 2022 · 8 comments · Fixed by #12420
Closed

Github action "Copy site to sourceforge" #12081

romani opened this issue Aug 21, 2022 · 8 comments · Fixed by #12420

Comments

@romani
Copy link
Member

romani commented Aug 21, 2022

https://github.com/checkstyle/contribution/blob/master/releasenotes-builder/diagrams-manual-trigger.md

we need to make action to do run Github action "Copy site to sourceforge '10.3.1'" (action takes human provided version as input)
see https://github.com/checkstyle/checkstyle/blob/master/.ci/copy-site-to-sourceforge.sh, reuse it.
see when I executed such script https://github.com/checkstyle/checkstyle/wiki/How-to-make-a-release#perform-release-build

for testing, create your own projects on sourceforge and test script execution.

ATTENTION: lest postpone this task for later....
There might be BIG problem to authorize copy by SSH/SCP, I am still placing password manually(interactive mode), it will be blocker during execution in girhub (non-interactive mode)

✔ ~/java/github/checkstyle/checkstyle [master|✔] 
 $ ./.ci/copy-site-to-sourceforge.sh $PREV_RELEASE $NEW_RELEASE
PREVIOUS RELEASE version:10.3
RELEASE version:10.3.1
Please provide password for romanivanov,checkstyle@shell.sourceforge.net
Pseudo-terminal will not be allocated because stdin is not a terminal.

You already have a shell created.

Clone by ssh only to avoid passwords on push
Cloning into 'checkstyle.github.io'...

strange it works fine now.

@Rahulkhinchi03
Copy link
Member

I am not sure with Sourceforge but How do you resolve this when uploading to Sourceforge? Please provide feedback.

FROM: https://github.com/checkstyle/checkstyle/blob/master/.ci/copy-site-to-sourceforge.sh#L37-L39

Uploading to sourceforge ...
scp: /home/project-web/checkstyle/: Is a directory
rahul@rk7:~/Desktop/opensource/checkstyle$ 

-> I am using checkstyle.github.io as a special repo and uploading this project only.

@romani
Copy link
Member Author

romani commented Aug 27, 2022

scp: /home/project-web/checkstyle/: Is a directory

is folder in sourceforge host. you need to modify my script to copy to your folder.

We need to find way to copy files to sourceforge without interactive request for password. Please contact sourceforge support to ask them to help how to do scp <file on laptop> <folder in sourceforge host> without password and do it from Github Action or any other CI.

@romani
Copy link
Member Author

romani commented Sep 5, 2022

https://linuxhint.com/use-sshpass-for-non-interactive-login/
workaround for sourceforge interactive mode:

$ sudo apt install sshpass
$ export SSHPASS='your password'
$ export SF_USER=your_user
$ echo "exit" | sshpass -e ssh -t $SF_USER,checkstyle@shell.sourceforge.net create
Pseudo-terminal will not be allocated because stdin is not a terminal.

Requesting a new shell for "your_user" and exiting when it is ready.
queued... creating... starting...

So we need action that installs sshpass
repo will have two secrets: SF_USER, SF_PASS
action will init environment variables: SF_USER, SSHPASS

@Rahulkhinchi03
Copy link
Member

Rahulkhinchi03 commented Sep 5, 2022

sshpass action:

    - name: Run sshpass commands
      uses: matheusvanzan/sshpass-action@v2
      with:
        host: ${{ secrets.HOST }}
        user: ${{ secrets.SF_USER }}
        key: ${{ secrets.SF_PASS }}
        run: |

@romani
Copy link
Member Author

romani commented Sep 5, 2022

No need, just install this tool and let's use it

@stoyanK7
Copy link
Collaborator

stoyanK7 commented Nov 16, 2022

On it.

Edit: Was in the middle of making it work and I think my Sourceforge account got taken down. Waiting for a response from support. Will come back to it when resolved.

@romani
Copy link
Member Author

romani commented Nov 17, 2022

Do you have any other remote host that allows ssh/scp copy of files ?

We can abstract Sourceforge as just shh host.

@stoyanK7
Copy link
Collaborator

Everything seems to be fine now. Got my access back. Will try to have MR by today/tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
3 participants