-
Notifications
You must be signed in to change notification settings - Fork 0
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
WEB-6755: Gem updates #238
Changes from 8 commits
e52f375
dcb39bd
91c362f
b6447f6
f575ea6
516d081
62d55f3
db591df
1dfca5a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
AllCops: | ||
TargetRubyVersion: 3.2 | ||
TargetRubyVersion: 3.3 | ||
NewCops: enable | ||
Exclude: | ||
- tmp/**/* | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
3.2.0 | ||
3.3.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would be better to keep it at 3.2 to be consistent with Dockerfile There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh my mistake—I attempted to get to 3.3 and had to rollback. Forgot to do here—thanks! |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,7 @@ | ||
FROM ruby:3.2-alpine | ||
LABEL [email protected] | ||
ARG RUBY_ENV | ||
|
||
LABEL com.github.actions.name="robles" | ||
LABEL com.github.actions.author="Kodeco <[email protected]>" | ||
LABEL com.github.actions.description="Content publication for kodeco.com" | ||
LABEL com.github.actions.color="purple" | ||
LABEL com.github.actions.icon="book" | ||
FROM ruby:3.2-alpine AS builder | ||
LABEL [email protected] | ||
|
||
ARG APP_ROOT=/app/robles | ||
ARG BUILD_PACKAGES="build-base git" | ||
|
@@ -41,3 +37,52 @@ RUN bundle install --jobs 20 --retry 5 | |
|
||
# Copy the main application. | ||
COPY . ./ | ||
|
||
# Remove extra files | ||
RUN rm -rf /usr/local/bundle/cache/* | ||
|
||
|
||
############################## | ||
# PACKAGE STAGE # | ||
############################## | ||
FROM ruby:3.2-alpine | ||
LABEL [email protected] | ||
LABEL com.github.actions.name="robles" | ||
LABEL com.github.actions.author="Kodeco <[email protected]>" | ||
LABEL com.github.actions.description="Content publication for kodeco.com" | ||
LABEL com.github.actions.color="purple" | ||
LABEL com.github.actions.icon="book" | ||
|
||
ARG APP_ROOT=/app/robles | ||
ARG RUBY_ENV=${RUBY_ENV:-production} | ||
|
||
ENV RUBY_ENV=${RUBY_ENV} | ||
|
||
ARG RUNTIME_PACKAGES="imagemagick git tzdata" | ||
ARG TEST_AND_DEV_PACKAGES="bash build-base libsodium-dev" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe we don't need There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wasn't sure whether it might also need header files or something else that might be part of the package when building a new version of the gem? Since this was only for test and development I thought it could probably stay in. |
||
|
||
# SYSLOG TO STDOUT | ||
RUN \ | ||
touch /var/log/syslog && \ | ||
ln -sf /proc/1/fd/1 /var/log/syslog | ||
|
||
# libsodium | ||
COPY --from=builder /usr/lib/libsodium.so* /usr/lib/ | ||
# Copy the app from builder | ||
COPY --from=builder $APP_ROOT $APP_ROOT | ||
COPY --from=builder /usr/local/bundle /usr/local/bundle | ||
|
||
# Set the working directory | ||
WORKDIR $APP_ROOT | ||
|
||
# For runtime | ||
RUN apk update \ | ||
&& apk upgrade \ | ||
&& apk add --update --no-cache $RUNTIME_PACKAGES \ | ||
&& rm -rf /var/cache/apk/* | ||
|
||
# Test and dev packages | ||
RUN if [ "$RUBY_ENV" == "test" -o "$RUBY_ENV" == "development" ]; then \ | ||
apk add --update --no-cache $TEST_AND_DEV_PACKAGES \ | ||
&& rm -rf /var/cache/apk/*; \ | ||
fi |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,20 +55,6 @@ def slides | |
snapshotter.generate | ||
end | ||
|
||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this works? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it should work... |
||
desc 'serve', 'starts local preview server' | ||
option :dev, type: :boolean, desc: 'Run in development mode (watch robles files, not module files)' | ||
def serve | ||
fork do | ||
if options[:dev] | ||
Guard.start(no_interactions: true) | ||
else | ||
Guard.start(guardfile_contents: content_module_guardfile, watchdir: './', no_interactions: true) | ||
end | ||
end | ||
RoblesContentModuleServer.run! | ||
end | ||
|
||
desc 'secrets [REPO]', 'configures a module repo with the necessary secrets' | ||
long_desc <<-LONGDESC | ||
`robles module secrets [REPO]` will upload the secrets requires to run robles on a | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be better to keep it at 3.2 to be consistent with Dockerfile