PubMan INGe Release Process

From MPDLMediaWiki
Jump to navigation Jump to search

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)

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.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.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.cluster.name>elastic_inge</inge.es.cluster.name>
                <inge.es.transport.ips>134.76.28.200:8080</inge.es.transport.ips>
                <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.syndication.service.url>https://dev.inge.mpdl.mpg.de/syndication</inge.syndication.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>xxx</inge.rest.development.admin.username>
                <inge.rest.development.admin.password>xxx</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.matomo.analytics.site.id>52</inge.matomo.analytics.site.id>
                <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>
        </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

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.4