From 39a287236ab4ded4c0ec31c4d9a461ff7e4aa23e Mon Sep 17 00:00:00 2001 From: vitalie Date: Thu, 6 Apr 2023 16:11:52 +0300 Subject: [PATCH] Fix build --- .travis.yml | 6 ++++-- Dockerfile | 18 +++++++++++++++--- Gemfile.lock | 5 ++++- docker-compose.yml | 1 - lib/travis/build/rake_tasks.rb | 1 + public/version-aliases/ghc.json | 13 +++++++------ script/docker-build-and-push | 2 +- 7 files changed, 32 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index d7f868ddd6..6d09e4c455 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,13 +32,16 @@ jobs: - stage: test env: script: ./script/validate-example-payloads-with-docker + - stage: ':ship: it to quay.io' env: script: ./script/docker-build-and-push if: (branch = master and type = push ) OR commit_message =~ /ship:docker/ OR env(SHIP_DOCKER) = true +before_install: +- gem update --silent --system 3.3.26 + before_script: -- "gem install bundler -v 1.17.3" - eval "$(script/handle-docker-config)" - bundle install - bundle exec rake clean assets:precompile @@ -57,7 +60,6 @@ after_failure: bundle exec rake dump_examples_logs before_deploy: - sudo pip install -U -I Pygments - ./script/build-s3-index-html -- "gem install bundler -v 1.17.3" deploy: provider: s3 diff --git a/Dockerfile b/Dockerfile index 4dfbb9dbc6..63a6be47bc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,27 +1,39 @@ FROM ruby:2.5.8 as builder -WORKDIR /app ARG GITHUB_OAUTH_TOKEN=notset +RUN gem update --silent --system 3.3.26 + +WORKDIR /app + COPY . . RUN git describe --always --dirty --tags | tee VERSION RUN git rev-parse --short HEAD | tee BUILD_SLUG_COMMIT RUN rm -rf .git + RUN bundle install --frozen --deployment --without='development test' --clean + RUN bundle exec rake assets:precompile GITHUB_OAUTH_TOKEN=$GITHUB_OAUTH_TOKEN RUN tar -cjf public.tar.bz2 public && rm -rf public + FROM ruby:2.5.8-slim + LABEL maintainer Travis CI GmbH -WORKDIR /app ENV TRAVIS_BUILD_DUMP_BACKTRACE true ENV PORT 4000 +RUN gem update --silent --system 3.3.26 + +WORKDIR /app + COPY --from=builder /app /app COPY --from=builder /usr/local/bundle/config /usr/local/bundle/config HEALTHCHECK --interval=5s CMD script/healthcheck -EXPOSE 4000/tcp + +EXPOSE $PORT/tcp + CMD ["script/server"] diff --git a/Gemfile.lock b/Gemfile.lock index 0a4329a3ee..8a8619a922 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -271,5 +271,8 @@ DEPENDENCIES travis-support! webmock +RUBY VERSION + ruby 2.5.8p224 + BUNDLED WITH - 1.17.3 + 2.3.26 diff --git a/docker-compose.yml b/docker-compose.yml index ef9e025157..a9cc5c62aa 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,3 @@ -version: "2.1" services: web: build: diff --git a/lib/travis/build/rake_tasks.rb b/lib/travis/build/rake_tasks.rb index c1fbc1c07f..09529b1086 100644 --- a/lib/travis/build/rake_tasks.rb +++ b/lib/travis/build/rake_tasks.rb @@ -2,6 +2,7 @@ require 'json' require 'logger' +require 'tmpdir' require 'pathname' require 'date' diff --git a/public/version-aliases/ghc.json b/public/version-aliases/ghc.json index 555b5ca846..aae728f71a 100644 --- a/public/version-aliases/ghc.json +++ b/public/version-aliases/ghc.json @@ -166,9 +166,9 @@ "9.0.1-alpha1": "9.0.1-alpha1", "9.0": "9.0.2", "9.0.1": "9.0.1", - "9": "9.6.0.20230302", - "9.x": "9.6.0.20230302", - "9.x.x": "9.6.0.20230302", + "9": "9.6.1", + "9.x": "9.6.1", + "9.x.x": "9.6.1", "9.0.x": "9.0.2", "9.0.2": "9.0.2", "9.2.1-alpha1": "9.2.1-alpha1", @@ -192,12 +192,13 @@ "9.4.3": "9.4.3", "9.4.4": "9.4.4", "9.6.0.20230111": "9.6.0.20230111", - "9.6.x": "9.6.0.20230302", - "9.6": "9.6.1-alpha3", + "9.6.x": "9.6.1", + "9.6": "9.6.1", "9.6.0.20230128": "9.6.0.20230128", "9.6.0.20230210": "9.6.0.20230210", "9.6.0.20230302": "9.6.0.20230302", "9.6.1-alpha1": "9.6.1-alpha1", "9.6.1-alpha2": "9.6.1-alpha2", - "9.6.1-alpha3": "9.6.1-alpha3" + "9.6.1-alpha3": "9.6.1-alpha3", + "9.6.1": "9.6.1" } \ No newline at end of file diff --git a/script/docker-build-and-push b/script/docker-build-and-push index ba8f18a080..4dfd5c5a82 100755 --- a/script/docker-build-and-push +++ b/script/docker-build-and-push @@ -3,7 +3,7 @@ set -ev app_name="web" -local_image="travis-build_${app_name}" +local_image="travis-build-${app_name}" quay_image=quay.io/travisci/travis-build unset DOCKER_CERT_PATH