Skip to content

Commit

Permalink
Merge branch 'release' into lagoon-waku
Browse files Browse the repository at this point in the history
  • Loading branch information
pmelab committed Jan 28, 2025
2 parents eb3af2e + e69675a commit 93a34d8
Show file tree
Hide file tree
Showing 141 changed files with 5,787 additions and 4,159 deletions.
24 changes: 15 additions & 9 deletions .github/workflows/fe_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,6 @@ jobs:
server-token: 'local'
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Prepare
run: SKIP_DRUPAL_INSTALL=1 pnpm turbo:prep
env:
TURBO_API: 'http://127.0.0.1:9080'
TURBO_TOKEN: 'local'
TURBO_TEAM: 'local'

- name: Publisher
uses: AmazeeLabs/publisher-action@4371b4a90a9fe2c86248e76c0f428e39abf6b610
with:
Expand All @@ -50,6 +43,13 @@ jobs:
apps/website/public
cache_key: 'fe-build-${{ inputs.env }}'

- name: Prepare
run: SKIP_DRUPAL_INSTALL=1 pnpm turbo:prep
env:
TURBO_API: 'http://127.0.0.1:9080'
TURBO_TOKEN: 'local'
TURBO_TEAM: 'local'

- name: Build & deploy
run: |
set -ex
Expand All @@ -68,10 +68,16 @@ jobs:
pnpm build:gatsby
fi
# "netlify deploy" fails to locate edge functions when executed from a
# monorepo. Flags like --cwd or --filter do not help. So we deploy the
# website app to a dedicated folder first.
pnpm deploy --filter "@custom/website" /tmp/deploy --prod
cd /tmp/deploy
# Deploy
pnpm netlify env:set AWS_LAMBDA_JS_RUNTIME nodejs18.x
pnpm netlify env:set AWS_LAMBDA_JS_RUNTIME nodejs20.x
pnpm netlify env:set DRUPAL_EXTERNAL_URL $DRUPAL_EXTERNAL_URL
pnpm netlify deploy --cwd=. --dir=apps/website/public --prodIfUnlocked
pnpm netlify deploy --prodIfUnlocked
# Report success to Publisher
echo "BUILD_IS_SUCCESSFUL=1" >> $GITHUB_ENV
Expand Down
34 changes: 26 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,22 @@ jobs:
DASHBOARD_ACCESS_TOKEN: ${{ secrets.DASHBOARD_ACCESS_TOKEN }}
run: amazeelabs-estimator update

init_script:
name: Init script
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup
uses: ./.github/actions/setup
- name: Test init script
run:
pnpm --filter @custom/init run init --project-human-name "Foo Bar"
--project-machine-name foo_bar | grep 'Run `pnpm i` to update the lock
file'

docker_build:
name: Docker Build
if:
Expand All @@ -143,22 +159,24 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2
bundler-cache: true
- name: Install Pygmy
run: gem install pygmy
run: |
set -ex
git clone https://github.com/pygmystack/pygmy.git
cd pygmy
make build
ls -lisa ./builds
cp ./builds/pygmy-linux-amd64 /usr/local/bin/pygmy
chmod +x /usr/local/bin/pygmy
- name: Start Pygmy
run: pygmy up
- name: Docker Build & Up
run: DOCKER_BUILDKIT=1 docker-compose up -d --build
run: DOCKER_BUILDKIT=1 docker compose up -d --build
- name: Wait a bit
run: sleep 5
- name: Check containers status
run: |
if docker-compose ps | grep Exit
if docker compose ps | grep Exit
then
echo "Docker container(s) exited"
exit 1
Expand Down
2 changes: 1 addition & 1 deletion .gitpod.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM gitpod/workspace-full

RUN bash -c 'VERSION="18.19.0" \
RUN bash -c 'VERSION="20.18.1" \
&& source $HOME/.nvm/nvm.sh && nvm install $VERSION \
&& nvm use $VERSION && nvm alias default $VERSION'

Expand Down
17 changes: 17 additions & 0 deletions .idea/runConfigurations/preview__dev.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions .lagoon/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ====================================================================================================
# BUILDER IMAGE
# ====================================================================================================
FROM uselagoon/node-18-builder as node
FROM uselagoon/node-20-builder as node
FROM uselagoon/php-8.3-cli-drupal as builder

COPY --from=node /usr/local/lib/node_modules /usr/local/lib/node_modules
Expand Down Expand Up @@ -100,7 +100,7 @@ ENV WEBROOT=web
# PREVIEW IMAGE
# ====================================================================================================

FROM uselagoon/node-18 as preview
FROM uselagoon/node-20 as preview

RUN npm install -g [email protected]
COPY --from=builder /tmp/.deploy/preview /app
Expand All @@ -110,12 +110,17 @@ CMD pnpm start
# PUBLISHER IMAGE
# ====================================================================================================

FROM uselagoon/node-18 as publisher
FROM uselagoon/node-20 as publisher

RUN apk add --no-cache sqlite curl github-cli

RUN npm install -g [email protected]

COPY --from=builder /tmp/.deploy/publisher /app

# Decap config.
ENV VITE_DECAP_REPO='AmazeeLabs/silverback-template'
ARG LAGOON_GIT_BRANCH
ENV VITE_DECAP_BRANCH="$LAGOON_GIT_BRANCH"

CMD pnpm publisher
204 changes: 0 additions & 204 deletions INIT.md

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Minimum steps
- Disable `Allow merge commits`
- Enable `Automatically delete head branches`
- Clone the newly create repo
- Run `pnpx @amazeelabs/mzx run INIT.md` from the project root
- Run `pnpm i && pnpm --filter @custom/init run init` from the project root
- Answer its questions
- Review the changes in the repo
- Commit and push
Expand Down
Loading

0 comments on commit 93a34d8

Please sign in to comment.