Tony CHEMIT pushed to branch master at ultreia.io / ird-observe
Commits:
-
ebf49628
by Tony CHEMIT at 2017-03-11T12:56:06+01:00
-
9eb36475
by Tony CHEMIT at 2017-03-11T12:59:33+01:00
-
2f75e9a1
by Tony CHEMIT at 2017-03-11T13:02:24+01:00
-
06ff52a8
by Tony CHEMIT at 2017-03-12T12:08:23+01:00
-
3d110ad4
by Tony CHEMIT at 2017-03-12T13:17:44+01:00
-
bfdcbff8
by Tony CHEMIT at 2017-03-12T13:48:49+01:00
-
82f0c7f5
by Tony CHEMIT at 2017-03-15T14:28:40+01:00
-
742331a6
by Tony CHEMIT at 2017-03-15T14:35:26+01:00
-
8445cb2e
by Tony CHEMIT at 2017-03-15T15:01:46+01:00
-
fb325b37
by Tony CHEMIT at 2017-03-15T15:05:26+01:00
-
db5e4a1d
by Tony CHEMIT at 2017-03-15T15:06:19+01:00
-
4362e374
by Tony CHEMIT at 2017-03-15T15:07:46+01:00
-
4a108146
by Tony CHEMIT at 2017-03-15T15:13:40+01:00
24 changed files:
- .gitlab-ci.yml
- CHANGELOG.md
- − bin/stage_create.sh
- − bin/stage_drop.sh
- − bin/stage_release.sh
- persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_5_0.java
- persistence/src/main/java/fr/ird/observe/persistence/migration/old/DataSourceMigrationForVersion_4_0_RC2.java
- persistence/src/main/java/fr/ird/observe/persistence/migration/old/DataSourceMigrationForVersion_4_0_RC3.java
- persistence/src/main/resources/db/migration/old/4.0-RC-2/V4_0_RC_2_01_clean-program-gear-type-H2.sql → persistence/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.sql → persistence/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.sql → persistence/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.sql → persistence/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.sql → persistence/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.sql → persistence/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.sql → persistence/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.sql → persistence/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.sql → persistence/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.sql → persistence/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.sql → persistence/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.sql → persistence/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.sql → persistence/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.sql → persistence/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.sql → persistence/src/main/resources/db/migration/old/4.0-RC7/V4_0_RC7_02_rename-unknown-longliner-PG.sql
- pom.xml
Changes:
| ... | ... | @@ -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
|
| 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
|
| 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
|
| 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
|
| ... | ... | @@ -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 |
|
| ... | ... | @@ -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 |
}
|
| ... | ... | @@ -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 |
|
| ... | ... | @@ -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>
|