Skip to content

Commit

Permalink
Merge pull request #4259 from fjordllc/main
Browse files Browse the repository at this point in the history
Release 2022-03-03 04:22:53
  • Loading branch information
komagata authored Mar 3, 2022
2 parents fb1603e + 1e0547f commit b99fb2e
Show file tree
Hide file tree
Showing 95 changed files with 885 additions and 242 deletions.
File renamed without changes.
File renamed without changes.
148 changes: 148 additions & 0 deletions .cloudbuild/cloudbuild-staging.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
steps:
- name: gcr.io/cloud-builders/docker
args:
- '-c'
- 'docker pull asia.gcr.io/$PROJECT_ID/$REPO_NAME:latest || exit 0'
id: Fetch
entrypoint: bash
- name: gcr.io/cloud-builders/docker
args:
- build
- '-t'
- 'asia.gcr.io/$PROJECT_ID/$REPO_NAME:$COMMIT_SHA'
- '-t'
- 'asia.gcr.io/$PROJECT_ID/$REPO_NAME:latest'
- '--cache-from'
- 'asia.gcr.io/$PROJECT_ID/$REPO_NAME:latest'
- .
- '-f'
- Dockerfile
id: Build
- name: gcr.io/cloud-builders/docker
args:
- push
- 'asia.gcr.io/$PROJECT_ID/$REPO_NAME:$COMMIT_SHA'
id: Push
- name: 'gcr.io/cloudsql-docker/gce-proxy:1.16'
args:
- /cloud_sql_proxy
- '-dir=/cloudsql'
- '-instances=$_CLOUD_SQL_HOST'
id: SqlProxy
waitFor:
- '-'
volumes:
- name: db
path: /cloudsql
- name: 'asia.gcr.io/$PROJECT_ID/$REPO_NAME:$COMMIT_SHA'
env:
- RAILS_ENV=production
- DISABLE_DATABASE_ENVIRONMENT_CHECK=1
- DB_HOST=/cloudsql/$_CLOUD_SQL_HOST
- DB_NAME=$_DB_NAME
- DB_PASS=$_DB_PASS
- DB_USER=$_DB_USER
- RAILS_MASTER_KEY=$_RAILS_MASTER_KEY
args:
- bin/rails
- 'db:reset'
id: DB_Migrate
waitFor:
- Push
volumes:
- name: db
path: /cloudsql
- name: gcr.io/cloud-builders/docker
args:
- '-c'
- docker kill -s TERM $(docker ps -q --filter "volume=db")
id: Kill_SqlProxy
waitFor:
- DB_Migrate
entrypoint: sh
- name: gcr.io/google.com/cloudsdktool/cloud-sdk
args:
- run
- deploy
- $_SERVICE_NAME
- '--platform=managed'
- '--region=asia-northeast1'
- '--quiet'
- '--image=asia.gcr.io/$PROJECT_ID/$REPO_NAME:$COMMIT_SHA'
- '--allow-unauthenticated'
- '--clear-vpc-connector'
- '--add-cloudsql-instances'
- $_CLOUD_SQL_HOST
- '--memory'
- $_MEMORY
- '--set-env-vars=LANG=ja_JP.UTF-8'
- '--set-env-vars=TZ=Asia/Tokyo'
- '--set-env-vars=RAILS_SERVE_STATIC_FILES=true'
- '--set-env-vars=RAILS_LOG_TO_STDOUT=true'
- '--set-env-vars=RAILS_ENV=production'
- '--set-env-vars=RACK_ENV=production'
- '--set-env-vars=APP_HOST_NAME=$_APP_HOST_NAME'
- '--set-env-vars=CLOUD_RUN_HOST_NAME=$_CLOUD_RUN_HOST_NAME'
- '--set-env-vars=RAILS_MASTER_KEY=$_RAILS_MASTER_KEY'
- '--set-env-vars=DB_NAME=$_DB_NAME'
- '--set-env-vars=DB_USER=$_DB_USER'
- '--set-env-vars=DB_PASS=$_DB_PASS'
- '--set-env-vars=DB_HOST=/cloudsql/$_CLOUD_SQL_HOST'
- '--set-env-vars=GOOGLE_CREDENTIALS=$_GOOGLE_CREDENTIALS'
- '--set-env-vars=GCS_BUCKET=$_GCS_BUCKET'
- '--set-env-vars=REDIS_URL=$_REDIS_URL'
- '--set-env-vars=TOKEN=$_TOKEN'
- '--set-env-vars=DISCORD_NOTICE_WEBHOOK_URL=$_DISCORD_NOTICE_WEBHOOK_URL'
- '--set-env-vars=DISCORD_ALL_WEBHOOK_URL=$_DISCORD_ALL_WEBHOOK_URL'
- '--set-env-vars=DISCORD_ADMIN_WEBHOOK_URL=$_DISCORD_ADMIN_WEBHOOK_URL'
- '--set-env-vars=DISCORD_BUG_WEBHOOK_URL=$_DISCORD_BUG_WEBHOOK_URL'
- '--set-env-vars=BASIC_AUTH_USER=$_BASIC_AUTH_USER'
- '--set-env-vars=BASIC_AUTH_PASSWORD=$_BASIC_AUTH_PASSWORD'
- '--set-env-vars=ROLLBAR_CLIENT_TOKEN=$_ROLLBAR_CLIENT_TOKEN'
- '--set-env-vars=APPSIGNAL_PUSH_API_KEY=$_APPSIGNAL_PUSH_API_KEY'
- '--set-env-vars=$_ENVS'
- >-
--labels=managed-by=gcp-cloud-build-deploy-cloud-run,commit-sha=$COMMIT_SHA,gcb-build-id=$BUILD_ID,gcb-trigger-id=$_TRIGGER_ID,$_LABELS
id: Deploy
entrypoint: gcloud
- name: 'asia.gcr.io/$PROJECT_ID/$REPO_NAME:latest'
env:
- DB_NAME=$_DB_NAME
- DEPLOY_NOTIFY_WEBHOOK_URL=$_DEPLOY_NOTIFY_WEBHOOK_URL
args:
- bin/notify
id: Notify
waitFor:
- Deploy
timeout: 7200s
images:
- 'asia.gcr.io/$PROJECT_ID/$REPO_NAME:latest'
options:
substitutionOption: ALLOW_LOOSE
substitutions:
_BASIC_AUTH_USER: _
_BASIC_AUTH_PASSWORD: _
_DISCORD_ALL_WEBHOOK_URL: _
_REDIS_URL: _
_TRIGGER_ID: _
_DB_NAME: _
_APPSIGNAL_PUSH_API_KEY: _
_GCS_BUCKET: _
_MEMORY: 2GB
_DB_PASS: _
_CLOUD_SQL_HOST: _
_GOOGLE_CREDENTIALS: _
_APP_HOST_NAME: _
_RAILS_MASTER_KEY: _
_DB_USER: _
_ROLLBAR_CLIENT_TOKEN: _
_ENVS: _
_SERVICE_NAME: _
_DISCORD_NOTICE_WEBHOOK_URL: _
_CLOUD_RUN_HOST_NAME: _
_LABELS: _
_TOKEN: _
tags:
- gcp-cloud-build-deploy-cloud-run
- gcp-cloud-build-deploy-cloud-run-managed
- bootcamp
File renamed without changes.
2 changes: 2 additions & 0 deletions cloudbuild.yaml → .cloudbuild/cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ steps:
- '$_CLOUD_SQL_HOST'
- '--memory'
- '$_MEMORY'
- '--timeout'
- '10m'
- '--set-env-vars=LANG=ja_JP.UTF-8'
- '--set-env-vars=TZ=Asia/Tokyo'
- '--set-env-vars=RAILS_SERVE_STATIC_FILES=true'
Expand Down
1 change: 1 addition & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Metrics/ClassLength:
- app/models/practice.rb
- app/models/user.rb
- app/models/product.rb
- app/models/report.rb

