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

Issue #12081: Add Github action 'Copy site to sourceforge' #12420

Merged
merged 1 commit into from Nov 24, 2022

Conversation

stoyanK7
Copy link
Collaborator

Resolves #12081


The job: https://github.com/stoyanK7/checkstyle/actions/runs/3488545560/jobs/5837520525

Even though it failed, the files got uploaded and are accessible at https://stoyank-checkstyle.sourceforge.io.
The job failed on the archiving part since (I suspect) there is some internal folder structure that I need to set up manually once before running the script for the first time. htdocs-version, htdocs/version folders and so on..

We introduce two new secrets:

@stoyanK7 stoyanK7 marked this pull request as ready for review November 17, 2022 13:30
@stoyanK7 stoyanK7 force-pushed the issue/12081-copy-to-sourceforge branch from 0ad5c9d to a1114a0 Compare November 17, 2022 13:33
@stoyanK7
Copy link
Collaborator Author

stoyanK7 commented Nov 17, 2022

@romani Let me know if indeed there is some internal folder structure that I need to set up manually so the script can run successfully. https://github.com/stoyanK7/checkstyle/actions/runs/3488545560/jobs/5837520525#step:4:6769

 Removing dtds folder from unsecure web site
Restoring folder with links to old releases
mv: cannot stat 'htdocs-10.4/version': No such file or directory
Archiving
Extracting archive to previous releases documentation
tar: htdocs-version: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
Making a link to make it accessible from web
ln: failed to create symbolic link '/home/project-web/stoyank-checkstyle/htdocs/version/10.4': No such file or directory
Error: Process completed with exit code 1.

@romani
Copy link
Member

romani commented Nov 18, 2022

$ ssh -t $SF_USER,checkstyle@shell.sourceforge.net create
Password: 

Requesting a new shell for "ro....ov" and waiting for it to start.
queued... creating... starting...

This is an interactive shell created for ro....ov.
Use the "timeleft" command to see how much time remains before shutdown.
Use the "shutdown" command to destroy the shell before the time limit.
For path information and login help, run "sf-help".

