Tarantool development patches archive
 help / color / mirror / Atom feed
* [tarantool-patches] [PATCH v1] gitlab-ci: add static build
@ 2019-08-16  9:55 Alexander V. Tikhonov
  2019-08-19 12:00 ` [tarantool-patches] " Alexander Turenko
  0 siblings, 1 reply; 5+ messages in thread
From: Alexander V. Tikhonov @ 2019-08-16  9:55 UTC (permalink / raw)
  To: Alexander Turenko; +Cc: Alexander V. Tikhonov, tarantool-patches

Added static build using Dockerfile on Centos 7 for release
commit criteria only. Also cleaned up the Dockerfile from
duplicating code and added the cleanup for cmake generating
CMakeCache.txt files and CMakeFiles directories to avoid of
cmake localy created setup failing inside the docker after
the whole tarantool path was copied into it. Added testing
into the staic build, running only when RUN_TESTS environment
variable set to non empty value, used in gitlab-ci job to run
the testing after the build.

Closes #3668
---

Github: https://github.com/tarantool/tarantool/tree/avtikhon/gh-3668-static-build-full-ci
Issue: https://github.com/tarantool/tarantool/issues/3668

 .gitlab-ci.yml         | 13 +++++++++++++
 .gitlab.mk             |  7 +++++++
 Dockerfile.staticbuild | 19 ++++++++++++-------
 3 files changed, 32 insertions(+), 7 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a7b2b3804..f160c276b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -326,3 +326,16 @@ debian_10:
     DIST: 'buster'
   script:
     - ${GITLAB_MAKE} package
+
+static_build:
+  only:
+    refs:
+      - master
+      - /^.*-full-ci$/
+  stage: test
+  tags:
+    - deploy
+  variables:
+    RUN_TESTS: 'ON'
+  script:
+    - ${GITLAB_MAKE} static_build
diff --git a/.gitlab.mk b/.gitlab.mk
index 7199adf94..cb66df4c2 100644
--- a/.gitlab.mk
+++ b/.gitlab.mk
@@ -105,3 +105,10 @@ vms_shutdown:
 package: git_submodule_update
 	git clone https://github.com/packpack/packpack.git packpack
 	PACKPACK_EXTRA_DOCKER_RUN_PARAMS='--network=host' ./packpack/packpack
+
+# ############
+# Static build
+# ############
+
+static_build:
+	docker build --network=host -f Dockerfile.staticbuild .
diff --git a/Dockerfile.staticbuild b/Dockerfile.staticbuild
index 6a784990b..195274d54 100644
--- a/Dockerfile.staticbuild
+++ b/Dockerfile.staticbuild
@@ -38,8 +38,9 @@ RUN yum -y install ncurses-static readline-static zlib-static pcre-static glibc-
 
 RUN yum -y install python-devel python-pip
 
+WORKDIR /
+
 RUN set -x && \
-    cd / && \
     curl -O -L https://www.openssl.org/source/openssl-1.1.0h.tar.gz && \
     tar -xvf openssl-1.1.0h.tar.gz && \
     cd openssl-1.1.0h && \
@@ -47,7 +48,6 @@ RUN set -x && \
     make && make install
 
 RUN set -x && \
-    cd / && \
     git clone https://github.com/curl/curl.git && \
     cd curl && \
     git checkout curl-7_59_0 && \
@@ -56,7 +56,6 @@ RUN set -x && \
     make -j && make install
 
 RUN set -x && \
-    cd / && \
     wget http://download.icu-project.org/files/icu4c/62.1/icu4c-62_1-src.tgz && \
     tar -xvf icu4c-62_1-src.tgz && \
     cd icu/source && \
@@ -64,7 +63,6 @@ RUN set -x && \
     make && make install
 
 RUN set -x && \
-    cd / && \
     LD_LIBRARY_PATH=/usr/local/lib64 curl -O -L http://download.savannah.nongnu.org/releases/libunwind/libunwind-1.3-rc1.tar.gz && \
     tar -xvf libunwind-1.3-rc1.tar.gz && \
     cd libunwind-1.3-rc1 && \
@@ -72,11 +70,12 @@ RUN set -x && \
     make && make install
 
 COPY . /tarantool
+WORKDIR /tarantool
 
 RUN set -x && \
-    cd tarantool && \
-    git submodule init && \
-    git submodule update
+    git submodule update --init && \
+    find . -name 'CMakeFiles' -type d -exec rm -rf {} + && \
+    find . -name 'CMakeCache.txt' -type f -delete
 
 RUN pip install -r /tarantool/test-run/requirements.txt
 
@@ -91,4 +90,10 @@ RUN set -x \
 
 RUN cd /tarantool && make install
 
+ARG RUN_TESTS
+RUN [ -n ${RUN_TESTS} ] && \
+    set -x && \
+    cd test && \
+    /usr/bin/python test-run.py --force
+
 ENTRYPOINT /bin/bash
-- 
2.17.1

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

* [tarantool-patches] Re: [PATCH v1] gitlab-ci: add static build
  2019-08-16  9:55 [tarantool-patches] [PATCH v1] gitlab-ci: add static build Alexander V. Tikhonov
@ 2019-08-19 12:00 ` Alexander Turenko
  0 siblings, 0 replies; 5+ messages in thread