AllCops:
Exclude:
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '3.1.0'

gem 'bootsnap', '>= 1.4.4', require: false
gem 'image_processing', '~> 1.2'
gem 'image_processing', '~> 1.12'
gem 'jbuilder', '~> 2.7'
gem 'puma', '~> 5.6'
gem 'rails', '~> 6.1.4.4'
Expand Down
12 changes: 6 additions & 6 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ GEM
httpclient (2.8.3)
i18n (1.10.0)
concurrent-ruby (~> 1.0)
image_processing (1.12.1)
image_processing (1.12.2)
mini_magick (>= 4.9.5, < 5)
ruby-vips (>= 2.0.17, < 3)
io-wait (0.2.1)
Expand Down Expand Up @@ -254,7 +254,7 @@ GEM
method_source (1.0.0)
mini_magick (4.11.0)
mini_mime (1.1.2)
mini_portile2 (2.7.1)
mini_portile2 (2.8.0)
minitest (5.15.0)
minitest-retry (0.2.2)
minitest (>= 5.0)
Expand All @@ -278,10 +278,10 @@ GEM
net-protocol
timeout
nio4r (2.5.8)
nokogiri (1.13.1)
mini_portile2 (~> 2.7.0)
nokogiri (1.13.3)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
nokogiri (1.13.1-x86_64-darwin)
nokogiri (1.13.3-x86_64-darwin)
racc (~> 1.4)
oauth (0.5.8)
oauth2 (1.4.7)
Expand Down Expand Up @@ -542,7 +542,7 @@ DEPENDENCIES
discord-notifier
google-cloud-storage (~> 1.25)
holiday_jp
image_processing (~> 1.2)
image_processing (~> 1.12)
jbuilder (~> 2.7)
jp_prefecture
jquery-rails
Expand Down
Binary file added app/assets/images/mentors/cafedomancer.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 0 additions & 4 deletions app/assets/stylesheets/atoms/_a-meta.sass
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@
content: ""
&::after
content: ""
+media-breakpoint-down(sm)
.thread-header__user-icon-link,
.thread-list-item-meta__icon-link
display: none

a.a-meta
+hover-link
Expand Down
25 changes: 13 additions & 12 deletions app/assets/stylesheets/blocks/card/_card-main-actions.sass
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,37 @@
margin-top: 1rem

