Difference between revisions of "PubMan INGe Release Process"

From MPDLMediaWiki
Jump to navigation Jump to search
 
(6 intermediate revisions by the same user not shown)
Line 20: Line 20:
*Work with GitCmd from Git (oder GitShell from Github oder GitBash)
*Work with GitCmd from Git (oder GitShell from Github oder GitBash)
*Ensure that you are inside the MPDL network (directly or VPN)
*Ensure that you are inside the MPDL network (directly or VPN)
*Richtigen Java Pfad in Systemsteuerung setzen: (z.B. PATH C:\_tools\java\openjdk-11.0.9+11\bin)
*Richtigen Java Pfad in Systemsteuerung setzen: (z.B. PATH C:\_tools\java\jdk-11.0.14.1+1\bin)
*Prüfe Java Version: (z.B. java -version)
*Prüfe Java Version: (z.B. java -version)
*Prüfe Maven Version: (z.B. mvn -version)
Enable profiles: (z.B. in C:\Users\przibyll\.m2\settings-inge.xml)
Enable profiles: (z.B. in C:\Users\przibyll\.m2\settings-inge.xml)
*env-pure
*env-pure
Line 29: Line 30:
             <id>env-release-build</id>
             <id>env-release-build</id>
             <properties>
             <properties>
                <inge.aa.admin.username>xxx</inge.aa.admin.username> FÄLLT WEG !!!
                <inge.aa.admin.password>xxx</inge.aa.admin.password> FÄLLT WEG !!!
                 <inge.aa.default.target>https://dev.inge.mpdl.mpg.de/auth/clientLogin</inge.aa.default.target>
                 <inge.aa.default.target>https://dev.inge.mpdl.mpg.de/auth/clientLogin</inge.aa.default.target>
                 <inge.aa.instance.url>https://dev.inge.mpdl.mpg.de/auth/</inge.aa.instance.url>
                 <inge.aa.instance.url>https://dev.inge.mpdl.mpg.de/auth/</inge.aa.instance.url>
Line 41: Line 40:
                 <inge.database.user.password>xxx</inge.database.user.password>
                 <inge.database.user.password>xxx</inge.database.user.password>
                 <inge.doi.service.url>https://test.doi.mpdl.mpg.de</inge.doi.service.url>
                 <inge.doi.service.url>https://test.doi.mpdl.mpg.de</inge.doi.service.url>
                 <inge.es.cluster.name>elastic_inge</inge.es.cluster.name>
                 <inge.es.rest.host-port>https://dev.inge.mpdl.mpg.de</inge.es.rest.host-port>
                 <inge.es.transport.ips>134.76.28.200:8080</inge.es.transport.ips>
                 <inge.es.rest.path-prefix>/es</inge.es.rest.path-prefix>
                <inge.es.user/>
                <inge.es.password/>
                 <inge.filestorage.seaweed_master_server_ip>https://dev.inge.mpdl.mpg.de/seaweedfs-master</inge.filestorage.seaweed_master_server_ip>
                 <inge.filestorage.seaweed_master_server_ip>https://dev.inge.mpdl.mpg.de/seaweedfs-master</inge.filestorage.seaweed_master_server_ip>
                 <inge.pid.service.url>https://test.doi.mpdl.mpg.de</inge.pid.service.url>
                 <inge.pid.service.url>https://test.doi.mpdl.mpg.de</inge.pid.service.url>
Line 48: Line 49:
                 <inge.pubman.instance.url>http://localhost:8080</inge.pubman.instance.url>
                 <inge.pubman.instance.url>http://localhost:8080</inge.pubman.instance.url>
                 <inge.rest.service.url>http://localhost:8080/rest</inge.rest.service.url>
                 <inge.rest.service.url>http://localhost:8080/rest</inge.rest.service.url>
                <inge.syndication.service.url>https://dev.inge.mpdl.mpg.de/syndication</inge.syndication.service.url>
                 <inge.systemtype>workstation</inge.systemtype>
                 <inge.systemtype>workstation</inge.systemtype>
                 <inge.unapi.service.url>http://localhost:8080/rest/unapi</inge.unapi.service.url>
                 <inge.unapi.service.url>http://localhost:8080/rest/unapi</inge.unapi.service.url>
                 <inge.rest.development.enabled>true</inge.rest.development.enabled>
                 <inge.rest.development.enabled>true</inge.rest.development.enabled>
                 <inge.rest.development.admin.username>xxx</inge.rest.development.admin.username>
                 <inge.rest.development.admin.username>jutta</inge.rest.development.admin.username>
                 <inge.rest.development.admin.password>xxx</inge.rest.development.admin.password>
                 <inge.rest.development.admin.password>9dg2zch4PVdshq7z</inge.rest.development.admin.password>
                 <inge.rest.development.file_url>https://dev.inge.mpdl.mpg.de/pubman_rest_development/development/component/</inge.rest.development.file_url>
                 <inge.rest.development.file_url>https://dev.inge.mpdl.mpg.de/pubman_rest_development/development/component/</inge.rest.development.file_url>
                 <inge.matomo.analytics.site.id>52</inge.matomo.analytics.site.id>
                 <jboss.install.dir>C:\_tools\wildfly\wildfly-26.1.3.Final</jboss.install.dir>
                <inge.matomo.analytics.auth.token>XXX</inge.matomo.analytics.auth.token>