From: Alexander Turenko @ 2019-08-19 12:00 UTC (permalink / raw)
  To: Alexander V. Tikhonov; +Cc: tarantool-patches

I have no objections other then those about unrelated changes. See
below.

WBR, Alexander Turenko.

On Fri, Aug 16, 2019 at 12:55:06PM +0300, Alexander V. Tikhonov wrote:
> Added static build using Dockerfile on Centos 7 for release
> commit criteria only. Also cleaned up the Dockerfile from
> duplicating code and added the cleanup for cmake generating
> CMakeCache.txt files and CMakeFiles directories to avoid of
> cmake localy created setup failing inside the docker after
> the whole tarantool path was copied into it. Added testing
> into the staic build, running only when RUN_TESTS environment

Typo: staic.

> variable set to non empty value, used in gitlab-ci job to run
> the testing after the build.
> 
> Closes #3668
> ---
> 
> Github: https://github.com/tarantool/tarantool/tree/avtikhon/gh-3668-static-build-full-ci
> Issue: https://github.com/tarantool/tarantool/issues/3668
> 
>  .gitlab-ci.yml         | 13 +++++++++++++
>  .gitlab.mk             |  7 +++++++
>  Dockerfile.staticbuild | 19 ++++++++++++-------
>  3 files changed, 32 insertions(+), 7 deletions(-)
> 
> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
> index a7b2b3804..f160c276b 100644
> --- a/.gitlab-ci.yml
> +++ b/.gitlab-ci.yml
> @@ -326,3 +326,16 @@ debian_10:
>      DIST: 'buster'
>    script:
>      - ${GITLAB_MAKE} package
> +
> +static_build:
> +  only:
> +    refs:
> +      - master
> +      - /^.*-full-ci$/
> +  stage: test
> +  tags:
> +    - deploy
> +  variables:
> +    RUN_TESTS: 'ON'
> +  script:
> +    - ${GITLAB_MAKE} static_build
> diff --git a/.gitlab.mk b/.gitlab.mk
> index 7199adf94..cb66df4c2 100644
> --- a/.gitlab.mk
> +++ b/.gitlab.mk
> @@ -105,3 +105,10 @@ vms_shutdown:
>  package: git_submodule_update
>  	git clone https://github.com/packpack/packpack.git packpack
>  	PACKPACK_EXTRA_DOCKER_RUN_PARAMS='--network=host' ./packpack/packpack
> +
> +# ############
> +# Static build
> +# ############
> +
> +static_build:
> +	docker build --network=host -f Dockerfile.staticbuild .
> diff --git a/Dockerfile.staticbuild b/Dockerfile.staticbuild
> index 6a784990b..195274d54 100644
> --- a/Dockerfile.staticbuild
> +++ b/Dockerfile.staticbuild
> @@ -38,8 +38,9 @@ RUN yum -y install ncurses-static readline-static zlib-static pcre-static glibc-
>  
>  RUN yum -y install python-devel python-pip
>  
> +WORKDIR /
> +
>  RUN set -x && \
> -    cd / && \
>      curl -O -L https://www.openssl.org/source/openssl-1.1.0h.tar.gz && \
>      tar -xvf openssl-1.1.0h.tar.gz && \
>      cd openssl-1.1.0h && \
> @@ -47,7 +48,6 @@ RUN set -x && \
>      make && make install
>  
>  RUN set -x && \
> -    cd / && \
>      git clone https://github.com/curl/curl.git && \
>      cd curl && \
>      git checkout curl-7_59_0 && \
> @@ -56,7 +56,6 @@ RUN set -x && \
>      make -j && make install
>  
>  RUN set -x && \
> -    cd / && \
>      wget http://download.icu-project.org/files/icu4c/62.1/icu4c-62_1-src.tgz && \
>      tar -xvf icu4c-62_1-src.tgz && \
>      cd icu/source && \
> @@ -64,7 +63,6 @@ RUN set -x && \
>      make && make install
>  
>  RUN set -x && \
> -    cd / && \
>      LD_LIBRARY_PATH=/usr/local/lib64 curl -O -L http://download.savannah.nongnu.org/releases/libunwind/libunwind-1.3-rc1.tar.gz && \
>      tar -xvf libunwind-1.3-rc1.tar.gz && \
>      cd libunwind-1.3-rc1 && \
> @@ -72,11 +70,12 @@ RUN set -x && \
>      make && make install
>  
>  COPY . /tarantool
> +WORKDIR /tarantool
>  
>  RUN set -x && \
> -    cd tarantool && \
> -    git submodule init && \
> -    git submodule update
> +    git submodule update --init && \

