Skip to content

Commit

Permalink
fix knapsack inclusion of bundler inject files and try to speed up bu…
Browse files Browse the repository at this point in the history
…ilds (#757)
  • Loading branch information
ShanaLMoore authored Aug 20, 2024
2 parents d2f5580 + 67f07db commit 04f8a5b
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 16 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-test-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:

jobs:
build:
uses: scientist-softserv/actions/.github/workflows/build.yaml@v0.0.22
uses: scientist-softserv/actions/.github/workflows/build.yaml@webworkersunited
secrets: inherit
with:
platforms: 'linux/amd64'
Expand All @@ -26,14 +26,14 @@ jobs:

test:
needs: build
uses: scientist-softserv/actions/.github/workflows/test.yaml@v0.0.22
uses: scientist-softserv/actions/.github/workflows/test.yaml@webworkersunited
with:
confdir: '/app/samvera/hyrax-webapp/solr/conf'
rspec_cmd: "cd .. && gem install semaphore_test_boosters && bundle && rspec_booster --job $CI_NODE_INDEX/$CI_NODE_TOTAL"

lint:
needs: build
uses: scientist-softserv/actions/.github/workflows/lint.yaml@v0.0.22
uses: scientist-softserv/actions/.github/workflows/lint.yaml@webworkersunited
with:
webTarget: hyku-web
workerTarget: hyku-worker
Expand Down
6 changes: 1 addition & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
FROM ghcr.io/samvera/hyku/base:20b8c56e as hyku-knap-base

# Ensure the directory exists
RUN mkdir -p /app/.bundler.d

# This is specifically NOT $APP_PATH but the parent directory
COPY --chown=1001:101 . /app/samvera
COPY --chown=1001:101 bundler.d/ /app/.bundler.d/
RUN ln -s /app/samvera/bundler.d /app/.bundler.d
ENV BUNDLE_LOCAL__HYKU_KNAPSACK=/app/samvera
ENV BUNDLE_DISABLE_LOCAL_BRANCH_CHECK=true
ENV BUNDLE_BUNDLER_INJECT__GEM_PATH=/app/samvera/bundler.d

RUN bundle install --jobs "$(nproc)"

Expand Down
2 changes: 0 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ x-app: &app
- AUXILIARY_QUEUE_TENANTS="sdapi" # This line is what makes the knapsack include use the local code instead of the remote gem
- AWS_REGION=us-east-1
- AWS_S3_BUCKET=space-stone-production-preprocessedbucketf21466dd-15sun4xy658nh
- BUNDLE_BUNDLER_INJECT__GEM_PATH=/app/samvera/bundler.d
- BUNDLE_DISABLE_LOCAL_BRANCH_CHECK=true
- BUNDLE_LOCAL__HYKU_KNAPSACK=/app/samvera # This line is what makes the knapsack include use the local code instead of the remote gem
- FITS_SERVLET_URL=http://fits:8080/fits
Expand Down Expand Up @@ -125,7 +124,6 @@ services:
- AUXILIARY_QUEUE_TENANTS="sdapi" # This line is what makes the knapsack include use the local code instead of the remote gem
- AWS_REGION=us-east-1
- AWS_S3_BUCKET=space-stone-production-preprocessedbucketf21466dd-15sun4xy658nh
- BUNDLE_BUNDLER_INJECT__GEM_PATH=/app/samvera/bundler.d
- BUNDLE_DISABLE_LOCAL_BRANCH_CHECK=true
- BUNDLE_LOCAL__HYKU_KNAPSACK=/app/samvera # This line is what makes the knapsack include use the local code instead of the remote gem
- FITS_SERVLET_URL=http://fits:8080/fits
Expand Down
2 changes: 0 additions & 2 deletions ops/production-deploy.tmpl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ extraEnvVars: &envVars
value: $AWS_SECRET_ACCESS_KEY
- name: AUXILIARY_QUEUE_TENANTS
value: sdapi
- name: BUNDLE_BUNDLER_INJECT__GEM_PATH
value: /app/samvera/bundler.d
- name: BUNDLE_DISABLE_LOCAL_BRANCH_CHECK
value: "true"
- name: BUNDLE_LOCAL__HYKU_KNAPSACK
Expand Down
4 changes: 0 additions & 4 deletions ops/staging-deploy.tmpl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,10 @@ extraEnvVars: &envVars
value: $AWS_SECRET_ACCESS_KEY
- name: AUXILIARY_QUEUE_TENANTS
value: sdapi
- name: BUNDLE_BUNDLER_INJECT__GEM_PATH
value: /app/samvera/bundler.d
- name: BUNDLE_DISABLE_LOCAL_BRANCH_CHECK
value: "true"
- name: BUNDLE_LOCAL__HYKU_KNAPSACK
value: /app/samvera
- name: BUNDLE_BUNDLER_INJECT__GEM_PATH
value: /app/samvera/bundler.d
- name: CONFDIR
value: "/app/samvera/hyrax-webapp/solr/conf"
- name: CLIENT_ADMIN_USER_EMAIL
Expand Down

0 comments on commit 04f8a5b

Please sign in to comment.