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

Commits:

4 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/develop/bin/close-milestone.sh | bash
    
    90
    +    - wget -O - https://gitlab.com/maven.ultreia.io/pom/raw/develop/bin/create-stage.sh | bash
    
    91
    +    - wget -O - https://gitlab.com/maven.ultreia.io/pom/raw/develop/bin/update-staging-changelog.sh | sed 's/$1/frirdobserve/' | bash
    
    92
    +    - wget -O - https://gitlab.com/maven.ultreia.io/pom/raw/develop/bin/create-milestone.sh | bash
    
    93
    +    - wget -O - https://gitlab.com/maven.ultreia.io/pom/raw/develop/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/develop/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/develop/bin/drop-stage.sh | sed 's/$1/frirdobserve/' | bash
    
    146 156
     
    
    147 157
     production:
    
    148 158
       stage: Production
    

  • 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