All changes above within this file are not needed for your patch. Let
remove them. See
https://www.freelists.org/post/tarantool-patches/PATCH-travisci-set-right-flags-in-release-testing-jobs,3
from words 'There is a rule about not making unrelated changes' to the
end of the email.

> +    find . -name 'CMakeFiles' -type d -exec rm -rf {} + && \
> +    find . -name 'CMakeCache.txt' -type f -delete
>  
>  RUN pip install -r /tarantool/test-run/requirements.txt
>  
> @@ -91,4 +90,10 @@ RUN set -x \
>  
>  RUN cd /tarantool && make install
>  
> +ARG RUN_TESTS
> +RUN [ -n ${RUN_TESTS} ] && \
> +    set -x && \
> +    cd test && \
> +    /usr/bin/python test-run.py --force
> +
>  ENTRYPOINT /bin/bash
> -- 
> 2.17.1
> 

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

* [tarantool-patches] Re: [PATCH v1] gitlab-ci: add static build
  2019-08-20 22:02 ` [tarantool-patches] " Alexander Turenko
@ 2019-08-21 11:07   ` Alexander Turenko
  0 siblings, 0 replies; 5+ messages in thread
From: Alexander Turenko @ 2019-08-21 11:07 UTC (permalink / raw)
  To: Alexander V. Tikhonov; +Cc: tarantool-patches, Kirill Yukhin

Kirill says voicely that he is okay.

Pushed to master, 2.2, 2.1, 1.10.

WBR, Alexander Turenko.

