diff options
author | Andrew Newdigate <andrew@gitlab.com> | 2017-12-18 19:13:29 +0300 |
---|---|---|
committer | Jacob Vosmaer <jacob@gitlab.com> | 2017-12-20 12:58:07 +0300 |
commit | a51dc464855f5537a258d854645e0cf12f409187 (patch) | |
tree | b4bcae3eb31ba5fd23a8f0fe246d9ad3f49633ca | |
parent | 2f76d626798cfda9f4503538964e29d658e57d0d (diff) |
Go 1.9 build
-rw-r--r-- | .gitlab-ci.yml | 56 | ||||
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | _support/build-images/ruby-2.3-golang-1.8-git-2.13/Dockerfile | 10 | ||||
-rw-r--r-- | _support/build-images/ruby-2.3-golang-1.8-git-2.8/Dockerfile | 10 | ||||
-rw-r--r-- | _support/build-images/versioned/Dockerfile | 11 |
5 files changed, 67 insertions, 24 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cc05018c3..8dcc22ec1 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 @@ -25,6 +25,27 @@ verify: - make - _support/test-boot-time . +.assemble_template: &assemble_definition + before_script: + # Override gemfile config (for some reasong `config --delete` doesn't do it) + - bundle config --local gemfile Gemfile + stage: build + only: + - tags + cache: + key: gems + paths: + - ruby/vendor/bundle + script: + # Just in case we start running CI builds on other architectures in future + - go version + - make binaries + artifacts: + paths: + - _build/assembly/bin/ + name: "$CI_JOB_NAME" + expire_in: 6 months + .test_template: &test_definition before_script: - bundle config --local gemfile Gemfile @@ -39,8 +60,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 @@ -49,6 +83,18 @@ test:go1.8-git2.8: <<: *test_definition image: registry.gitlab.com/gitlab-org/gitaly/build-ruby-2.3-golang-1.8-git-2.8:latest +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: stage: test script: @@ -103,7 +149,6 @@ codequality: expire_in: 1 week allow_failure: true - .build_image: &build_image variables: DOCKER_DRIVER: overlay @@ -116,12 +161,15 @@ 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.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 @@ -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.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 |