.card-main-actions__items
display: flex
gap: .75rem
+media-breakpoint-up(md)
+margin(horizontal, -.375rem)
margin-bottom: -.625rem
display: flex
+position(relative)
justify-content: center
flex-wrap: wrap
align-items: flex-end
min-height: 1.875rem
+media-breakpoint-down(sm)
flex-direction: column
&.is-sub-actions
justify-content: flex-end
+media-breakpoint-down(sm)
flex-direction: row
.card-main-actions__item.is-sub
position: static
flex: 0 0 auto

.card-main-actions__item
margin-bottom: .625rem
+media-breakpoint-up(md)
+padding(horizontal, .375rem)
flex: 0 0 16rem
max-width: 50%
max-width: calc(50% - .375rem)
&.is-sub
+position(absolute, right 0, bottom 0)
+media-breakpoint-down(sm)
flex-basis: 100%
max-width: 100%
&.is-sub
text-align: right
&.is-end
margin-left: auto
flex-basis: 2.5rem
+media-breakpoint-down(sm)
margin-bottom: 0

.card-main-actions__delete
.card-main-actions__muted-action
+hover-link-reversal
+text-block(.875rem 1.4, $muted-text)
&:hover
Expand Down
6 changes: 3 additions & 3 deletions app/assets/stylesheets/blocks/course/_courses.sass
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
.courses-item
padding-bottom: 1.25rem
height: 100%

.courses-item__inner
height: 100%

.courses-item__header
padding: 1.25rem 1.25rem 0
padding: .75rem 1.25rem 0

.courses-item__title
+text-block(1.125rem 1.4)
Expand All @@ -32,6 +31,7 @@
.courses-item__title-label
color: $main-text
transition: all .2s ease-out
font-weight: 700
.is-closed &
color: $muted-text
.is-closed .courses-item__title-link:hover &,
Expand All @@ -40,6 +40,6 @@
color: $main-text

.courses-item__description
padding: .5rem 1.25rem 1.25rem
padding: .5rem 1.25rem .75rem
p
+text-block(.8125rem 1.6)
2 changes: 1 addition & 1 deletion app/assets/stylesheets/blocks/tags/_random-tags.sass
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
border-radius: 1em

.random-tags__item-name
+text-block(.875rem 1.4, #bcb4e8)
+text-block(.875rem 1.4, $semi-muted-text)
.is-first &,
.is-second &,
.is-third &
Expand Down
2 changes: 2 additions & 0 deletions app/assets/stylesheets/blocks/thread/_thread-header.sass
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
padding: 1rem 2rem .75rem
+media-breakpoint-down(sm)
padding: 2.25rem .75rem .5rem
&.has-no-icon
+padding(vertical, .75rem)
.a-count-badge
+position(absolute, right .5rem, top .5rem)

Expand Down
27 changes: 27 additions & 0 deletions app/assets/stylesheets/blocks/thread/_thread-members.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.thread-members__title
+text-block(.8125rem 1.4)

.thread-members__items
display: flex
gap: .75rem
+media-breakpoint-up(md)
margin-top: .75rem
+media-breakpoint-down(sm)
margin-top: .5rem

.thread-members__item
+media-breakpoint-up(md)
font-size: .875rem
+media-breakpoint-down(sm)
font-size: .75rem
.a-user-name
+text-block(1em 1.4, $default-text)

.thread-members__user-icon-link
margin-right: .25em

.thread-members__user-icon
+media-breakpoint-up(md)
+size(1.5rem)
+media-breakpoint-down(sm)
+size(1rem)
20 changes: 17 additions & 3 deletions app/assets/stylesheets/completion/_completion-base.sass
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
$completion: #00a0dd

html
font-family: $basic-serif

body.is-completion
background-color: $completion

Expand Down Expand Up @@ -28,15 +31,22 @@ body.is-completion
+padding(vertical, 4rem 2rem)

.complestion__title
+text-block(2rem 1.5, 800 center $reversal-text)
+text-block(1em 1.5, 800 center $reversal-text)
font-family: YakuHanJP_Narrow,Hiragino Sans,Hiragino Kaku Gothic ProN,BIZ UDPGothic,Meiryo,sans-serif
+media-breakpoint-up(md)
font-size: 2rem
+media-breakpoint-down(sm)
font-size: 1.5rem

.complestion__body
margin-top: 3rem

.complestion__image
border-radius: 1rem
border: solid .75rem shade($completion, 30%)
+media-breakpoint-up(md)
border: solid .75rem shade($completion, 30%)
+media-breakpoint-down(sm)
border: solid .5rem shade($completion, 30%)

.welcome-footer
+media-breakpoint-up(md)
Expand Down Expand Up @@ -74,7 +84,11 @@ body.is-completion
justify-content: center
align-items: center
+text-block(.875rem 1.45, flex $reversal-text)
gap: .25rem

.welcome-footer-copyright__author
display: block
+margin(horizontal, .1em .5em)

.welcome-footer-copyright__author-link
+hover-link
color: $reversal-text
Loading

0 comments on commit b99fb2e

Please sign in to comment.