Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer (GitLab) <jacob@gitlab.com>2017-12-19 13:46:05 +0300
committerJacob Vosmaer (GitLab) <jacob@gitlab.com>2017-12-19 13:46:05 +0300
commitcb2e943b5460acb3e2f0a8ecabf244e1230f5863 (patch)
tree783a2e3a81922ee08e0339aa20b40a14b5d4707f
parentba59b241ddbee3d9d30334832ef760548017df57 (diff)
parent03dda4558f1ff370cfe0aff9fc57e2e8f611b398 (diff)
Merge branch 'an/go-1.9' into 'master'
Use go 1.9 See merge request gitlab-org/gitaly!496
-rw-r--r--.gitlab-ci.yml58
-rw-r--r--Makefile4
-rw-r--r--_support/build-images/ruby-2.3-golang-1.8-git-2.13/Dockerfile10
-rw-r--r--_support/build-images/ruby-2.3-golang-1.8-git-2.14/Dockerfile10
-rw-r--r--_support/build-images/ruby-2.3-golang-1.8-git-2.8/Dockerfile10
-rw-r--r--_support/build-images/versioned/Dockerfile11
6 files changed, 65 insertions, 38 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d3724d945..714fdc01c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,4 +1,4 @@
-image: registry.gitlab.com/gitlab-org/gitaly/build-ruby-2.3-golang-1.8-git-2.13:latest
+image: registry.gitlab.com/gitlab-org/gitaly/build-ruby-2.3-golang-1.9-git-2.14:latest
stages:
- build_images
@@ -11,23 +11,42 @@ verify:
script:
- make verify
-.build_template: &build_definition
+.ruby_template: &ruby_definition
before_script:
# Override gemfile config (for some reasong `config --delete` doesn't do it)
- bundle config --local gemfile Gemfile
- stage: build
cache:
key: gems
paths:
- ruby/vendor/bundle
+
+.build_template: &build_definition
+ <<: *ruby_definition
+ stage: build
script:
- make
- _support/test-boot-time .
+.assemble_template: &assemble_definition
+ <<: *ruby_definition
+ stage: build
+ only:
+ - tags
+ script:
+ # Just in case we start running CI builds on other architectures in future
+ - go version
+ - make binaries
+ artifacts:
+ paths:
+ - _build/assembly/checksums.sha256.txt
+ - _build/assembly/bin/
+ name: "$CI_JOB_NAME"
+ expire_in: 6 months
+
.test_template: &test_definition
- before_script:
- - bundle config --local gemfile Gemfile
+ <<: *ruby_definition
stage: test
+ # Override the ruby_definition cache definition for pull
cache:
key: gems
paths:
@@ -38,8 +57,21 @@ verify:
- git version
- make test
-build:default:
+build:go1.9:
+ <<: *build_definition
+ image: registry.gitlab.com/gitlab-org/gitaly/build-ruby-2.3-golang-1.9-git-2.14:latest
+
+build:go1.8:
<<: *build_definition
+ image: registry.gitlab.com/gitlab-org/gitaly/build-ruby-2.3-golang-1.8-git-2.8:latest
+
+binaries_go1.9:
+ <<: *assemble_definition
+ image: registry.gitlab.com/gitlab-org/gitaly/build-ruby-2.3-golang-1.9-git-2.14:latest
+
+binaries_go1.8:
+ <<: *assemble_definition
+ image: registry.gitlab.com/gitlab-org/gitaly/build-ruby-2.3-golang-1.8-git-2.14:latest
test:default:
<<: *test_definition
@@ -52,6 +84,14 @@ test:go1.8-git2.14:
<<: *test_definition
image: registry.gitlab.com/gitlab-org/gitaly/build-ruby-2.3-golang-1.8-git-2.14:latest
+test:go1.9-git2.8:
+ <<: *test_definition
+ image: registry.gitlab.com/gitlab-org/gitaly/build-ruby-2.3-golang-1.9-git-2.8:latest
+
+test:go1.9-git2.14:
+ <<: *test_definition
+ image: registry.gitlab.com/gitlab-org/gitaly/build-ruby-2.3-golang-1.9-git-2.14:latest
+
cover:
before_script:
- bundle config --local gemfile Gemfile
@@ -80,7 +120,6 @@ codequality:
expire_in: 1 week
allow_failure: true
-
.build_image: &build_image
variables:
DOCKER_DRIVER: overlay
@@ -93,13 +132,16 @@ codequality:
script:
- cp ruby/Gemfile ruby/Gemfile.lock _support/build-images/$CI_JOB_NAME/
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.com
- - docker build -t registry.gitlab.com/gitlab-org/gitaly/build-$CI_JOB_NAME:latest _support/build-images/$CI_JOB_NAME/
+ - docker build -t registry.gitlab.com/gitlab-org/gitaly/build-$CI_JOB_NAME:latest --build-arg CUSTOM_IMAGE_VERSION=$CI_JOB_NAME _support/build-images/versioned/
- docker push registry.gitlab.com/gitlab-org/gitaly/build-$CI_JOB_NAME:latest
ruby-2.3-golang-1.8-git-2.8: *build_image
ruby-2.3-golang-1.8-git-2.13: *build_image
ruby-2.3-golang-1.8-git-2.14: *build_image
+ruby-2.3-golang-1.9-git-2.8: *build_image
+ruby-2.3-golang-1.9-git-2.14: *build_image
+
# Create a MR in GitLab-CE when releasing a Gitaly version
update-downstream-server-version:
stage: publish
diff --git a/Makefile b/Makefile
index a50f44ca8..dd7ca208d 100644
--- a/Makefile
+++ b/Makefile
@@ -78,6 +78,10 @@ assemble: force-ruby-bundle build
cp -r ruby $(ASSEMBLY_ROOT)/ruby
install $(foreach cmd,$(COMMANDS),$(BIN_BUILD_DIR)/$(cmd)) $(ASSEMBLY_ROOT)/bin
+binaries: assemble
+ @if [ $$(uname -m) != 'x86_64' ]; then echo Incorrect architecture for build: $(uname -m); exit 1; fi
+ @cd $(ASSEMBLY_ROOT) && shasum -a 256 bin/* | tee checksums.sha256.txt
+
docker: $(TARGET_SETUP)
rm -rf $(TARGET_DIR)/docker/
mkdir -p $(TARGET_DIR)/docker/bin/
diff --git a/_support/build-images/ruby-2.3-golang-1.8-git-2.13/Dockerfile b/_support/build-images/ruby-2.3-golang-1.8-git-2.13/Dockerfile
deleted file mode 100644
index 04acdfb79..000000000
--- a/_support/build-images/ruby-2.3-golang-1.8-git-2.13/Dockerfile
+++ /dev/null
@@ -1,10 +0,0 @@
-FROM registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.3-golang-1.8-git-2.13
-
-RUN mkdir -p /bundle-cache
-
-COPY Gemfile /bundle-cache
-COPY Gemfile.lock /bundle-cache
-
-RUN apt-get update -qq && \
- apt-get install -qq -y rubygems bundler cmake build-essential libicu-dev && \
- cd /bundle-cache && bundle install --path vendor/bundle
diff --git a/_support/build-images/ruby-2.3-golang-1.8-git-2.14/Dockerfile b/_support/build-images/ruby-2.3-golang-1.8-git-2.14/Dockerfile
deleted file mode 100644
index 2844a8a07..000000000
--- a/_support/build-images/ruby-2.3-golang-1.8-git-2.14/Dockerfile
+++ /dev/null
@@ -1,10 +0,0 @@
-FROM registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.3-golang-1.8-git-2.14
-
-RUN mkdir -p /bundle-cache
-
-COPY Gemfile /bundle-cache
-COPY Gemfile.lock /bundle-cache
-
-RUN apt-get update -qq && \
- apt-get install -qq -y rubygems bundler cmake build-essential libicu-dev && \
- cd /bundle-cache && bundle install --path vendor/bundle
diff --git a/_support/build-images/ruby-2.3-golang-1.8-git-2.8/Dockerfile b/_support/build-images/ruby-2.3-golang-1.8-git-2.8/Dockerfile
deleted file mode 100644
index 0c1422c3c..000000000
--- a/_support/build-images/ruby-2.3-golang-1.8-git-2.8/Dockerfile
+++ /dev/null
@@ -1,10 +0,0 @@
-FROM registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.3-golang-1.8-git-2.8
-
-RUN mkdir -p /bundle-cache
-
-COPY Gemfile /bundle-cache
-COPY Gemfile.lock /bundle-cache
-
-RUN apt-get update -qq && \
- apt-get install -qq -y rubygems bundler cmake build-essential libicu-dev && \
- cd /bundle-cache && bundle install --path vendor/bundle
diff --git a/_support/build-images/versioned/Dockerfile b/_support/build-images/versioned/Dockerfile
new file mode 100644
index 000000000..856f92aa5
--- /dev/null
+++ b/_support/build-images/versioned/Dockerfile
@@ -0,0 +1,11 @@
+ARG CUSTOM_IMAGE_VERSION
+FROM registry.gitlab.com/gitlab-org/gitlab-build-images:${CUSTOM_IMAGE_VERSION}
+
+RUN mkdir -p /bundle-cache
+
+COPY Gemfile /bundle-cache
+COPY Gemfile.lock /bundle-cache
+
+RUN DEBIAN_FRONTEND=noninteractive apt-get update -qq && \
+ DEBIAN_FRONTEND=noninteractive apt-get install -qq -y rubygems bundler cmake build-essential libicu-dev && \
+ cd /bundle-cache && bundle install --path vendor/bundle