Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalie committed Apr 6, 2023
1 parent 67f1396 commit 39a2872
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 14 deletions.
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
18 changes: 15 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
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"]
5 changes: 4 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -271,5 +271,8 @@ DEPENDENCIES
travis-support!
webmock

RUBY VERSION
ruby 2.5.8p224

BUNDLED WITH
1.17.3
2.3.26
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "2.1"
services:
web:
build:
Expand Down
1 change: 1 addition & 0 deletions lib/travis/build/rake_tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

require 'json'
require 'logger'
require 'tmpdir'
require 'pathname'
require 'date'

Expand Down
13 changes: 7 additions & 6 deletions public/version-aliases/ghc.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
}
2 changes: 1 addition & 1 deletion script/docker-build-and-push
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 39a2872

Please sign in to comment.