Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TBT-112 build script v2 #2887

Merged
merged 5 commits into from
Aug 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ FROM ruby:3.2.2

LABEL maintainer Travis CI GmbH <support+travis-web-docker-images@travis-ci.com>

ARG AIDA_URL

RUN groupadd --gid 1000 node \
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node

Expand Down Expand Up @@ -39,8 +41,14 @@ COPY . /app

RUN --mount=type=secret,id=GITHUB_PERSONAL_TOKEN export GITHUB_PERSONAL_TOKEN=$(cat /run/secrets/GITHUB_PERSONAL_TOKEN) && git config --global url."https://$GITHUB_PERSONAL_TOKEN@github.com/".insteadOf ssh://git@github.com

RUN npm ci
RUN ember build --environment=production
RUN (\
npm ci; \
if test $AIDA_URL; then \
curl -o /app/node_modules/asktravis/dist/aida.js $AIDA_URL; \
curl -o /app/node_modules/asktravis/dist/aida.js.map $AIDA_URL.map || true; \
fi; \
ember build --environment=production; \
)

RUN cp -a public/* dist/

Expand Down