Tony CHEMIT pushed to branch develop at ultreia.io / ird-observe Commits: 3d110ad4 by Tony CHEMIT at 2017-03-12T13:17:44+01:00 remove release scripts, use pom ones - - - - - 4 changed files: - .gitlab-ci.yml - − bin/stage_create.sh - − bin/stage_drop.sh - − bin/stage_release.sh Changes: ===================================== .gitlab-ci.yml ===================================== --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -86,7 +86,11 @@ stage: <<: *before_script_clone script: - apt-get update -y && apt-get install libc6-i386 libx32stdc++6 -y - - . bin/create_stage.sh + - wget -O - https://gitlab.com/maven.ultreia.io/pom/raw/develop/bin/close-milestone.sh | bash + - wget -O - https://gitlab.com/maven.ultreia.io/pom/raw/develop/bin/create-stage.sh | bash + - wget -O - https://gitlab.com/maven.ultreia.io/pom/raw/develop/bin/update-staging-chang... | sed 's/$1/frirdobserve/' | bash + - wget -O - https://gitlab.com/maven.ultreia.io/pom/raw/develop/bin/create-milestone.sh | bash + - wget -O - https://gitlab.com/maven.ultreia.io/pom/raw/develop/bin/close-stage.sh | sed 's/$1/frirdobserve/' | bash latest-site: <<: *env_test @@ -142,7 +146,13 @@ release: <<: *staging when: manual script: - - . bin/stage_release.sh + - wget -O - https://gitlab.com/maven.ultreia.io/pom/raw/develop/bin/release-stage.sh | sed 's/$1/frirdobserve/' | bash + +drop: + <<: *staging + when: manual + script: + - wget -O - https://gitlab.com/maven.ultreia.io/pom/raw/develop/bin/drop-stage.sh | sed 's/$1/frirdobserve/' | bash production: stage: Production ===================================== bin/stage_create.sh deleted ===================================== --- a/bin/stage_create.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env bash - -PROJECT=ird-observe -MASTER=master -DEVELOP=develop -STAGE=frirdobserve - -VERSION=$(grep -e "-SNAPSHOT" pom.xml | cut -d'>' -f2 | cut -d'<' -f1) -VERSION=${VERSION/-SNAPSHOT/} -LOG_DIR=/tmp/${PROJECT}-${VERSION} -echo "version to release: $VERSION" -echo "log dir: $LOG_DIR" -rm -rf ${LOG_DIR} -mkdir -p ${LOG_DIR} - -git checkout -B ${MASTER} -git checkout -B ${DEVELOP} - -echo "Start release: $VERSION ($LOG_DIR/release-start.log)" -mvn jgitflow:release-start -B -Prelease-profile --log-file ${LOG_DIR}/release-start.log -if [ ! "$?" == "0" ]; then - echo "Error" - exit 1 -fi -echo "Finish release: $VERSION ($LOG_DIR/release-finish.log)" -mvn jgitflow:release-finish -Prelease-profile --log-file ${LOG_DIR}/release-finish.log -if [ ! "$?" == "0" ]; then - echo "Error" - exit 1 -fi -echo "Get staging id..." -STAGE_ID=$(mvn nexus-staging:rc-list -N | grep ${STAGE} | grep OPEN | cut -d' ' -f2 | awk '/./{line=$0} END{print line}') - -echo "Closing stage: $STAGE_ID ($LOG_DIR/release-close.log)" -mvn nexus-staging:close -N -DstagingRepositoryId=${STAGE_ID} --log-file ${LOG_DIR}/release-close.log -if [ ! "$?" == "0" ]; then - echo "Error" - exit 1 -fi - -echo "Update changelog: $STAGE_ID ($LOG_DIR/release-changelog.log)" -rm -rf target/gitlab_cache - -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 -if [ ! "$?" == "0" ]; then - echo "Error" - exit 1 -fi - -git commit -m"Update changelog for staging version $VERSION" CHANGELOG.md ===================================== bin/stage_drop.sh deleted ===================================== --- a/bin/stage_drop.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env sh - -PROJECT=ird-observe -STAGE=frirdobserve - -VERSION=$(grep -e "-SNAPSHOT" pom.xml | cut -d'>' -f2 | cut -d'<' -f1) -VERSION=${VERSION/-SNAPSHOT/} -LOG_DIR=/tmp/${PROJECT}-${VERSION} -echo "log dir: $LOG_DIR" -rm -rf ${LOG_DIR} -mkdir -p ${LOG_DIR} - -echo "Get staging id..." -STAGE_ID=$(mvn nexus-staging:rc-list | grep ${STAGE} | cut -d' ' -f2) - -echo "Stage drop: $STAGE_ID ($LOG_DIR/stage-drop.log)" -mvn -N nexus-staging:drop -DstagingRepositoryId=${STAGE_ID} --log-file ${LOG_DIR}/stage-drop.log ===================================== bin/stage_release.sh deleted ===================================== --- a/bin/stage_release.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env sh - -PROJECT=ird-observe -STAGE=frirdobserve - -VERSION=$(grep -e "-SNAPSHOT" pom.xml | cut -d'>' -f2 | cut -d'<' -f1) -VERSION=${VERSION/-SNAPSHOT/} -LOG_DIR=/tmp/${PROJECT}-${VERSION} -echo "log dir: $LOG_DIR" -rm -rf ${LOG_DIR} -mkdir -p ${LOG_DIR} - -echo "Get staging id..." -STAGE_ID=$(mvn -N nexus-staging:rc-list | grep ${STAGE} | grep CLOSED | cut -d' ' -f2) - -echo "Stage release: $STAGE_ID ($LOG_DIR/stage-release.log)" -mvn -N nexus-staging:release -DstagingRepositoryId=${STAGE_ID} --log-file ${LOG_DIR}/stage-release.log View it on GitLab: https://gitlab.com/ultreia.io/ird-observe/commit/3d110ad4b08fcdbe6e2bfd9ff0e...
participants (1)
-
Tony CHEMIT