Tony CHEMIT pushed to branch master at ultreia.io / ird-observe

Commits:

24 changed files:

Changes:

  • .gitlab-ci.yml
    ... ... @@ -86,7 +86,11 @@ stage:
    86 86
       <<: *before_script_clone
    
    87 87
       script:
    
    88 88
         - apt-get update -y && apt-get install libc6-i386 libx32stdc++6 -y
    
    89
    -    - . bin/create_stage.sh
    
    89
    +    - wget -O - https://gitlab.com/maven.ultreia.io/pom/raw/master/bin/close-milestone.sh | bash
    
    90
    +    - wget -O - https://gitlab.com/maven.ultreia.io/pom/raw/master/bin/create-stage.sh | bash
    
    91
    +    - wget -O - https://gitlab.com/maven.ultreia.io/pom/raw/master/bin/update-staging-changelog.sh | sed 's/$1/frirdobserve/' | bash
    
    92
    +    - wget -O - https://gitlab.com/maven.ultreia.io/pom/raw/master/bin/create-milestone.sh | bash
    
    93
    +    - wget -O - https://gitlab.com/maven.ultreia.io/pom/raw/master/bin/close-stage.sh | sed 's/$1/frirdobserve/' | bash
    
    90 94
     
    
    91 95
     latest-site:
    
    92 96
       <<: *env_test
    
    ... ... @@ -142,7 +146,13 @@ release:
    142 146
       <<: *staging
    
    143 147
       when: manual
    
    144 148
       script:
    
    145
    -    - . bin/stage_release.sh
    
    149
    +    - wget -O - https://gitlab.com/maven.ultreia.io/pom/raw/master/bin/release-stage.sh | sed 's/$1/frirdobserve/' | bash
    
    150
    +
    
    151
    +drop:
    
    152
    +  <<: *staging
    
    153
    +  when: manual
    
    154
    +  script:
    
    155
    +    - wget -O - https://gitlab.com/maven.ultreia.io/pom/raw/master/bin/drop-stage.sh | sed 's/$1/frirdobserve/' | bash
    
    146 156
     
    
    147 157
     production:
    
    148 158
       stage: Production
    

  • CHANGELOG.md The diff for this file was not included because it is too large.
  • bin/stage_create.sh deleted
    1
    -#!/usr/bin/env bash
    
    2
    -
    
    3
    -PROJECT=ird-observe
    
    4
    -MASTER=master
    
    5
    -DEVELOP=develop
    
    6
    -STAGE=frirdobserve
    
    7
    -
    
    8
    -VERSION=$(grep -e "-SNAPSHOT" pom.xml | cut -d'>' -f2 | cut -d'<' -f1)
    
    9
    -VERSION=${VERSION/-SNAPSHOT/}
    
    10
    -LOG_DIR=/tmp/${PROJECT}-${VERSION}
    
    11
    -echo "version to release: $VERSION"
    
    12
    -echo "log dir: $LOG_DIR"
    
    13
    -rm -rf ${LOG_DIR}
    
    14
    -mkdir -p ${LOG_DIR}
    
    15
    -
    
    16
    -git checkout -B ${MASTER}
    
    17
    -git checkout -B ${DEVELOP}
    
    18
    -
    
    19
    -echo "Start release: $VERSION ($LOG_DIR/release-start.log)"
    
    20
    -mvn jgitflow:release-start -B -Prelease-profile --log-file ${LOG_DIR}/release-start.log
    
    21
    -if [ ! "$?" == "0" ]; then
    
    22
    -   echo "Error"
    
    23
    -   exit 1
    
    24
    -fi
    
    25
    -echo "Finish release: $VERSION ($LOG_DIR/release-finish.log)"
    
    26
    -mvn jgitflow:release-finish -Prelease-profile --log-file ${LOG_DIR}/release-finish.log
    
    27
    -if [ ! "$?" == "0" ]; then
    
    28
    -   echo "Error"
    
    29
    -   exit 1
    
    30
    -fi
    
    31
    -echo "Get staging id..."
    
    32
    -STAGE_ID=$(mvn nexus-staging:rc-list -N | grep ${STAGE} | grep OPEN | cut -d' ' -f2 | awk '/./{line=$0} END{print line}')
    
    33
    -
    
    34
    -echo "Closing stage: $STAGE_ID ($LOG_DIR/release-close.log)"
    
    35
    -mvn nexus-staging:close -N -DstagingRepositoryId=${STAGE_ID} --log-file ${LOG_DIR}/release-close.log
    
    36
    -if [ ! "$?" == "0" ]; then
    
    37
    -   echo "Error"
    
    38
    -   exit 1
    
    39
    -fi
    
    40
    -
    
    41
    -echo "Update changelog: $STAGE_ID ($LOG_DIR/release-changelog.log)"
    
    42
    -rm -rf target/gitlab_cache
    
    43
    -
    
    44
    -mvn -N -Pupdate-staging-changelog -Dgitlab.stagingUrl=https://oss.sonatype.org/content/repositories/${STAGE}-${STAGE_ID} -Dgitlab.milestone=${VERSION} --log-file ${LOG_DIR}/release-changelog.log
    
    45
    -if [ ! "$?" == "0" ]; then
    
    46
    -   echo "Error"
    
    47
    -   exit 1
    
    48
    -fi
    
    49
    -
    
    50
    -git commit -m"Update changelog for staging version $VERSION" CHANGELOG.md

  • bin/stage_drop.sh deleted
    1
    -#!/usr/bin/env sh
    
    2
    -
    
    3
    -PROJECT=ird-observe
    
    4
    -STAGE=frirdobserve
    
    5
    -
    
    6
    -VERSION=$(grep -e "-SNAPSHOT" pom.xml | cut -d'>' -f2 | cut -d'<' -f1)
    
    7
    -VERSION=${VERSION/-SNAPSHOT/}
    
    8
    -LOG_DIR=/tmp/${PROJECT}-${VERSION}
    
    9
    -echo "log dir: $LOG_DIR"
    
    10
    -rm -rf ${LOG_DIR}
    
    11
    -mkdir -p ${LOG_DIR}
    
    12
    -
    
    13
    -echo "Get staging id..."
    
    14
    -STAGE_ID=$(mvn nexus-staging:rc-list | grep ${STAGE} | cut -d' ' -f2)
    
    15
    -
    
    16
    -echo "Stage drop: $STAGE_ID ($LOG_DIR/stage-drop.log)"
    
    17
    -mvn -N nexus-staging:drop -DstagingRepositoryId=${STAGE_ID} --log-file ${LOG_DIR}/stage-drop.log

  • bin/stage_release.sh deleted
    1
    -#!/usr/bin/env sh
    
    2
    -
    
    3
    -PROJECT=ird-observe
    
    4
    -STAGE=frirdobserve
    
    5
    -
    
    6
    -VERSION=$(grep -e "-SNAPSHOT" pom.xml | cut -d'>' -f2 | cut -d'<' -f1)
    
    7
    -VERSION=${VERSION/-SNAPSHOT/}
    
    8
    -LOG_DIR=/tmp/${PROJECT}-${VERSION}
    
    9
    -echo "log dir: $LOG_DIR"
    
    10
    -rm -rf ${LOG_DIR}
    
    11
    -mkdir -p ${LOG_DIR}
    
    12
    -
    
    13
    -echo "Get staging id..."
    
    14
    -STAGE_ID=$(mvn -N nexus-staging:rc-list | grep ${STAGE} | grep CLOSED | cut -d' ' -f2)
    
    15
    -
    
    16
    -echo "Stage release: $STAGE_ID ($LOG_DIR/stage-release.log)"
    
    17
    -mvn -N nexus-staging:release -DstagingRepositoryId=${STAGE_ID} --log-file ${LOG_DIR}/stage-release.log

  • persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_5_0.java
    ... ... @@ -69,7 +69,6 @@ public abstract class DataSourceMigrationForVersion_5_0 extends AbstractObserveM
    69 69
     
    
    70 70
             addScript("07", "drop_not_null_constraint_gearUseFeatures", queries);
    
    71 71
             addScript("08", "drop_not_null_constraint_hauling_identifier", queries);
    
    72
    -        addScript("09", "add_non_target_length_sex_fk", queries);
    
    73 72
         }
    
    74 73
     
    
    75 74
         public static class H2DataSourceMigrationForVersion extends DataSourceMigrationForVersion_5_0 {
    
    ... ... @@ -86,7 +85,7 @@ public abstract class DataSourceMigrationForVersion_5_0 extends AbstractObserveM
    86 85
                 Set<String> forkeignKeys = H2DataSourceMigration.getForeignKeyConstraintNames(topiaSqlSupport, "nontargetlength");
    
    87 86
                 Set<String> collect = forkeignKeys.stream().map(String::toLowerCase).collect(Collectors.toSet());
    
    88 87
                 if (!collect.contains("fk_nontargetlength_sex")) {
    
    89
    -                addScript(VersionBuilder.create("4.906").build(), "01", "add_non_target_length_sex_fk", queries);
    
    88
    +                addScript("09", "add_non_target_length_sex_fk", queries);
    
    90 89
                 }
    
    91 90
             }
    
    92 91
     
    
    ... ... @@ -106,7 +105,7 @@ public abstract class DataSourceMigrationForVersion_5_0 extends AbstractObserveM
    106 105
                 Set<String> forkeignKeys = PGDataSourceMigration.getForeignKeyConstraintNames(topiaSqlSupport, "nontargetlength");
    
    107 106
                 Set<String> collect = forkeignKeys.stream().map(String::toLowerCase).collect(Collectors.toSet());
    
    108 107
                 if (!collect.contains("fk_nontargetlength_sex")) {
    
    109
    -                addScript(VersionBuilder.create("4.906").build(), "01", "add_non_target_length_sex_fk", queries);
    
    108
    +                addScript("09", "add_non_target_length_sex_fk", queries);
    
    110 109
                 }
    
    111 110
             }
    
    112 111
     
    

  • persistence/src/main/java/fr/ird/observe/persistence/migration/old/DataSourceMigrationForVersion_4_0_RC2.java
    ... ... @@ -98,6 +98,11 @@ public class DataSourceMigrationForVersion_4_0_RC2 extends AbstractObserveMigrat
    98 98
                 super(callBack, PGDataSourceMigration.TYPE);
    
    99 99
             }
    
    100 100
     
    
    101
    +        @Override
    
    102
    +        protected void prepareMigrationScript(TopiaSqlSupport topiaSqlSupport, List<String> queries, boolean showSql, boolean showProgression) {
    
    103
    +            super.prepareMigrationScript(topiaSqlSupport, queries, showSql, showProgression);
    
    104
    +            addScript("02", "add-foreign-key-indexes", queries);
    
    105
    +        }
    
    101 106
         }
    
    102 107
     
    
    103 108
     }

  • persistence/src/main/java/fr/ird/observe/persistence/migration/old/DataSourceMigrationForVersion_4_0_RC3.java
    ... ... @@ -71,10 +71,10 @@ public abstract class DataSourceMigrationForVersion_4_0_RC3 extends AbstractObse
    71 71
             addMissingForeignKeys(topiaSqlSupport, queries);
    
    72 72
     
    
    73 73
             // See https://forge.codelutin.com/issues/6983
    
    74
    -        addScript("02", "update-senne-gear-usedInTrip", queries);
    
    74
    +        addScript("01", "update-senne-gear-usedInTrip", queries);
    
    75 75
     
    
    76 76
             // See https://forge.codelutin.com/issues/6991
    
    77
    -        addScript("03", "rename-unknown-longliner", queries);
    
    77
    +        addScript("02", "rename-unknown-longliner", queries);
    
    78 78
     
    
    79 79
         }
    
    80 80
     
    

  • persistence/src/main/resources/db/migration/old/4.0-RC-2/V4_0_RC_2_01_clean-program-gear-type-H2.sqlpersistence/src/main/resources/db/migration/old/4.0-RC2/V4_0_RC2_01_clean-program-gear-type-H2.sql

  • persistence/src/main/resources/db/migration/old/4.0-RC-2/V4_0_RC_2_01_clean-program-gear-type-PG.sqlpersistence/src/main/resources/db/migration/old/4.0-RC2/V4_0_RC2_01_clean-program-gear-type-PG.sql

  • persistence/src/main/resources/db/migration/old/4.0-RC-2/V4_0_RC_2_01_add-foreign-key-indexes-PG.sqlpersistence/src/main/resources/db/migration/old/4.0-RC2/V4_0_RC2_02_add-foreign-key-indexes-PG.sql

  • persistence/src/main/resources/db/migration/old/4.0-RC-2/V4_0_RC_2_02_update-senne-gear-usedInTrip-H2.sqlpersistence/src/main/resources/db/migration/old/4.0-RC3/V4_0_RC3_01_update-senne-gear-usedInTrip-H2.sql

  • persistence/src/main/resources/db/migration/old/4.0-RC-2/V4_0_RC_2_02_update-senne-gear-usedInTrip-PG.sqlpersistence/src/main/resources/db/migration/old/4.0-RC3/V4_0_RC3_01_update-senne-gear-usedInTrip-PG.sql

  • persistence/src/main/resources/db/migration/old/4.0-RC-2/V4_0_RC_2_03_rename-unknown-longliner-H2.sqlpersistence/src/main/resources/db/migration/old/4.0-RC3/V4_0_RC3_02_rename-unknown-longliner-H2.sql

  • persistence/src/main/resources/db/migration/old/4.0-RC-2/V4_0_RC_2_03_rename-unknown-longliner-PG.sqlpersistence/src/main/resources/db/migration/old/4.0-RC3/V4_0_RC3_02_rename-unknown-longliner-PG.sql

  • persistence/src/main/resources/db/migration/old/4.0-RC-4/V4_0_RC_4_01_add-gear-data-H2.sqlpersistence/src/main/resources/db/migration/old/4.0-RC4/V4_0_RC4_01_add-gear-data-H2.sql

  • persistence/src/main/resources/db/migration/old/4.0-RC-4/V4_0_RC_4_01_add-gear-data-PG.sqlpersistence/src/main/resources/db/migration/old/4.0-RC4/V4_0_RC4_01_add-gear-data-PG.sql

  • persistence/src/main/resources/db/migration/old/4.0-RC-6/V4_0_RC_6_01_fix-gearUseFeatures-topiaIds-H2.sqlpersistence/src/main/resources/db/migration/old/4.0-RC6/V4_0_RC6_01_fix-gearUseFeatures-topiaIds-H2.sql

  • persistence/src/main/resources/db/migration/old/4.0-RC-6/V4_0_RC_6_01_fix-gearUseFeatures-topiaIds-PG.sqlpersistence/src/main/resources/db/migration/old/4.0-RC6/V4_0_RC6_01_fix-gearUseFeatures-topiaIds-PG.sql

  • persistence/src/main/resources/db/migration/old/4.0-RC-7/V4_0_RC_7_01_update-senne-gear-usedInTrip-H2.sqlpersistence/src/main/resources/db/migration/old/4.0-RC7/V4_0_RC7_01_update-senne-gear-usedInTrip-H2.sql

  • persistence/src/main/resources/db/migration/old/4.0-RC-7/V4_0_RC_7_01_update-senne-gear-usedInTrip-PG.sqlpersistence/src/main/resources/db/migration/old/4.0-RC7/V4_0_RC7_01_update-senne-gear-usedInTrip-PG.sql

  • persistence/src/main/resources/db/migration/old/4.0-RC-7/V4_0_RC_7_02_rename-unknown-longliner-H2.sqlpersistence/src/main/resources/db/migration/old/4.0-RC7/V4_0_RC7_02_rename-unknown-longliner-H2.sql

  • persistence/src/main/resources/db/migration/old/4.0-RC-7/V4_0_RC_7_02_rename-unknown-longliner-PG.sqlpersistence/src/main/resources/db/migration/old/4.0-RC7/V4_0_RC7_02_rename-unknown-longliner-PG.sql

  • pom.xml
    ... ... @@ -26,7 +26,7 @@
    26 26
       <parent>
    
    27 27
         <groupId>io.ultreia.maven</groupId>
    
    28 28
         <artifactId>pom</artifactId>
    
    29
    -    <version>4</version>
    
    29
    +    <version>5</version>
    
    30 30
       </parent>
    
    31 31
     
    
    32 32
       <groupId>fr.ird.observe</groupId>