Skip to contentSkip to conversation

Create semi-automatic release process

PATCH In review Leon Romanovsky 2 participants 7 messages Jan 30, 2017 – Jan 31, 2017 5 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover Create semi-automatic release process

Hi Doug and Jason,

This patchset simplifies the github release process for the rdma-core library. Once properly installed, it will allow simply issue "git release" command to create release notes from annotated and signed tags.

Such release notes will be formatted according to the tag context and will have rdma-core-vX.X.X.tar.gz attached to it with properly created top-level directory.

https://github.com/linux-rdma/rdma-core/pull/69

Changelog v0->v1:
* Commented changes in .travis.yml.
* Removed whitespace churn from second patch introduced by travis CLI tool.
* Added "set -x" instruction to build script to get print for every line to easy failures debug.

Leon Romanovsky (2):
travis: Simplify travis config
travis: Upload assets to github release

 .travis.yml              |  43 +++++++++-----------
 Documentation/release.md | 100 +++++++++++++++++++++++++++++++++++++++++++++++
 buildlib/github-release  |   8 ++++
 buildlib/travis-build    |  32 +++++++++++++++
 4 files changed, 159 insertions(+), 24 deletions(-)
 create mode 100644 Documentation/release.md
 create mode 100755 buildlib/github-release
 create mode 100755 buildlib/travis-build

--
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 20170130062316.16268-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org

#2 lore raw

PATCH 1/2 travis: Simplify travis config

Move travis build instructions into separate file.

---
 .travis.yml           | 25 +------------------------
 buildlib/travis-build | 32 ++++++++++++++++++++++++++++++++
 2 files changed, 33 insertions(+), 24 deletions(-)
 create mode 100755 buildlib/travis-build
.travis.yml +1 -24
index 06443530..c4fa1985 100644
@@ -36,27 +36,4 @@ addons:
       - lib32gcc-6-dev
 
 script:
-  - mkdir build build-clang build32 build-no-dma
-  - cd build
-  # The goal is warning free compile on latest gcc.
-  - CC=gcc-6 CFLAGS=-Werror cmake -GNinja ..
-  - ninja
-
-  # .. and latest clang
-  - cd ../build-clang
-  - CC=clang-3.9 CFLAGS=-Werror cmake -GNinja ..
-  - ninja
-
-  # 32 bit build
-  - cd ../build32
-  # travis's trusty is not configured in a way that enables all 32 bit
-  # packages. We could fix this with some sudo stuff.. For now turn off libnl
-  - CC=gcc-6 CFLAGS="-Werror -m32" cmake -GNinja .. -DENABLE_RESOLVE_NEIGH=0
-  - ninja
-
-  # Test with coherent DMA mode disabled (ie as would be on ARM32, etc)
-  - cd ../build-clang
-  - echo "#error Fail" >> ../libibverbs/arch.h
-  - rm CMakeCache.txt
-  - CC=clang-3.9 CFLAGS=-Werror cmake -GNinja ..
-  - ninja
+  - buildlib/travis-build
buildlib/travis-build new file +32 -0
new file mode 100755
index 00000000..5fa037bd
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+# Stop on error
+set -e
+# Echo all commands to Travis log
+set -x
+
+mkdir build build-clang build32 build-no-dma
+cd build
+# The goal is warning free compile on latest gcc.
+CC=gcc-6 CFLAGS=-Werror cmake -GNinja ..
+ninja
+
+# .. and latest clang
+cd ../build-clang
+CC=clang-3.9 CFLAGS=-Werror cmake -GNinja ..
+ninja
+
+# 32 bit build
+cd ../build32
+# travis's trusty is not configured in a way that enables all 32 bit
+# packages. We could fix this with some sudo stuff.. For now turn off libnl
+CC=gcc-6 CFLAGS="-Werror -m32" cmake -GNinja .. -DENABLE_RESOLVE_NEIGH=0
+ninja
+
+# Test with coherent DMA mode disabled (ie as would be on ARM32, etc)
+cd ../build-clang
+echo "#error Fail" >> ../libibverbs/arch.h
+rm CMakeCache.txt
+CC=clang-3.9 CFLAGS=-Werror cmake -GNinja ..
+ninja
+cd ..
Signature · 6 lines
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#3 lore raw

PATCH 2/2 travis: Upload assets to github release

In reply to a message not in the archive

Create and upload library source code to the corresponding release.

The upload is triggered for pushed tags which are expected to be in semantic version format, e.g. v12.7.0.

---
 .travis.yml              |  18 +++++++++
 Documentation/release.md | 100 +++++++++++++++++++++++++++++++++++++++++++++++
 buildlib/github-release  |   8 ++++
 3 files changed, 126 insertions(+)
 create mode 100644 Documentation/release.md
 create mode 100755 buildlib/github-release
.travis.yml +18 -0
index c4fa1985..d65e30c1 100644
@@ -37,3 +37,21 @@ addons:
 
 script:
   - buildlib/travis-build
+before_deploy:
+  - buildlib/github-release
+deploy:
+  # Deploy assets to Github releases
+  # https://docs.travis-ci.com/user/deployment/releases/
+  provider: releases
+  api_key:
+    # This is encrypted OAth token generated by
+    # Travis CLI tool (travis setup releases) limited to specific repo.
+    secure: G9sQd578nctgaety6f27P4p5nyrEgXdvMs1g+K2Hj7GPWxBpQ1Jm7kUlahcwfnYXpYqXen9b2dzyGzaLxjLL5rv6rbtOYp9SVrvybQrnJwkB0HCERKVMwEPsLPOB2lMouBDfk4+iUGdxtcw8Y5UU/xqKcAjkHkM5YpF5HauEX1Jj+Ep/XpX5DEcsVmFwkDgPKJOZv/eUgz1eVtXNFIvmSwJ+QuuUz64JpEpKMY4u7bFu0+2qWqACj19P/Rnufxpr+o5yoCuVNVptoRHMIWJiWZsrd2IhmL3knBoPoxNXSOWqQCK6DCW1KYOOVVAfFoD4YWhWrt6MuB3hh7lgLkS0rsdG9+iMlosl4SOkWZF8ZTkmrmtt6yx+s18tFdNI46QKzaA4wS/1hktweIFizYvmEwUCU8sNK5y9PMfDoGJGwiF1FzWrnLItKMiib0sTGO4Umgc0DKTazVRlIJYooOOOnBGubRudNx3elBTy4C/txSmqR39/6GYlvcyUDJMqB/oQJj2erQ5Gu8VykW5zjko6+3miX3C7GFVQ781BLxAdyNl4WRjZ9ibzjMbK3MC7f0ho1hST6cvBBmy2UnIdvB6zMayHZ/gtXKsDqE386k5FwSuTLT2V7942uFRVJiEwhVmgmBzbZND7PTj4s9GPrL2HLlJOgZooRZdx/ZcT/YNPFbA=
+    file: rdma-core-*.tar.gz
+    # Allow asterisks in file names.
+    file_glob: true
+    skip_cleanup: true
+    # Limit scope of deploy to specific repo.
+    on:
+      repo: linux-rdma/rdma-core
+      tags: true
Documentation/release.md new file +100 -0

100 lines not on this page · raw message

buildlib/github-release new file +8 -0
new file mode 100755
index 00000000..4c0ffda2
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+set -e
+
+if [[ $TRAVIS_TAG == v* ]] && [ "$TRAVIS_OS_NAME" = "linux" ]; then
+	# Let's create release for vX tags only.
+	git archive --prefix rdma-core/ --output rdma-core-$TRAVIS_TAG.tar.gz HEAD
+fi
Signature · 6 lines
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 20170130062316.16268-3-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org

#5 lore raw

Re: [PATCH rdma-core V1 2/2] travis: Upload assets to github release

.travis.yml addons: · line 49

Quoted 7 lines · Leon Romanovsky
.travis.yml +7 -0
+  # Deploy assets to Github releases
+  # https://docs.travis-ci.com/user/deployment/releases/
+  provider: releases
+  api_key:
+    # This is encrypted OAth token generated by
+    # Travis CLI tool (travis setup releases) limited to specific repo.
+    secure: G9sQd578nctgaety6f27P4p5nyrEgXdvMs1g+K2Hj7GPWxBpQ1Jm7kUlahcwfnYXpYqXen9b2dzyGzaLxjLL5rv6rbtOYp9SVrvybQrnJwkB0HCERKVMwEPsLPOB2lMouBDfk4+iUGdxtcw8Y5UU/xqKcAjkHkM5YpF5HauEX1Jj+Ep/XpX5DEcsVmFwkDgPKJOZv/eUgz1eVtXNFIvmSwJ+QuuUz64JpEpKMY4u7bFu0+2qWqACj19P/Rnufxpr+o5yoCuVNVptoRHMIWJiWZsrd2IhmL3knBoPoxNXSOWqQCK6DCW1KYOOVVAfFoD4YWhWrt6MuB3hh7lgLkS0rsdG9+iMlosl4SOkWZF8ZTkmrmtt6yx+s18tFdNI46QKzaA4wS/1hktweIFizYvmEwUCU8sNK5y9PMfDoGJGwiF1FzWrnLItKMiib0sTGO4Umgc0DKTazVRlIJYooOOOnBGubRudNx3elBTy4C/txSmqR39/6GYlvcyUDJMqB/oQJj2erQ5Gu8VykW5zjko6+3miX3C7GFVQ781BLxAdyNl4WRjZ9ibzjMbK3MC7f0ho1hST6cvBBmy2UnIdvB6zMayHZ/gtXKsDqE386k5FwSuTLT2V7942uFRVJiEwhVmgmBzbZND7PTj4s9GPrL2HLlJOgZooRZdx/ZcT/YNPFbA=

So this is a restricted oauth token for your github account then?

You are comfortable with this?

buildlib/github-release line 7