[ro....ov@shell-22002 ~]$ ls 
sfnet-logs-rsynced  userweb
[ro....ov@shell-22002 ~]$ cd /home/project-web/checkstyle/
[ro....ov@shell-22002 checkstyle]$ ls -la
total 16506
drwxr-x--x 1 dummy         48        8 Nov 18 14:41 .
drwxr-xr-x 4 root        root        4 Nov 18 14:39 ..
drwxr-xr-x 1 dummy         48       21 Aug 11  2008 cgi-bin
-rw-r----- 1 ro....ov   48 16900614 Oct 30 16:34 checkstyle.github.io.tar.gz
drwxr-x--x 1 ro....ov   48       77 Oct 30 16:33 htdocs
drwxr-x--x 1 ro....ov   48      112 Oct 30 16:39 htdocs-archive
drwxr-x--x 1 ro....ov   48      110 Oct 30 16:40 htdocs-version
drwxrwx--x 1 ro....ov   48       27 May 28  2018 old-htdocs-reports
drwxr-x--x 1 ro....ov   48        9 Aug 29  2021 reports
drwxrwx--x 1 ro....ov   48       12 Nov 30  2019 tmp
[ro....ov@shell-22002 checkstyle]$ cd htdocs-archive/
[ro....ov@shell-22002 htdocs-archive]$ ls -la
total 3442869
drwxr-x--x 1 ro....ov 48       112 Oct 30 16:39 .
drwxr-x--x 1 dummy       48         8 Nov 18 14:41 ..
-rw-r----- 1 ro....ov 48  18410613 Mar 27  2022 htdocs-10.0.tar.gz
-rw-r----- 1 ro....ov 48  18488369 Apr 24  2022 htdocs-10.1.tar.gz
-rw-r----- 1 ro....ov 48  18593208 May 29 15:06 htdocs-10.2.tar.gz
-rw-r----- 1 ro....ov 48  18667408 Jul 31 14:04 htdocs-10.3.1.tar.gz
-rw-r----- 1 ro....ov 48  18692968 Aug 28 14:42 htdocs-10.3.2.tar.gz
-rw-r----- 1 ro....ov 48  18798210 Sep 25 14:36 htdocs-10.3.3.tar.gz
-rw-r----- 1 ro....ov 48  16847508 Oct 30 16:39 htdocs-10.3.4.tar.gz
-rw-r----- 1 ro....ov 48  18612901 Jun 27 14:18 htdocs-10.3.tar.gz
-rw-rw---- 1 ro....ov 48   1191146 Feb  2  2015 htdocs-4.4.tar.gz
-rw-rw---- 1 ro....ov 48    941471 Feb  2  2015 htdocs-5.5.tar.gz
-rw-rw---- 1 ro....ov 48    940808 Feb  2  2015 htdocs-5.6.tar.gz
-rw-rw---- 1 ro....ov 48 336601176 Feb  2  2015 htdocs-5.7.tar.gz
-rw-rw---- 1 ro....ov 48   1962261 Feb  2  2015 htdocs-5.8.tar.gz
-rw-rw---- 1 ro....ov 48   1982077 Feb  2  2015 htdocs-5.9.tar.gz
.....
-rw-r----- 1 ro....ov 48   2949597 May 29  2018 htdocs-8.9.tar.gz
-rw-r----- 1 ro....ov 48  17546563 Oct 31  2021 htdocs-9.0.1.tar.gz
-rw-r----- 1 ro....ov 48  78728047 Oct  3  2021 htdocs-9.0.tar.gz
-rw-r----- 1 ro....ov 48  17557208 Nov 28  2021 htdocs-9.1.tar.gz
-rw-r----- 1 ro....ov 48  17625375 Jan 30  2022 htdocs-9.2.1.tar.gz
-rw-r----- 1 ro....ov 48  17573870 Dec 27  2021 htdocs-9.2.tar.gz
-rw-r----- 1 ro....ov 48  17900603 Feb 28  2022 htdocs-9.3.tar.gz
[ro....ov@shell-22002 htdocs-archive]$ cd ../htdocs-version/
[ro....ov@shell-22002 htdocs-version]$ ls -la
total 0
drwxr-x--x 1 ro....ov 48 110 Oct 30 16:40 .
drwxr-x--x 1 dummy       48   8 Nov 18 14:41 ..
drwxr-x--x 1 ro....ov 48  63 Mar 27  2022 htdocs-10.0
drwxr-x--x 1 ro....ov 48  63 Apr 24  2022 htdocs-10.1
drwxr-x--x 1 ro....ov 48  63 May 29 15:02 htdocs-10.2
drwxr-x--x 1 ro....ov 48  63 Jun 27 14:14 htdocs-10.3
drwxr-x--x 1 ro....ov 48  63 Jul 31 13:59 htdocs-10.3.1
drwxr-x--x 1 ro....ov 48  63 Aug 28 14:36 htdocs-10.3.2
drwxr-x--x 1 ro....ov 48  63 Sep 25 14:30 htdocs-10.3.3
drwxr-x--x 1 ro....ov 48  62 Oct 30 16:35 htdocs-10.3.4
drwxr-x--x 1 ro....ov 48  35 Jun 22  2019 htdocs-4.4
drwxr-x--x 1 ro....ov 48  45 Jun 22  2019 htdocs-5.5
drwxr-x--x 1 ro....ov 48  45 Jun 22  2019 htdocs-5.6
...
drwxr-x--x 1 ro....ov 48  63 Jan 30  2022 htdocs-9.2.1
drwxr-x--x 1 ro....ov 48  63 Feb 28  2022 htdocs-9.3

@romani
Copy link
Member

romani commented Nov 18, 2022

