branch release/3.0.0 created (now 8f250dfa)
This is an automated email from the git hooks/post-receive script. New change to branch release/3.0.0 in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git at 8f250dfa update gitlab ci for release This branch includes the following new commits: new 8f250dfa update gitlab ci for release The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 8f250dfad25faf5f0e8728796a232a1eda10b9df Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Wed Sep 27 11:13:57 2017 +0200 update gitlab ci for release -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch release/3.0.0 in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git commit 8f250dfad25faf5f0e8728796a232a1eda10b9df Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Wed Sep 27 11:13:57 2017 +0200 update gitlab ci for release --- .gitlab-ci.yml | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7a82cd86..b178ca4f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -56,35 +56,45 @@ release: - cd /tmp - git clone --no-checkout "$GIT_URL" "release" - cd release + - git checkout -f develop + - git checkout -f master + - git flow init -fd - git checkout -f "$CI_COMMIT_SHA" - if [ ! -f LICENSE.txt ]; then echo "missing LICENSE.txt"; exit 1; fi - if [ ! -f README.md ]; then echo "missing README.md"; exit 1 ;fi - curl -sL --header "PRIVATE-TOKEN:${TOKEN_MR}" "https://gitlab.nuiton.org/codelutin/gitlab-tools/raw/master/release.sh" -o /tmp/release.sh - cat /tmp/release.sh - chmod +x /tmp/release.sh + - echo "Check Gitlab Milestone for $VERSION " - /tmp/release.sh "$TOKEN_MR" "$CI_PROJECT_ID" "$VERSION" check + - echo "Maven release for $VERSION " - mvn -q --batch-mode org.codehaus.mojo:versions-maven-plugin::set -DnewVersion=$VERSION - mvn org.codehaus.mojo:versions-maven-plugin:display-dependency-updates |sed -n '/The following dependencies in Dependencies have newer versions/,/--------------------------------------------------/p' - mvn -q --batch-mode org.codehaus.mojo:versions-maven-plugin::use-releases - mvn -q --batch-mode org.codehaus.mojo:license-maven-plugin:1.13:check-file-header -Dlicense.failOnMissingHeader=true -DfailOnNotUptodateHeader=true -Dlicense.roots=src/main -Dlicense.excludes=webapp/lib/** || (echo "Veullez mettre a jour vos header sur la branche $RELEASE avec la commande 'mvn org.codehaus.mojo:license-maven-plugin:1.13:update-file-header -Dlicense.roots=src/main -Dlicense.excludes=webapp/lib/**'"; exit 2) - - curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - && sudo apt-get install -y nodejs - - npm install - mvn -q --batch-mode clean install - mkdir -p $OLD_DIR/target - cp target/*.war $OLD_DIR/target/${CI_PROJECT_NAME}-$VERSION.war + - echo "NodeJs release for $VERSION " + - curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - && sudo apt-get install -y nodejs + - cd pollen-ui-riot-js + - npm install + - npm run-script package + - mkdir -p $OLD_DIR/target/${CI_PROJECT_NAME}-$VERSION-site + - cp -r target/dist/* $OLD_DIR/target/${CI_PROJECT_NAME}-$VERSION-site/. + - cd ../ + - echo "Generate CHANGELOG for $VERSION " - export CHANGELOG=$(/tmp/release.sh "$TOKEN_MR" "$CI_PROJECT_ID" "$VERSION" changelog) - echo "$CHANGELOG" >> CHANGELOG - if [ -f CHANGELOG ]; then git add CHANGELOG; fi - git commit -a -m "release $VERSION success [skip ci]" - - git tag "${TAG_NAME}" - - export NEXT_VERSION=$(echo "$VERSION" |perl -pe 's/^(.*)(\d+)(.*)$/$1.($2+1).$3."-SNAPSHOT"/e') - - mvn --batch-mode org.codehaus.mojo:versions-maven-plugin::set -DnewVersion=$NEXT_VERSION - - git commit -a -m "commit to prepare next development version $NEXT_VERSION [skip ci]" -# - git push origin HEAD:$RELEASE --tags -# - /tmp/release.sh "$TOKEN_MR" "$CI_PROJECT_ID" "$VERSION" close -# - curl --header "PRIVATE-TOKEN:$TOKEN_MR" --request POST "https://gitlab.nuiton.org/api/v4/projects/${CI_PROJECT_ID}/merge_requests?source_branch=${CI_COMMIT_REF_NAME}&target_branch=master&title=${RELEASE}&remove_source_branch=true&labels=release" -# - export FILE_URL=$(echo -e "\n\n"$(curl --request POST --header "PRIVATE-TOKEN:$TOKEN_MR" --form "file=@$OLD_DIR/target/${CI_PROJECT_NAME}-$VERSION.war" https://gitlab.nuiton.org/api/v4/projects/${CI_PROJECT_ID}/uploads |jq --raw-output '.markdown')) -# - curl --header "PRIVATE-TOKEN:$TOKEN_MR" --request POST --form "description=$CHANGELOG$FILE_URL" "https://gitlab.nuiton.org/api/v4/projects/${CI_PROJECT_ID}/repository/tags/${TAG_NAME}/release" + - git push + - git flow release finish + - git push --tags + - /tmp/release.sh "$TOKEN_MR" "$CI_PROJECT_ID" "$VERSION" close + - curl --header "PRIVATE-TOKEN:$TOKEN_MR" --request POST "https://gitlab.nuiton.org/api/v4/projects/${CI_PROJECT_ID}/merge_requests?source_branch=${CI_COMMIT_REF_NAME}&target_branch=master&title=${RELEASE}&remove_source_branch=true&labels=release" + - export FILE_URL=$(echo -e "\n\n"$(curl --request POST --header "PRIVATE-TOKEN:$TOKEN_MR" --form "file=@$OLD_DIR/target/${CI_PROJECT_NAME}-$VERSION.war" https://gitlab.nuiton.org/api/v4/projects/${CI_PROJECT_ID}/uploads |jq --raw-output '.markdown')) + - curl --header "PRIVATE-TOKEN:$TOKEN_MR" --request POST --form "description=$CHANGELOG$FILE_URL" "https://gitlab.nuiton.org/api/v4/projects/${CI_PROJECT_ID}/repository/tags/${TAG_NAME}/release" artifacts: paths: - pollen-rest-api/target/pollen-rest-api-*.war @@ -93,7 +103,7 @@ release: -tag-docker: +docker: image: registry.nuiton.org/codelutin/dockerfiles:docker stage: release when: manual -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm