Gå till slutet av bannern
Gå till början av bannern

Generella instruktioner för utvecklare

Hoppa till slutet på meta-data
Gå till början av metadata

Du visar en gammal version av den här sidan. Visa nuvarande version.

Jämför med nuvarande Visa sidhistorik

« Föregående Version 24 Nästa »

Innehåll:

Utvecklingsmiljö

För att utveckla och underhålla SKLTP samt köra automatiska enhetstester och integrationstester i utvecklingsmiljön krävs:

Val av IDE är valfritt men om Eclipse används så rekommenderas följande pluginer för versionshantering av källkod:

För att exekvera systemtester används:

Utöver detta behövs rättigheter till följande:

  • Github push rättigheter
  • Jenkins Cloudbees rättigheter
  • Sonatype nexus rättigheter
  • JIRA och Confluence wiki
  • Tillgång till fysiska testmiljöer

Git för utvecklare

/wiki/spaces/SKLTP/pages/3187835204

Hur commita kod i Subversion

Innan man commitar ändringar är det väldigt viktigt att man:

  1. Gjort en svn update (eller svn synchronize i Eclipse pluginen) för att säkerställa att man har senaste koden hos sig.
    Gör man inte det så kan det leda till onödiga merge-problem när man väl commitar eller att commitade ändringar bryter tester i byggservern.

  2. Gör en fullständig mvn clean installtrunk nivå för att försäkra sig om att allt fortfarande sitter ihop innan man commitar
    Se till att stänga alternativt starta om IDE'n, t ex Mule Studio, innan mvn clean startas annars kan IDE'n upptäcka detta och börjar kompilera om klasser vilket kan förvilla maven och bygget går då fel...

  3. Commita med en relevant commit kommentar.
    Företrädesvis skall kod commitas mot ett JIRA-ärende och då skall dess id vara prefix i commit kommentaren, t ex "SKLTP-nnn: anledning till commit".
    Jobbar man inte mot ett JIRA ärende få man prefixa sin commit kommentar med komponents prefix (t ex "VP - ", "EI - ", "AgP - " eller "AnP - ") för att skilja ut ändringar mot ändringar i Subversion för andra SKLTP komponenter.

License headers

The Maven build checks that source files contain license headers (for example, when running: mvn clean install) using the com.mycila.maven-license-plugin:maven-license-plugin.

If a build fails due to missing license headers:

[INFO] Missing header in: /Users/hakan/Documents/scm/svn_skltp/jms-admin-web_tr/src/main/java/se/skltp/admin/core/services/HdLabAmq.java
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE

it can be fixed by running:

mvn license:format

Verifiering

Innan release av en component ska funktionella tester, lasttester och robusthetstester genomföras.

Generell instruktion för att köra lasttester med Gatling

Release Management

To release software components we use Maven and its release-plugin.

To be able to publish released artifacts on the central Maven repository we use Sonatype OSS Repository Hosting Service, see instructions for more information.

See example JIRA on how to get permissions to publish https://issues.sonatype.org/browse/OSSRH-7085

Note: original hosting request: https://issues.sonatype.org/browse/OSSRH-5414

 

After a successful registration and setup of a OSS project according to the instruction above a release can be done to the central repository just by doing the ordinary:

mvn release:prepare
mvn release:perform

If you during release:perform get a Failed to deploy artifacts: Could not transfer artifact <artifact:url> peer not authenticated error.

Try adding: -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true

In cases when SSLv3 is somehow set as default version, this will fail with the same error, then use -Dhttps.protocols="TLSv1"

JIRA: https://issues.sonatype.org/browse/OSSRH-8111

 

The artifacts are now pushed to a Nexus staging repository and can be published in its staging repository for verification and after that the artifacts can be released for publication on the central Maven repository. See below for instructions.

For the SKLTP project with the group-id se.skltp, see http://repo1.maven.org/maven2/se/skltp/.

Verify and publish released artifacts

Before publishing released artifacts to the public Maven repository we can verify its functionality by publishing them to a staging repository.
After a successful verification we can move on and make them public available in the central Maven repository.

Publish to a staging repository for verification

  • Go to: https://oss.sonatype.org
  • Login to the Nexus UI.
  • Select "Staging Repositories" in the menu to the left.
  • Select the release-bundle in the list that is displayed, e.g. seskltp-nnnn, and validates its content (click on the Content-tab below the selected bundle)
  • Click the Close button in the top menu.

Validate

The suggested validation procedure assumes that you have a maven profile in your settings-file (~/.m2/settings.xml) like:

 
<profile>
  <id>sonatype-nexus-staging</id>
  <repositories> 
    <repository> 
      <id>sonatype-nexus-staging</id> 
      <name>Sonatype Nexus Staging</name>
      <url>https://oss.sonatype.org/content/repositories/staging/ </url> 
      <releases> 
        <enabled>true</enabled> 
      </releases> 
      <snapshots> 
        <enabled>false</enabled> 
      </snapshots> 
    </repository> 
  </repositories>
</profile>

Perform the following steps:

<activeProfiles>
    <activeProfile>sonatype-nexus-staging</activeProfile>
</activeProfiles>
  • If you are using the released artifacts are used in other components:
    • Remove the released artifacts from the local maven repository (to ensure that the artifacts are downloaded as expected from the Sonatypes staging repository)
    • Update other components that depend on the released artefacts to the new versions in their maven dependencies and perform a clean build of the components.
    • Perform whatever tests to ensure the the components work as expected with the released artifacts.
  • If the released artifacts contains ready to use applications
    • Download the application runtime-files for the staging repository and deploy then into your test environment.
    • Perform tests that verify that the new release of the application works as expected.
  • If errors are detected then go back to the Nexus UI and click on the Drop button to stop the release.
    • Correct any errors and redo the deploy process...

Publish to the central Maven repository for public availability

  • Go back to the Nexus UI, i.e. https://oss.sonatype.org
  • Login and select the release bundle again
  • Click on the Release button.
  • Artifacts should now be synced with central Maven repository on a hourly bases...

Paketnamn

SKLTP komponenter

se.skltp.<komponentnamn>, tex se.skltp.agp

Aggregerande tjänster

se.skltp.aggregatingservices.<tjänstedomän>.<tjänsteinteraktion>, tex se.skltp.aggregatingservices.riv.clinicalprocess.healthcond.basic.getaggregatedmeasurement

Anpassningstjänster

se.skltp.adapterservices.<adapternamn>, tex se.skltp.adapterservices.DominoHttp10Adapter

Virtuella tjänster

se.skltp.virtualservices.<tjänstedomän>, tex se.skltp.virtualservices.clinicalprocess.activityprescription.actoutcome.

 

  • Inga etiketter