Author: sebb Date: Tue Jul 4 11:59:39 2023 New Revision: 1910774 URL: http://svn.apache.org/viewvc?rev=1910774&view=rev Log: Wiki banner now under Attic control
Modified: attic/site/infrajiratext.py attic/site/retire.py attic/site/xdocs/process.xml Modified: attic/site/infrajiratext.py URL: http://svn.apache.org/viewvc/attic/site/infrajiratext.py?rev=1910774&r1=1910773&r2=1910774&view=diff ============================================================================== --- attic/site/infrajiratext.py (original) +++ attic/site/infrajiratext.py Tue Jul 4 11:59:39 2023 @@ -33,7 +33,6 @@ def check_wiki(pid): url = CWIKI + pid.upper() if urlexists(url): print("Make CWIKI readonly: %s" % url) - print("Flag CWIKI as retired: create file '%s.txt' under puppet:modules/cwiki_asf/files/attic/" % pid) def check_mail(pid): try: Modified: attic/site/retire.py URL: http://svn.apache.org/viewvc/attic/site/retire.py?rev=1910774&r1=1910773&r2=1910774&view=diff ============================================================================== --- attic/site/retire.py (original) +++ attic/site/retire.py Tue Jul 4 11:59:39 2023 @@ -14,6 +14,7 @@ Output: - xdocs/flagged/<pid> (created) - xdocs/projects/<pid>.xml (created) - xdocs/stylesheets/project.xml (updated) +- cwiki_retired/<wiki_id>.txt (created) - <pid>.jira.tmp (created) - this is for pasting into an Attic JIRA issue N.B. The generated pid.xml file may need tweaking @@ -27,7 +28,9 @@ from inspect import getsourcefile from string import Template import os import re -from urlutils import loadyaml, loadjson +from urlutils import loadyaml, loadjson, urlexists + +CWIKI='https://cwiki.apache.org/confluence/display/' if len(sys.argv) == 1: print("Please provide a list of project ids") @@ -39,6 +42,7 @@ MYHOME = dirname(abspath(getsourcefile(l projects = join((MYHOME), 'xdocs', 'projects') stylesheets = join((MYHOME), 'xdocs', 'stylesheets') flagged = join((MYHOME), 'xdocs', 'flagged') +cwiki_retired = join((MYHOME), 'cwiki_retired') # get details of the retired projects retirees = loadyaml('https://whimsy.apache.org/public/committee-retired.json')['retired'] @@ -124,6 +128,18 @@ def create_project(pid): os.system("svn add %s" % outfile) print("Check XML file for customisations such as JIRA and mailing lists") +def check_wiki(pid): + url = CWIKI + pid.upper() + if urlexists(url): + flagfile = join(cwiki_retired, f"{pid}.txt") + with open(flagfile, 'a'): + pass # if wiki uses alias, would need to add tlp name here + os.system("svn add %s" % flagfile) + pass + else: + print(f"Could not find CWIKI entry at {url}, perhaps it uses an alias?") + # TODO how to search cwiki for aliases? + for arg in sys.argv[1:]: print("Processing "+arg) if not arg in retirees: @@ -139,5 +155,6 @@ for arg in sys.argv[1:]: os.system("svn add %s" % flagdir) create_project(arg) update_stylesheet(arg) + check_wiki(arg) except Exception as e: print(e) Modified: attic/site/xdocs/process.xml URL: http://svn.apache.org/viewvc/attic/site/xdocs/process.xml?rev=1910774&r1=1910773&r2=1910774&view=diff ============================================================================== --- attic/site/xdocs/process.xml (original) +++ attic/site/xdocs/process.xml Tue Jul 4 11:59:39 2023 @@ -61,7 +61,6 @@ <li>Close down the user mailing list (unless still active - in which case propose a moderator to Infra)</li> <li>Make JIRA|Bugzilla read-only</li> <li>Make the wiki (if any) read-only</li> - <li>Add a banner to the wiki: this involves creating the Puppet file modules/cwiki_asf/files/attic/WIKIID.txt. See also AAREADME.txt in that directory.</li> <li>Delete LDAP group(s)</li> <li>Turn off automated builds</li> </ul> @@ -142,6 +141,7 @@ ${Name} on behalf of ${project} + the At <li><code>ID.jira.tmp</code></li> <li><code>xdocs/flagged/ID</code></li> <li><code>xdocs/projects/ID.xml</code></li> + <li><code>cwiki_retired/WIKI_ID.txt</code></li> </ul> <p>Review the changes in <code>xdocs/</code>, then commit to svn.</p> <p>The <code>ID.jira.tmp</code> file is text that can be copy-pasted into a JIRA description. It should be deleted after use, and not committed to SVN</p>