On Wed, Aug 21, 2019 at 01:02:00AM +0300, Alexander Turenko wrote:
> LGTM.
> 
> Alexander, did you test it on 1.10? If not, I suggest to do so before
> the patch will land.
> 
> Kirill, please, push to all release branches down to 1.10. You can test
> it before push using `RUN_TESTS=ON make -f .gitlab.mk static_build` (the
> docker daemon should be running).
> 
> WBR, Alexander Turenko.
> 
> On Tue, Aug 20, 2019 at 12:32:32PM +0300, Alexander V. Tikhonov wrote:
> > Added static build using Dockerfile on Centos 7 for release
> > commit criteria only. Added the cleanup for cmake generating
> > CMakeCache.txt files and CMakeFiles directories to avoid of
> > cmake localy created setup failing inside the docker after
> > the whole tarantool path was copied into it. Added testing
> > into the static build, running only when RUN_TESTS environment
> > variable set to non empty value, used in gitlab-ci job to run
> > the testing after the build.
> > 
> > Closes #3668
> > ---
> > 
> > Github: https://github.com/tarantool/tarantool/tree/avtikhon/gh-3668-static-build-full-ci
> > Issue: https://github.com/tarantool/tarantool/issues/3668
> > 
> >  .gitlab-ci.yml         | 13 +++++++++++++
> >  .gitlab.mk             |  7 +++++++
> >  Dockerfile.staticbuild | 12 ++++++++++++
> >  3 files changed, 32 insertions(+)
> > 
> > diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
> > index a7b2b3804..f160c276b 100644
> > --- a/.gitlab-ci.yml
> > +++ b/.gitlab-ci.yml
> > @@ -326,3 +326,16 @@ debian_10:
> >      DIST: 'buster'
> >    script:
> >      - ${GITLAB_MAKE} package
> > +
> > +static_build:
> > +  only:
> > +    refs:
> > +      - master
> > +      - /^.*-full-ci$/
> > +  stage: test
> > +  tags:
> > +    - deploy
> > +  variables:
> > +    RUN_TESTS: 'ON'
> > +  script:
> > +    - ${GITLAB_MAKE} static_build
> > diff --git a/.gitlab.mk b/.gitlab.mk
> > index 7199adf94..cb66df4c2 100644
> > --- a/.gitlab.mk
> > +++ b/.gitlab.mk
> > @@ -105,3 +105,10 @@ vms_shutdown:
> >  package: git_submodule_update
> >  	git clone https://github.com/packpack/packpack.git packpack
> >  	PACKPACK_EXTRA_DOCKER_RUN_PARAMS='--network=host' ./packpack/packpack
> > +
> > +# ############
> > +# Static build
> > +# ############
> > +
> > +static_build:
> > +	docker build --network=host -f Dockerfile.staticbuild .
> > diff --git a/Dockerfile.staticbuild b/Dockerfile.staticbuild
> > index 6a784990b..679cce560 100644
> > --- a/Dockerfile.staticbuild
> > +++ b/Dockerfile.staticbuild
> > @@ -78,6 +78,12 @@ RUN set -x && \
> >      git submodule init && \
> >      git submodule update
> >  
> > +WORKDIR /tarantool
> > +
> > +RUN set -x && \
> > +    find . -name 'CMakeFiles' -type d -exec rm -rf {} + && \
> > +    find . -name 'CMakeCache.txt' -type f -delete
> > +
> >  RUN pip install -r /tarantool/test-run/requirements.txt
> >  
> >  RUN set -x \
> > @@ -91,4 +97,10 @@ RUN set -x \
> >  
> >  RUN cd /tarantool && make install
> >  
> > +ARG RUN_TESTS
> > +RUN [ -n ${RUN_TESTS} ] && \
> > +    set -x && \
> > +    cd test && \
> > +    /usr/bin/python test-run.py --force
> > +
> >  ENTRYPOINT /bin/bash
> > -- 
> > 2.17.1
> > 

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

* [tarantool-patches] Re: [PATCH v1] gitlab-ci: add static build
  2019-08-20  9:32 [tarantool-patches] " Alexander V. Tikhonov
@ 2019-08-20 22:02 ` Alexander Turenko
  2019-08-21 11:07   ` Alexander Turenko
  0 siblings, 1 reply; 5+ messages in thread
From: Alexander Turenko @ 2019-08-20 22:02 UTC (permalink / raw)
  To: Alexander V. Tikhonov; +Cc: tarantool-patches, Kirill Yukhin

LGTM.

Alexander, did you test it on 1.10? If not, I suggest to do so before
the patch will land.

Kirill, please, push to all release branches down to 1.10. You can test
it before push using `RUN_TESTS=ON make -f .gitlab.mk static_build` (the
docker daemon should be running).

WBR, Alexander Turenko.

