Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH] Fix queue test preparing
@ 2019-12-06 17:36 Leonid Vasiliev
  2019-12-06 19:18 ` Leonid Vasiliev
  0 siblings, 1 reply; 3+ messages in thread
From: Leonid Vasiliev @ 2019-12-06 17:36 UTC (permalink / raw)
  To: alexander.turenko; +Cc: tarantool-patches

Add redirect procesing and check of a commands exit code.

---
 test.sh | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/test.sh b/test.sh
index 3fca125..32f7567 100755
--- a/test.sh
+++ b/test.sh
@@ -1,15 +1,17 @@
 #!/bin/bash
 
+set -euo pipefail
+
 VERSION=${VERSION:-2_2}
 
-curl https://packagecloud.io/tarantool/${VERSION}/gpgkey | sudo apt-key add -
+curl -sfL https://packagecloud.io/tarantool/${VERSION}/gpgkey | sudo apt-key add -
 release=`lsb_release -c -s`
 
 sudo apt-get install -y apt-transport-https
 
 sudo tee /etc/apt/sources.list.d/tarantool_${VERSION}.list <<- EOF
-deb https://packagecloud.io/tarantool/${VERSION}/ubuntu/ $release main
-deb-src https://packagecloud.io/tarantool/${VERSION}/ubuntu/ $release main
+deb https://packagecloud.io/tarantool/${VERSION}/ubuntu/ ${release} main
+deb-src https://packagecloud.io/tarantool/${VERSION}/ubuntu/ ${release} main
 EOF
 
 sudo apt-get update > /dev/null
-- 
2.17.1

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Tarantool-patches] [PATCH] Fix queue test preparing
  2019-12-06 17:36 [Tarantool-patches] [PATCH] Fix queue test preparing Leonid Vasiliev
@ 2019-12-06 19:18 ` Leonid Vasiliev
  2019-12-18  2:02   ` Alexander Turenko
  0 siblings, 1 reply; 3+ messages in thread
From: Leonid Vasiliev @ 2019-12-06 19:18 UTC (permalink / raw)
  To: alexander.turenko; +Cc: tarantool-patches

https://github.com/tarantool/queue/tree/lvasiliev/gh-noticket-fix-redirect-case

On 12/6/19 8:36 PM, Leonid Vasiliev wrote:
> Add redirect procesing and check of a commands exit code.
> 
> ---
>   test.sh | 8 +++++---
>   1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/test.sh b/test.sh
> index 3fca125..32f7567 100755
> --- a/test.sh
> +++ b/test.sh
> @@ -1,15 +1,17 @@
>   #!/bin/bash
>   
> +set -euo pipefail
> +
>   VERSION=${VERSION:-2_2}
>   
> -curl https://packagecloud.io/tarantool/${VERSION}/gpgkey | sudo apt-key add -
> +curl -sfL https://packagecloud.io/tarantool/${VERSION}/gpgkey | sudo apt-key add -
>   release=`lsb_release -c -s`
>   
>   sudo apt-get install -y apt-transport-https
>   
>   sudo tee /etc/apt/sources.list.d/tarantool_${VERSION}.list <<- EOF
> -deb https://packagecloud.io/tarantool/${VERSION}/ubuntu/ $release main
> -deb-src https://packagecloud.io/tarantool/${VERSION}/ubuntu/ $release main
> +deb https://packagecloud.io/tarantool/${VERSION}/ubuntu/ ${release} main
> +deb-src https://packagecloud.io/tarantool/${VERSION}/ubuntu/ ${release} main
>   EOF
>   
>   sudo apt-get update > /dev/null
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Tarantool-patches] [PATCH] Fix queue test preparing
  2019-12-06 19:18 ` Leonid Vasiliev
@ 2019-12-18  2:02   ` Alexander Turenko
  0 siblings, 0 replies; 3+ messages in thread
From: Alexander Turenko @ 2019-12-18  2:02 UTC (permalink / raw)
  To: Leonid Vasiliev; +Cc: tarantool-patches

Expanded the commit message:

 | travis-ci: handle packagecloud's HTTP redirects
 |
 | Added curl options:
 |
 | * -L (--location) to follow Location header value from 3XX responses,
 |   because packagecloud.io redirects a GPG key request to a CDN.
 | * -s (--silent) to don't show a progress meter.
 | * -f (--fail) to fail the command at non 2XX HTTP responses. It'll fail
 |   `curl | <...>` command pipeline, since `set -o pipefail` is now
 |   enabled.
 |
 | Aside of that, fail test.sh script (and so a CI job) if something inside
 | the script fails (`set -e`) and catch mistakes from using uninitialized
 | bash variables (`set -u`) inside the script.

And pushed.

Thanks!

WBR, Alexander Turenko.

On Fri, Dec 06, 2019 at 10:18:55PM +0300, Leonid Vasiliev wrote:
> https://github.com/tarantool/queue/tree/lvasiliev/gh-noticket-fix-redirect-case
> 
> On 12/6/19 8:36 PM, Leonid Vasiliev wrote:
> > Add redirect procesing and check of a commands exit code.
> > 
> > ---
> >   test.sh | 8 +++++---
> >   1 file changed, 5 insertions(+), 3 deletions(-)
> > 
> > diff --git a/test.sh b/test.sh
> > index 3fca125..32f7567 100755
> > --- a/test.sh
> > +++ b/test.sh
> > @@ -1,15 +1,17 @@
> >   #!/bin/bash
> > +set -euo pipefail
> > +
> >   VERSION=${VERSION:-2_2}
> > -curl https://packagecloud.io/tarantool/${VERSION}/gpgkey | sudo apt-key add -
> > +curl -sfL https://packagecloud.io/tarantool/${VERSION}/gpgkey | sudo apt-key add -
> >   release=`lsb_release -c -s`
> >   sudo apt-get install -y apt-transport-https
> >   sudo tee /etc/apt/sources.list.d/tarantool_${VERSION}.list <<- EOF
> > -deb https://packagecloud.io/tarantool/${VERSION}/ubuntu/ $release main
> > -deb-src https://packagecloud.io/tarantool/${VERSION}/ubuntu/ $release main
> > +deb https://packagecloud.io/tarantool/${VERSION}/ubuntu/ ${release} main
> > +deb-src https://packagecloud.io/tarantool/${VERSION}/ubuntu/ ${release} main
> >   EOF
> >   sudo apt-get update > /dev/null
> > 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-12-18  2:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-06 17:36 [Tarantool-patches] [PATCH] Fix queue test preparing Leonid Vasiliev
2019-12-06 19:18 ` Leonid Vasiliev
2019-12-18  2:02   ` Alexander Turenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox