You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicecomb.apache.org by GitBox <gi...@apache.org> on 2018/03/06 00:31:18 UTC

[GitHub] WillemJiang closed pull request #143: SCB-346 Prepare 1.0.0-m1 release

WillemJiang closed pull request #143: SCB-346 Prepare 1.0.0-m1 release
URL: https://github.com/apache/incubator-servicecomb-saga/pull/143
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/.travis.settings.xml b/.travis.settings.xml
index 293c11cf..f7ed2725 100755
--- a/.travis.settings.xml
+++ b/.travis.settings.xml
@@ -23,5 +23,20 @@
       <username>${env.SONATYPE_USERNAME}</username>
       <password>${env.SONATYPE_PASSWORD}</password>
     </server>
+    <server>
+      <id>apache.releases.https</id>
+      <username>${env.SONATYPE_USERNAME}</username>
+      <password>${env.SONATYPE_PASSWORD}</password>
+    </server>    
   </servers>
+    <profiles>
+        <profile>
+          <id>passphrase</id> <!-- give it the name of your project -->
+          <properties>
+            <gpg.homedir>/home/travis/build/apache/incubator-servicecomb-saga</gpg.homedir>
+            <gpg.keyname>2DE9D2F9</gpg.keyname>
+            <gpg.passphrase>${env.MYPASSP}</gpg.passphrase>
+          </properties>
+        </profile>
+    </profiles>
 </settings>
diff --git a/.travis.yml b/.travis.yml
index aadcabce..9e11d69b 100755
--- a/.travis.yml
+++ b/.travis.yml
@@ -28,4 +28,4 @@ script:
 - mvn clean verify -f saga-demo -Pdemo -Pdocker -Ddocker.useColor=false -Ddocker.showLogs
 - mvn clean verify -f acceptance-tests -Pdemo -Pdocker -Ddocker.useColor=false -Ddocker.showLogs
 after_success:
-- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then mvn deploy -DskipTests --settings .travis.settings.xml; fi
+- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash -x scripts/deploy.sh ; fi
diff --git a/gpg-sec.tar.enc b/gpg-sec.tar.enc
new file mode 100644
index 00000000..a0b26c90
Binary files /dev/null and b/gpg-sec.tar.enc differ
diff --git a/scripts/deploy.sh b/scripts/deploy.sh
new file mode 100644
index 00000000..46d709ca
--- /dev/null
+++ b/scripts/deploy.sh
@@ -0,0 +1,51 @@
+#!/usr/bin/env bash
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+#bin/sh
+
+##Check if the commit is tagged commit or not
+TAGGEDCOMMIT=$(git tag -l --contains HEAD)
+if [ "$TAGGEDCOMMIT" == "" ]; then
+        TAGGEDCOMMIT=false
+else
+        TAGGEDCOMMIT=true
+fi
+echo $TAGGEDCOMMIT
+
+if [ "$TAGGEDCOMMIT" ==   "true" ]; then
+    echo "Decrypting the key"
+		openssl aes-256-cbc -K $encrypted_03bd1399b9b3_key -iv $encrypted_03bd1399b9b3_iv -in gpg-sec.tar.enc -out .github/gpg-sec.tar -d
+    tar xvf gpg-sec.tar
+		echo "Deploying Staging Release"
+		mvn deploy -DskipTests --settings .travis.settings.xml -Ppassphrase -Prelease 
+    if [ $? == 0 ]; then
+			echo "${green}Staging Deployment is Success, please log on to Nexus Repo to see the staging release..${reset}"
+		else
+			echo "${red}Staging Release deployment failed.${reset}"
+			exit 1
+		fi
+else
+		echo "Deploy a Non-Signed Staging Release"
+		mvn deploy -DskipTests --settings .travis.settings.xml
+    if [ $? == 0 ]; then
+			echo "${green}Snapshot Deployment is Success, please log on to Nexus Repo to see the snapshot release..${reset}"
+		else
+			echo "${red}Snapshot deployment failed.${reset}"
+			# No need to exit 1 here as the snapshot depoyment will fail for private builds as decryption of password is allowed for ServiceComb repo and not forked repo's.
+		fi
+fi
+echo "Deployment Completed"


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services