htdocs-version is for links at https://checkstyle.org/#Previous_Version_Documentation

htdocs-archive is simply archive, just in case.

@stoyanK7
Copy link
Collaborator Author

@romani Much better now except for the version folder that is expected here. I do not see you having it.

ln -f -s \$(pwd)/htdocs-version/htdocs-$PREV_RELEASE \$(pwd)/htdocs/version/$PREV_RELEASE

https://github.com/stoyanK7/checkstyle/actions/runs/3505485642/jobs/5871823126#step:4:6926

Linking to make it accessible from web
ln: failed to create symbolic link '/home/project-web/stoyank-checkstyle/htdocs/version/10.4': No such file or directory

@romani
Copy link
Member

romani commented Nov 20, 2022

06:45 $ SF_USER=ro....ov
✔ ~/java/github/checkstyle/contribution [nrmancuso/migrate-snap L|⚑ 1] 
06:48 $ ssh -t $SF_USER,checkstyle@shell.sourceforge.net create
Password: 

Requesting a new shell for "ro....ov" and waiting for it to start.
creating... starting...

This is an interactive shell created for ro....ov.
Use the "timeleft" command to see how much time remains before shutdown.
Use the "shutdown" command to destroy the shell before the time limit.
For path information and login help, run "sf-help".

[ro....ov@shell-22003 ~]$ cd /home/project-web/checkstyle/
[ro....ov@shell-22003 checkstyle]$ ls -la
total 16506
drwxr-x--x 1 dummy         48        8 Nov 18 14:41 .
drwxr-xr-x 4 root        root        4 Nov 20 14:49 ..
drwxr-xr-x 1 dummy         48       21 Aug 11  2008 cgi-bin
-rw-r----- 1 ro....ov   48 16900614 Oct 30 16:34 checkstyle.github.io.tar.gz
drwxr-x--x 1 ro....ov   48       77 Oct 30 16:33 htdocs
drwxr-x--x 1 ro....ov   48      112 Oct 30 16:39 htdocs-archive
drwxr-x--x 1 ro....ov   48      110 Oct 30 16:40 htdocs-version
drwxrwx--x 1 ro....ov   48       27 May 28  2018 old-htdocs-reports
drwxr-x--x 1 ro....ov   48        9 Aug 29  2021 reports
drwxrwx--x 1 ro....ov   48       12 Nov 30  2019 tmp
[ro....ov@shell-22003 checkstyle]$ cd htdocs
[ro....ov@shell-22003 htdocs]$ ls -al
total 5376
drwxr-x--x 1 ro....ov 48      77 Oct 30 16:33 .
drwxr-x--x 1 dummy       48       8 Nov 18 14:41 ..
-rw-r--r-- 1 ro....ov 48     124 Oct 30 16:35 .htaccess
-rw-r----- 1 ro....ov 48   25010 Oct 30 16:33 anttask.html
drwxr-x--x 1 ro....ov 48      25 Oct 30 16:33 apidocs
-rw-r----- 1 ro....ov 48   12852 Oct 30 16:33 beginning_development.html
-rw-r----- 1 ro....ov 48   58388 Oct 30 16:33 checks.html
-rw-r----- 1 ro....ov 48    9853 Oct 30 16:33 ci-management.html
-rw-r----- 1 ro....ov 48   22783 Oct 30 16:33 cmdline.html
-rw-r----- 1 ro....ov 48   49323 Oct 30 16:33 config.html
-rw-r----- 1 ro....ov 48   73715 Oct 30 16:33 config_annotation.html
-rw-r----- 1 ro....ov 48   68806 Oct 30 16:33 config_blocks.html
-rw-r----- 1 ro....ov 48  345456 Oct 30 16:33 config_coding.html
-rw-r----- 1 ro....ov 48   69515 Oct 30 16:33 config_design.html
-rw-r----- 1 ro....ov 48   13535 Oct 30 16:33 config_filefilters.html
-rw-r----- 1 ro....ov 48  122507 Oct 30 16:33 config_filters.html
-rw-r----- 1 ro....ov 48   25848 Oct 30 16:33 config_header.html
-rw-r----- 1 ro....ov 48  122318 Oct 30 16:33 config_imports.html
-rw-r----- 1 ro....ov 48  182115 Oct 30 16:33 config_javadoc.html
-rw-r----- 1 ro....ov 48   79329 Oct 30 16:33 config_metrics.html
-rw-r----- 1 ro....ov 48  124635 Oct 30 16:33 config_misc.html
-rw-r----- 1 ro....ov 48   41187 Oct 30 16:33 config_modifier.html
-rw-r----- 1 ro....ov 48  152979 Oct 30 16:33 config_naming.html
-rw-r----- 1 ro....ov 48   71242 Oct 30 16:33 config_regexp.html
-rw-r----- 1 ro....ov 48   69129 Oct 30 16:33 config_sizes.html
-rw-r----- 1 ro....ov 48   13932 Oct 30 16:33 config_system_properties.html
-rw-r----- 1 ro....ov 48  174636 Oct 30 16:33 config_whitespace.html
-rw-r----- 1 ro....ov 48    9088 Oct 30 16:33 consulting.html
-rw-r----- 1 ro....ov 48   16915 Oct 30 16:33 contributing.html
drwxr-x--x 1 ro....ov 48       4 Oct 30 16:33 css
-rw-r----- 1 ro....ov 48   97687 Oct 30 16:33 dependencies.html
-rw-r----- 1 ro....ov 48   10938 Oct 30 16:33 dependency-info.html
-rw-r----- 1 ro....ov 48   33379 Oct 30 16:33 dependency-updates-report.html
-rw-r----- 1 ro....ov 48   10039 Oct 30 16:33 distribution-management.html
drwxr-x--x 1 ro....ov 48      34 Oct 30 16:33 dsm
-rw-r----- 1 ro....ov 48   14479 Oct 30 16:33 eclipse.html
-rw-r----- 1 ro....ov 48    8517 Oct 30 16:33 extending.html
-rw-r----- 1 ro....ov 48  322399 Oct 30 16:33 failsafe-report.html
drwxr-x--x 1 ro....ov 48       1 Oct 30 16:33 files
-rw-r----- 1 ro....ov 48  123447 Oct 30 16:33 google_style.html
-rw-r----- 1 ro....ov 48   13352 Oct 30 16:33 idea.html
drwxr-x--x 1 ro....ov 48      58 Oct 30 16:33 images
-rw-r----- 1 ro....ov 48   33522 Oct 30 16:33 index.html
-rw-r----- 1 ro....ov 48    9736 Oct 30 16:33 issue-management.html
-rw-r----- 1 ro....ov 48    8924 Oct 30 16:33 jdepend-report.html
drwxr-x--x 1 ro....ov 48       3 Oct 30 16:33 js
-rw-r----- 1 ro....ov 48   36396 Oct 30 16:33 licenses.html
-rw-r----- 1 ro....ov 48   10568 Oct 30 16:33 mailing-lists.html
-rw-r----- 1 ro....ov 48   10567 Oct 30 16:33 netbeans.html
-rw-r----- 1 ro....ov 48   11685 Oct 30 16:33 plugin-management.html
-rw-r----- 1 ro....ov 48   53704 Oct 30 16:33 plugin-updates-report.html
-rw-r----- 1 ro....ov 48   17396 Oct 30 16:33 plugins.html
-rw-r----- 1 ro....ov 48   92535 Oct 30 16:33 pmd.html
-rw-r----- 1 ro....ov 48   12332 Oct 30 16:33 project-info.html
-rw-r----- 1 ro....ov 48   11314 Oct 30 16:33 project-reports.html
-rw-r----- 1 ro....ov 48   41177 Oct 30 16:33 property_types.html
-rw-r----- 1 ro....ov 48  493366 Oct 30 16:33 releasenotes.html
-rw-r----- 1 ro....ov 48  113447 Oct 30 16:33 releasenotes_old_1-0_5-9.html
-rw-r----- 1 ro....ov 48  260674 Oct 30 16:33 releasenotes_old_6-0_7-8.html
-rw-r----- 1 ro....ov 48   16859 Oct 30 16:33 report_issue.html
lrwxrwxr-x 1 ro....ov 48      36 Oct 30 16:35 reports -> /home/project-web/checkstyle/reports
-rw-r----- 1 ro....ov 48    8361 Oct 30 16:33 running.html
-rw-r----- 1 ro....ov 48   10898 Oct 30 16:33 scm.html
-rw-r----- 1 ro....ov 48   10952 Oct 30 16:33 sponsoring.html
-rw-r----- 1 ro....ov 48    8231 Oct 30 16:33 style_configs.html
drwxr-x--x 1 ro....ov 48       2 Oct 30 16:33 styleguides
-rw-r----- 1 ro....ov 48   10622 Oct 30 16:33 summary.html
-rw-r----- 1 ro....ov 48   46087 Oct 30 16:33 sun_style.html
-rw-r----- 1 ro....ov 48 1396521 Oct 30 16:33 surefire-report.html
-rw-r----- 1 ro....ov 48    9410 Oct 30 16:33 taglist.html
-rw-r----- 1 ro....ov 48   13054 Oct 30 16:33 team.html
drwxr-xr-x 1 ro....ov 48     110 Oct 30 16:40 version
-rw-r----- 1 ro....ov 48   46105 Oct 30 16:33 writingchecks.html
-rw-r----- 1 ro....ov 48   13464 Oct 30 16:33 writingfilefilters.html
-rw-r----- 1 ro....ov 48   13628 Oct 30 16:33 writingfilters.html
-rw-r----- 1 ro....ov 48   51376 Oct 30 16:33 writingjavadocchecks.html
-rw-r----- 1 ro....ov 48   23375 Oct 30 16:33 writinglisteners.html
drwxr-x--x 1 ro....ov 48       6 Oct 30 16:33 xref
drwxr-x--x 1 ro....ov 48       9 Oct 30 16:33 xref-test
[ro....ov@shell-22003 htdocs]$ cd version/
[ro....ov@shell-22003 version]$ ls -la
total 55
drwxr-xr-x 1 ro....ov 48 110 Oct 30 16:40 .
drwxr-x--x 1 ro....ov 48  77 Oct 30 16:33 ..
lrwxrwxr-x 1 ro....ov 48  55 Mar 27  2022 10.0 -> /home/project-web/checkstyle/htdocs-version/htdocs-10.0
lrwxrwxr-x 1 ro....ov 48  55 Apr 24  2022 10.1 -> /home/project-web/checkstyle/htdocs-version/htdocs-10.1
lrwxrwxr-x 1 ro....ov 48  55 May 29 15:06 10.2 -> /home/project-web/checkstyle/htdocs-version/htdocs-10.2
lrwxrwxr-x 1 ro....ov 48  55 Jun 27 14:18 10.3 -> /home/project-web/checkstyle/htdocs-version/htdocs-10.3
lrwxrwxr-x 1 ro....ov 48  57 Jul 31 14:05 10.3.1 -> /home/project-web/checkstyle/htdocs-version/htdocs-10.3.1
lrwxrwxr-x 1 ro....ov 48  57 Aug 28 14:42 10.3.2 -> /home/project-web/checkstyle/htdocs-version/htdocs-10.3.2
lrwxrwxr-x 1 ro....ov 48  57 Sep 25 14:36 10.3.3 -> /home/project-web/checkstyle/htdocs-version/htdocs-10.3.3
lrwxrwxr-x 1 ro....ov 48  57 Oct 30 16:40 10.3.4 -> /home/project-web/checkstyle/htdocs-version/htdocs-10.3.4
lrwxrwxr-x 1 ro....ov 48  54 Jun 30  2018 4.4 -> /home/project-web/checkstyle/htdocs-version/htdocs-4.4
lrwxrwxr-x 1 ro....ov 48  54 Jun 30  2018 5.5 -> /home/project-web/checkstyle/htdocs-version/htdocs-5.5
lrwxrwxr-x 1 ro....ov 48  54 Jun 30  2018 5.6 -> /home/project-web/checkstyle/htdocs-version/htdocs-5.6
lrwxrwxr-x 1 ro....ov 48  54 Jun 30  2018 5.7 -> /home/project-web/checkstyle/htdocs-version/htdocs-5.7
lrwxrwxr-x 1 ro....ov 48  54 Jun 30  2018 5.8 -> /home/project-web/checkstyle/htdocs-version/htdocs-5.8
lrwxrwxr-x 1 ro....ov 48  54 Jun 30  2018 5.9 -> /home/project-web/checkstyle/htdocs-version/htdocs-5.9
lrwxrwxr-x 1 ro....ov 48  54 Jun 30  2018 6.0 -> /home/project-web/checkstyle/htdocs-version/htdocs-6.0
lrwxrwxr-x 1 ro....ov 48  54 Jun 30  2018 6.1 -> /home/project-web/checkstyle/htdocs-version/htdocs-6.1
......
lrwxrwxr-x 1 ro....ov 48  56 Oct 31  2021 9.0.1 -> /home/project-web/checkstyle/htdocs-version/htdocs-9.0.1
lrwxrwxr-x 1 ro....ov 48  54 Nov 28  2021 9.1 -> /home/project-web/checkstyle/htdocs-version/htdocs-9.1
lrwxrwxr-x 1 ro....ov 48  54 Dec 27  2021 9.2 -> /home/project-web/checkstyle/htdocs-version/htdocs-9.2
lrwxrwxr-x 1 ro....ov 48  56 Jan 30  2022 9.2.1 -> /home/project-web/checkstyle/htdocs-version/htdocs-9.2.1
lrwxrwxr-x 1 ro....ov 48  54 Feb 28  2022 9.3 -> /home/project-web/checkstyle/htdocs-version/htdocs-9.3