<jboss.install.dir>C:\_tools\wildfly\wildfly-13.0.0.Final</jboss.install.dir>
             </properties>
             </properties>
         </profile>
         </profile>
Line 130: Line 128:
*Ear in C:\temp\INGe\target\checkout\pubman_ear\target
*Ear in C:\temp\INGe\target\checkout\pubman_ear\target
*properties in C:\temp\INGe\pubman_ear\target\classes
*properties in C:\temp\INGe\pubman_ear\target\classes
* reindex.jar in C:\temp\INGe\target\checkout\reindex_util\target


===Rework===
===Rework===
Line 137: Line 136:


===Dokument the release===
===Dokument the release===
z.B. https://colab.mpdl.mpg.de/mediawiki/Pubman_8.4
z.B. https://colab.mpdl.mpg.de/mediawiki/Pubman_8.5.2




[[Category:INGe|Release process]]
[[Category:INGe|Release process]]

Latest revision as of 08:33, 27 October 2023

This page describes how to release PubMan/INGe.

Before the release[edit]

  • Download Git (if not already done).
  • Work with GitCmd from Git (oder GitShell from Github oder GitBash)
cd c:\temp
git clone <INGE repository>      (z.B. git clone https://github.com/MPDL/INGe.git)
cd c:\temp\INGe
git checkout <aktueller_branch>  (z.B. git checkout master)
git pull
  • Check that release branch is not in possible conflict state with the master branch. It might happen if somebody has made a commit in master (although that shouldn't happen)

Release PubMan / INGe[edit]

Prepare the release[edit]

  • Download maven (if not already done).
  • Download postgres (if not already done).
  • Start postgres service (if not already done).
  • With pgadmin load File:Inge test.backup (if not already done)
  • Work with GitCmd from Git (oder GitShell from Github oder GitBash)
  • Ensure that you are inside the MPDL network (directly or VPN)
  • Richtigen Java Pfad in Systemsteuerung setzen: (z.B. PATH C:\_tools\java\jdk-11.0.14.1+1\bin)
  • Prüfe Java Version: (z.B. java -version)
  • Prüfe Maven Version: (z.B. mvn -version)

Enable profiles: (z.B. in C:\Users\przibyll\.m2\settings-inge.xml)

  • env-pure
  • env-release-build
        <profile>
            <id>env-release-build</id>
            <properties>
                <inge.aa.default.target>https://dev.inge.mpdl.mpg.de/auth/clientLogin</inge.aa.default.target>
                <inge.aa.instance.url>https://dev.inge.mpdl.mpg.de/auth/</inge.aa.instance.url>
                <inge.cone.database.server.name>dev.inge.mpdl.mpg.de</inge.cone.database.server.name>
                <inge.cone.database.user.name>xxx</inge.cone.database.user.name>
                <inge.cone.database.user.password>xxx</inge.cone.database.user.password>
                <inge.cone.service.url>https://dev.inge.mpdl.mpg.de/cone/</inge.cone.service.url>
                <inge.database.jdbc.url>jdbc:postgresql://dev.inge.mpdl.mpg.de:5432/inge</inge.database.jdbc.url>
                <inge.database.user.name>xxx</inge.database.user.name>
                <inge.database.user.password>xxx</inge.database.user.password>
                <inge.doi.service.url>https://test.doi.mpdl.mpg.de</inge.doi.service.url>
                <inge.es.rest.host-port>https://dev.inge.mpdl.mpg.de</inge.es.rest.host-port>
                <inge.es.rest.path-prefix>/es</inge.es.rest.path-prefix>
                <inge.es.user/>
                <inge.es.password/>
                <inge.filestorage.seaweed_master_server_ip>https://dev.inge.mpdl.mpg.de/seaweedfs-master</inge.filestorage.seaweed_master_server_ip>
                <inge.pid.service.url>https://test.doi.mpdl.mpg.de</inge.pid.service.url>
                <inge.pubman.csl_editor.instance>http://pubman.mpdl.mpg.de/csl-editor/</inge.pubman.csl_editor.instance>
                <inge.pubman.instance.url>http://localhost:8080</inge.pubman.instance.url>
                <inge.rest.service.url>http://localhost:8080/rest</inge.rest.service.url>
                <inge.systemtype>workstation</inge.systemtype>
                <inge.unapi.service.url>http://localhost:8080/rest/unapi</inge.unapi.service.url>
                <inge.rest.development.enabled>true</inge.rest.development.enabled>
                <inge.rest.development.admin.username>jutta</inge.rest.development.admin.username>
                <inge.rest.development.admin.password>9dg2zch4PVdshq7z</inge.rest.development.admin.password>
                <inge.rest.development.file_url>https://dev.inge.mpdl.mpg.de/pubman_rest_development/development/component/</inge.rest.development.file_url>
                <jboss.install.dir>C:\_tools\wildfly\wildfly-26.1.3.Final</jboss.install.dir>
            </properties>
        </profile>

Windows:

cd c:\temp\INGe
GitCmd oder GitShell:
mvn -X release:prepare -s [absolutepath/to/settings-inge.xml] -P env-release-build -DignoreSnaphots=true -DupdateReleaseInfos=true -DpreparationGoals="clean install`
(z.B. mvn -X release:prepare -s C:/Users/przibyll/.m2/settings-inge.xml -P env-release-build -DignoreSnaphots=true -DupdateReleaseInfos=true -DpreparationGoals="clean install`)
-> Hinweis: -X ist Debug Modus (Hab ich gebraucht, weil sonst de Tests nicht richtig liefen - irgendein Prozess hat sich nicht richtig abgemeldet....
            org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?)
bzw.
GitBash:
mvn -X release:prepare -s [absolutepath/to/settings-inge.xml] -P env-release-build -DignoreSnaphots=true -DupdateReleaseInfos=true -DpreparationGoals="clean install"
(z.B. mvn -X release:prepare -s C:/Users/przibyll/.m2/settings-inge.xml -P env-release-build -DignoreSnaphots=true -DupdateReleaseInfos=true -DpreparationGoals="clean install")
-> Hinweis: -X ist Debug Modus (Hab ich gebraucht, weil sonst de Tests nicht richtig liefen - irgendein Prozess hat sich nicht richtig abgemeldet....
            org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?)

Linux/Mac

mvn release:prepare -s [absolutepath/to/settings-inge.xml] -P env-release-build -DignoreSnaphots=true -DupdateReleaseInfos=true -DpreparationGoals="clean install"
  • For the snapshot dependencies (citation languages 1.0.1-SNAPSHOT) do following steps
    • Resolve Snapshot dependencies: yes
    • 0 - All
    • 1.0.1-SNAPSHOT (do not copy paste, may lead to special character Errors)
    • 1.0.1-SNAPSHOT (do not copy paste, may lead to special character Errors)
    • restliche Vorschläge unverändert übernehmen

Neuerdings muss man sich zwischendrin an GitHub anmelden (Dazu erscheint im Browser ein Anmeldefenster...)

If a problem happened, do a rollback[edit]

mvn release:rollback
Auf Github prüfen, ob schon ein neuer Tag angelegt wurde. Falls ja, folgende Befehle ausführen:
git tag -d <neuer_tag_name> (z.B. git tag -d INGe-8.0.7) //comment: rollback doesn't remove the tag, that must be removed before doing a new release:prepare
git push origin :neuer_tag_name   (z.B. git push origin INGe-8.0.7) // comment: remove the tag in remote

Perform the release[edit]

  • You need update rights for nexus!

(the site deployment is not supported so far. Therefore we skip it here)
make sure your settings has server entries (including credentials) for nexus, snapshots and releases

    <servers>
        <server>
            <id>nexus</id>
            <username>myname</username>
            <password>1234</password>
        </server>
        <server>
            <id>snapshots</id>
            <username>myname</username>
            <password>1234</password>
        </server>
        <server>
            <id>releases</id>
            <username>myname</username>
            <password>1234</password>
        </server>
    </servers>
mvn -X release:perform -Dgoals=deploy -s [absolutepath/to/settings-inge.xml] -P env-release-build
(z.B. mvn -X release:perform -Dgoals=deploy -s C:/Users/przibyll/.m2/settings-inge.xml -P env-release-build)
-> Hinweis: -X ist Debug Modus (Hab ich gebraucht, weil sonst de Tests nicht richtig liefen - irgendein Prozess hat sich nicht richtig abgemeldet....
            org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?)
  • Ear in C:\temp\INGe\target\checkout\pubman_ear\target
  • properties in C:\temp\INGe\pubman_ear\target\classes
  • reindex.jar in C:\temp\INGe\target\checkout\reindex_util\target

Rework[edit]

  • Reset profiles: (z.B. in C:\Users\przibyll\.m2\settings-inge.xml)
  • inge_db_connector mit Tests lokal neu bauen
  • Postgres Service stoppen

Dokument the release[edit]

z.B. https://colab.mpdl.mpg.de/mediawiki/Pubman_8.5.2