Quoted 3 lines
buildlib/github-release new file +3 -0
+if [[ $TRAVIS_TAG == v* ]] && [ "$TRAVIS_OS_NAME" = "linux" ]; then
+	# Let's create release for vX tags only.
+	git archive --prefix rdma-core/ --output rdma-core-$TRAVIS_TAG.tar.gz HEAD

Should be

--prefix rdma-core-$TRAVIS_TAG/

I think..

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 20170130170956.GC29502-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org

#7 lore raw

Re: [PATCH rdma-core V1 2/2] travis: Upload assets to github release

Quoted 11 lines · Jason Gunthorpe

.travis.yml addons: · line 49

Quoted 7 lines · Leon Romanovsky
.travis.yml +7 -0
+  # Deploy assets to Github releases
+  # https://docs.travis-ci.com/user/deployment/releases/
+  provider: releases
+  api_key:
+    # This is encrypted OAth token generated by
+    # Travis CLI tool (travis setup releases) limited to specific repo.
+    secure: G9sQd578nctgaety6f27P4p5nyrEgXdvMs1g+K2Hj7GPWxBpQ1Jm7kUlahcwfnYXpYqXen9b2dzyGzaLxjLL5rv6rbtOYp9SVrvybQrnJwkB0HCERKVMwEPsLPOB2lMouBDfk4+iUGdxtcw8Y5UU/xqKcAjkHkM5YpF5HauEX1Jj+Ep/XpX5DEcsVmFwkDgPKJOZv/eUgz1eVtXNFIvmSwJ+QuuUz64JpEpKMY4u7bFu0+2qWqACj19P/Rnufxpr+o5yoCuVNVptoRHMIWJiWZsrd2IhmL3knBoPoxNXSOWqQCK6DCW1KYOOVVAfFoD4YWhWrt6MuB3hh7lgLkS0rsdG9+iMlosl4SOkWZF8ZTkmrmtt6yx+s18tFdNI46QKzaA4wS/1hktweIFizYvmEwUCU8sNK5y9PMfDoGJGwiF1FzWrnLItKMiib0sTGO4Umgc0DKTazVRlIJYooOOOnBGubRudNx3elBTy4C/txSmqR39/6GYlvcyUDJMqB/oQJj2erQ5Gu8VykW5zjko6+3miX3C7GFVQ781BLxAdyNl4WRjZ9ibzjMbK3MC7f0ho1hST6cvBBmy2UnIdvB6zMayHZ/gtXKsDqE386k5FwSuTLT2V7942uFRVJiEwhVmgmBzbZND7PTj4s9GPrL2HLlJOgZooRZdx/ZcT/YNPFbA=

So this is a restricted oauth token for your github account then?

It is encrypted token, you can't use it without knowing how to decrypt it.
https://docs.travis-ci.com/user/encryption-keys/
https://docs.travis-ci.com/user/environment-variables/#Encrypted-Variables

Quoted 2 lines

You are comfortable with this?

I'm fine with that.

Quoted 10 lines

buildlib/github-release line 7

Quoted 4 lines
buildlib/github-release new file +3 -0
+if [[ $TRAVIS_TAG == v* ]] && [ "$TRAVIS_OS_NAME" = "linux" ]; then
+	# Let's create release for vX tags only.
+	git archive --prefix rdma-core/ --output rdma-core-$TRAVIS_TAG.tar.gz HEAD

Should be

--prefix rdma-core-$TRAVIS_TAG/

I think..

I have no opinion about that, because I'm not going to use this tar.gz file.

Quoted 2 lines

Jason

A message that is not in the archive (sent off-list or not yet received): 20170130201953.GM6005-U/[email protected]

#9 lore raw

Re: [PATCH rdma-core V1 2/2] travis: Upload assets to github release

Quoted 10 lines · Leon Romanovsky
Quoted 8 lines

buildlib/github-release line 7

Quoted 3 lines
buildlib/github-release new file +3 -0
+if [[ $TRAVIS_TAG == v* ]] && [ "$TRAVIS_OS_NAME" = "linux" ]; then
+	# Let's create release for vX tags only.
+	git archive --prefix rdma-core/ --output rdma-core-$TRAVIS_TAG.tar.gz HEAD

Should be

I think..

I have no opinion about that, because I'm not going to use this tar.gz file.

Including the version in the directory is standard practice.

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 20170130211658.GC27111-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org

#11 lore raw

Re: [PATCH rdma-core V1 2/2] travis: Upload assets to github release

Quoted 9 lines · Jason Gunthorpe
Quoted 7 lines · Leon Romanovsky
Quoted 7 lines

Review

Quoted 3 lines
(quoted diff) +3 -0
+if [[ $TRAVIS_TAG == v* ]] && [ "$TRAVIS_OS_NAME" = "linux" ]; then
+	# Let's create release for vX tags only.
+	git archive --prefix rdma-core/ --output rdma-core-$TRAVIS_TAG.tar.gz HEAD

Should be

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

I think..

I have no opinion about that, because I'm not going to use this tar.gz file.

Including the version in the directory is standard practice.

No problem, I pushed updated version.

Quoted 2 lines

Jason