@romani romani self-assigned this Nov 20, 2022
@stoyanK7 stoyanK7 force-pushed the issue/12081-copy-to-sourceforge branch from a1114a0 to 45d93a5 Compare November 20, 2022 21:29
@stoyanK7
Copy link
Collaborator Author

$SF_USER,checkstyle@shell.sourceforge.net:/home/project-web/checkstyle/
echo "Uploading to sourceforge"
scp -i ~/.ssh/private_sourceforge_key checkstyle.github.io.tar.gz \
"$SF_USER"@shell.sourceforge.net:/home/project-web/stoyank-checkstyle
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will undo this when approved before merging.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you confirm testing, I will merge it.
I will test all action in release this Sunday.
thanks a lot for your work.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Should be good to merge once CI passes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not forget to add the SSH_KEY secret variable with the private ssh key for Sourceforge.

Copy link
Member

@romani romani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Items

.github/workflows/copy_site_to_sourceforge.yml Outdated Show resolved Hide resolved
@stoyanK7 stoyanK7 force-pushed the issue/12081-copy-to-sourceforge branch 2 times, most recently from 5492457 to 6ef3697 Compare November 24, 2022 15:47
@stoyanK7 stoyanK7 force-pushed the issue/12081-copy-to-sourceforge branch from 6ef3697 to 992e13e Compare November 24, 2022 15:51
Copy link
Member

@romani romani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok to merge

@romani romani merged commit 31d820c into checkstyle:master Nov 24, 2022
@stoyanK7 stoyanK7 deleted the issue/12081-copy-to-sourceforge branch November 24, 2022 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Github action "Copy site to sourceforge"
3 participants