You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ratis.apache.org by ms...@apache.org on 2018/01/29 13:24:07 UTC

incubator-ratis git commit: RATIS-184. Document how to deploy the snapshot artifacts. Contributed by Tsz Wo Nicholas Sze.

Repository: incubator-ratis
Updated Branches:
  refs/heads/master 2d99e6172 -> dd15f2a29


RATIS-184. Document how to deploy the snapshot artifacts. Contributed by Tsz Wo Nicholas Sze.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ratis/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ratis/commit/dd15f2a2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ratis/tree/dd15f2a2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ratis/diff/dd15f2a2

Branch: refs/heads/master
Commit: dd15f2a29ba408f690821f97d4372b32d813346d
Parents: 2d99e61
Author: Mukul Kumar Singh <ms...@apache.org>
Authored: Mon Jan 29 18:53:27 2018 +0530
Committer: Mukul Kumar Singh <ms...@apache.org>
Committed: Mon Jan 29 18:53:27 2018 +0530

----------------------------------------------------------------------
 BUILDING.md | 32 ---------------------
 DEPLOY.md   | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 84 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ratis/blob/dd15f2a2/BUILDING.md
----------------------------------------------------------------------
diff --git a/BUILDING.md b/BUILDING.md
index 3017be5..3bbac69 100644
--- a/BUILDING.md
+++ b/BUILDING.md
@@ -67,35 +67,3 @@ $ mvn clean -DskipCleanShade
 | `org.apache.hadoop.ipc.protobuf`    | `org.apache.ratis.shaded.org.apache.hadoop.ipc.protobuf`     |
 
 The protos defined in this project are stored in the `org.apache.ratis.shaded.proto` package.
-
-# How to deploy
-
-To publish, use the following settings.xml file ( placed in ~/.m2/settings.xml )
-```
-<settings>
-<servers>
-  <server>
-    <id>apache.releases.https</id>
-    <username>ratis_committer</username>
-    <password>********</password>
-  </server>
-  
-  <server>
-    <id>apache.snapshots.https</id>
-    <username>ratis_committer</username>
-    <password>********</password>
-  </server>
-</servers>
-</settings>
-```
-
-Then use
-```
-$ mvn deploy
-(or)
-$ mvn -s /my/path/settings.xml deploy
-```
-We also use release profile for building the release
-```
-$ mvn install -Prelease -Papache-release
-```

http://git-wip-us.apache.org/repos/asf/incubator-ratis/blob/dd15f2a2/DEPLOY.md
----------------------------------------------------------------------
diff --git a/DEPLOY.md b/DEPLOY.md
new file mode 100644
index 0000000..dc8908e
--- /dev/null
+++ b/DEPLOY.md
@@ -0,0 +1,84 @@
+<!--
+  Licensed 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. See accompanying LICENSE file.
+-->
+
+# Deploying Releases/Snapshots
+
+This document describes how to deploy releases and snapshots specifically for Apache Ratis.
+For general information about Publishing Maven Artifacts at Apache, see
+http://www.apache.org/dev/publishing-maven-artifacts.html
+
+## Prerequisite
+It requires *committer access* in order to deploy releases and snapshots.
+
+## Environment Setup
+To publish, use the following ```settings.xml``` file
+(placed in ```~/.m2/settings.xml``` )
+```
+<settings>
+<servers>
+  <server>
+    <id>apache.releases.https</id>
+    <username> <!-- YOUR APACHE LDAP USERNAME --> </username>
+    <password> <!-- YOUR APACHE LDAP PASSWORD (encrypted) --> </password>
+  </server>
+
+  <server>
+    <id>apache.snapshots.https</id>
+    <username> <!-- YOUR APACHE LDAP USERNAME --> </username>
+    <password> <!-- YOUR APACHE LDAP PASSWORD (encrypted) --> </password>
+  </server>
+</servers>
+</settings>
+```
+
+To use encrypted password, see
+http://maven.apache.org/guides/mini/guide-encryption.html
+
+For OpenPGP setup, see
+http://www.apache.org/dev/openpgp.html
+
+## How to Deploy
+We use Apache Maven Deploy Plugin to deploy artifacts.
+```bash
+mvn deploy
+(or)
+mvn -s /my/path/settings.xml deploy
+```
+We also use release profile for building the release.
+```
+mvn install -Prelease -Papache-release
+```
+
+### Steps for Deploying a Snapshot
+
+1. Test the artifacts locally.
+   1. Clean, shade and compile everything.
+   2. Run all tests.
+
+2. Set snapshot version locally.
+   1. Get the last commit id ```<ABBREV_COMMIT_ID>```.
+      * ```git log --abbrev-commit --abbrev=7 --pretty=oneline | head -1```
+   2. Set the versions of local artifacts.
+      * ```mvn versions:set -DnewVersion=<VERSION>-<ABBREV_COMMIT_ID>-SNAPSHOT```
+
+3. If everything works fine, run the following command to publish artifacts to Apache repository
+   * ```mvn deploy -DskipTests -DskipShade```
+
+4. Verify the snapshot artifacts published in
+   * https://repository.apache.org/content/groups/snapshots/org/apache/ratis/
+
+Finally, you may delete the ```pom.xml.versionsBackup``` files by
+```bash
+find . -name pom.xml.versionsBackup | xargs rm
+```