On Tue, Aug 20, 2019 at 12:32:32PM +0300, Alexander V. Tikhonov wrote:
> Added static build using Dockerfile on Centos 7 for release
> commit criteria only. Added the cleanup for cmake generating
> CMakeCache.txt files and CMakeFiles directories to avoid of
> cmake localy created setup failing inside the docker after
> the whole tarantool path was copied into it. Added testing
> into the static build, running only when RUN_TESTS environment
> variable set to non empty value, used in gitlab-ci job to run
> the testing after the build.
> 
> Closes #3668
> ---
> 
> Github: https://github.com/tarantool/tarantool/tree/avtikhon/gh-3668-static-build-full-ci
> Issue: https://github.com/tarantool/tarantool/issues/3668
> 
>  .gitlab-ci.yml         | 13 +++++++++++++
>  .gitlab.mk             |  7 +++++++
>  Dockerfile.staticbuild | 12 ++++++++++++
>  3 files changed, 32 insertions(+)
> 
> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
> index a7b2b3804..f160c276b 100644
> --- a/.gitlab-ci.yml
> +++ b/.gitlab-ci.yml
> @@ -326,3 +326,16 @@ debian_10:
>      DIST: 'buster'
>    script:
>      - ${GITLAB_MAKE} package
> +
> +static_build:
> +  only:
> +    refs:
> +      - master
> +      - /^.*-full-ci$/
> +  stage: test
> +  tags:
> +    - deploy
> +  variables:
> +    RUN_TESTS: 'ON'
> +  script:
> +    - ${GITLAB_MAKE} static_build
> diff --git a/.gitlab.mk b/.gitlab.mk
> index 7199adf94..cb66df4c2 100644
> --- a/.gitlab.mk
> +++ b/.gitlab.mk
> @@ -105,3 +105,10 @@ vms_shutdown:
>  package: git_submodule_update
>  	git clone https://github.com/packpack/packpack.git packpack
>  	PACKPACK_EXTRA_DOCKER_RUN_PARAMS='--network=host' ./packpack/packpack
> +
> +# ############
> +# Static build
> +# ############
> +
> +static_build:
> +	docker build --network=host -f Dockerfile.staticbuild .
> diff --git a/Dockerfile.staticbuild b/Dockerfile.staticbuild
> index 6a784990b..679cce560 100644
> --- a/Dockerfile.staticbuild
> +++ b/Dockerfile.staticbuild
> @@ -78,6 +78,12 @@ RUN set -x && \
>      git submodule init && \
>      git submodule update
>  
> +WORKDIR /tarantool
> +
> +RUN set -x && \
> +    find . -name 'CMakeFiles' -type d -exec rm -rf {} + && \
> +    find . -name 'CMakeCache.txt' -type f -delete
> +
>  RUN pip install -r /tarantool/test-run/requirements.txt
>  
>  RUN set -x \
> @@ -91,4 +97,10 @@ RUN set -x \
>  
>  RUN cd /tarantool && make install
>  
> +ARG RUN_TESTS
> +RUN [ -n ${RUN_TESTS} ] && \
> +    set -x && \
> +    cd test && \
> +    /usr/bin/python test-run.py --force
> +
>  ENTRYPOINT /bin/bash
> -- 
> 2.17.1
> 

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

* [tarantool-patches] Re: [PATCH v1] gitlab-ci: add static build
  2019-08-09  4:32 [tarantool-patches] " Alexander V. Tikhonov
@ 2019-08-16  2:30 ` Alexander Turenko
  0 siblings, 0 replies; 5+ messages in thread
From: Alexander Turenko @ 2019-08-16  2:30 UTC (permalink / raw)
  To: Alexander V. Tikhonov; +Cc: tarantool-patches

I looked briefly and it seems to be okay. But, please, remove cleanup
changes from the dockerfile: they hide real changes and bloats the
patch.

I'll look deeper when you'll update the patch.

WBR, Alexander Turenko.

> -RUN set -x \
> -    && yum -y install \
> +RUN set -x && \
> +    yum -y install \

I meant this kind of changes.

> -RUN yum -y install ncurses-static readline-static zlib-static pcre-static glibc-static
> +    yum -y install \
> +        ncurses-static \
> +        readline-static \
> +        zlib-static \
> +        pcre-static \
> +        glibc-static && \
> +    yum -y install \
> +        python-devel \
> +        python-pip

This.

> +WORKDIR /
>  
>  RUN set -x && \
> -    cd / && \
>      curl -O -L https://www.openssl.org/source/openssl-1.1.0h.tar.gz && \
>      tar -xvf openssl-1.1.0h.tar.gz && \
>      cd openssl-1.1.0h && \

And this.

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

end of thread, other threads:[~2019-08-21 11:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-16  9:55 [tarantool-patches] [PATCH v1] gitlab-ci: add static build Alexander V. Tikhonov
2019-08-19 12:00 ` [tarantool-patches] " Alexander Turenko
  -- strict thread matches above, loose matches on Subject: below --
2019-08-20  9:32 [tarantool-patches] " Alexander V. Tikhonov
2019-08-20 22:02 ` [tarantool-patches] " Alexander Turenko
2019-08-21 11:07   ` Alexander Turenko
2019-08-09  4:32 [tarantool-patches] " Alexander V. Tikhonov
2019-08-16  2:30 ` [tarantool-patches] " Alexander Turenko

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