-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54 from plone/fixrelease
Fix release I
- Loading branch information
Showing
14 changed files
with
210 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,8 +38,11 @@ jobs: | |
- name: Checkout codebase | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install packages | ||
run: make install | ||
|
||
- name: Run Prettier | ||
run: npx [email protected] --single-quote --check 'src/**/*.{js,jsx,ts,tsx,css,scss}' --config=package.json | ||
run: yarn run prettier | ||
|
||
i18n: | ||
name: i18n sync | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,13 +7,37 @@ on: | |
- 'frontend/**' | ||
|
||
env: | ||
node-version: 18.x | ||
node-version: 20.x | ||
|
||
defaults: | ||
run: | ||
working-directory: ./frontend | ||
|
||
jobs: | ||
meta: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
TAG: ${{ steps.vars.outputs.TAG }} | ||
VOLTO_VERSION: ${{ steps.vars.outputs.VOLTO_VERSION }} | ||
PLONE_VERSION: ${{ steps.vars.outputs.PLONE_VERSION }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set Env Vars | ||
working-directory: "." | ||
id: vars | ||
run: | | ||
echo "TAG=$(cat version.txt)" >> $GITHUB_OUTPUT | ||
python3 -c 'import json; data = json.load(open("frontend/package.json")); print("VOLTO_VERSION=" + data["dependencies"]["@plone/volto"])' >> $GITHUB_OUTPUT | ||
echo "PLONE_VERSION=$(cat backend/version.txt)" >> $GITHUB_OUTPUT | ||
- name: Test vars | ||
working-directory: "." | ||
run: | | ||
echo "TAG=${{ steps.vars.outputs.TAG }}" | ||
echo "VOLTO_VERSION=${{ steps.vars.outputs.VOLTO_VERSION }}" | ||
echo "PLONE_VERSION=${{ steps.vars.outputs.PLONE_VERSION }}" | ||
eslint: | ||
if: github.ref_type == 'branch' | ||
runs-on: ubuntu-latest | ||
|
@@ -41,8 +65,11 @@ jobs: | |
- name: Checkout codebase | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install packages | ||
run: make install | ||
|
||
- name: Run Prettier | ||
run: npx [email protected] --single-quote --check 'src/**/*.{js,jsx,ts,tsx,css,scss}' --config=package.json | ||
run: yarn run prettier | ||
|
||
i18n: | ||
if: github.ref_type == 'branch' | ||
|
@@ -88,7 +115,7 @@ jobs: | |
release: | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
runs-on: ubuntu-latest | ||
needs: [eslint, prettier, i18n, unit] | ||
needs: [meta, eslint, prettier, i18n, unit] | ||
|
||
steps: | ||
- name: Checkout | ||
|
@@ -123,6 +150,8 @@ jobs: | |
platforms: linux/amd64 | ||
context: frontend/ | ||
file: frontend/Dockerfile | ||
build-args: | | ||
VOLTO_VERSION=${{ needs.meta.outputs.VOLTO_VERSION }} | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: $${{ steps.meta.outputs.labels }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,34 @@ | ||
# syntax=docker/dockerfile:1 | ||
ARG PLONE_VERSION=6.0.10.1 | ||
FROM plone/plone-backend:${PLONE_VERSION} | ||
ARG PLONE_VERSION | ||
FROM plone/server-builder:${PLONE_VERSION:-6} as builder | ||
|
||
LABEL maintainer="Simples Consultoria <[email protected]>" \ | ||
org.label-schema.name="plone.de-backend" \ | ||
org.label-schema.description="Simples Consultoria backend image." \ | ||
org.label-schema.vendor="Simples Consultoria" | ||
WORKDIR /app | ||
|
||
# Add local code | ||
COPY . . | ||
|
||
# Install local requirements and fix permissions | ||
# Install local requirements and pre-compile mo files | ||
RUN <<EOT | ||
./bin/pip install mxdev | ||
set -e | ||
bin/pip install mxdev | ||
mv requirements-docker.txt requirements.txt | ||
./bin/mxdev -c mx.ini | ||
./bin/pip install -r requirements-mxdev.txt | ||
chown -R plone: /app | ||
bin/mxdev -c mx.ini | ||
bin/pip install -r requirements-mxdev.txt | ||
bin/python /compile_mo.py | ||
rm -Rf src/ | ||
EOT | ||
|
||
FROM plone/server-prod-config:${PLONE_VERSION:-6} | ||
|
||
LABEL maintainer="kitconcept GmbH <[email protected]>" \ | ||
org.label-schema.name="kitconcept.com-backend" \ | ||
org.label-schema.description="kitconcept website backend image." \ | ||
org.label-schema.vendor="kitconcept GmbH" | ||
|
||
# Copy /app from builder | ||
COPY --from=builder /app /app | ||
|
||
RUN <<EOT | ||
set -e | ||
ln -s /data /app/var | ||
EOT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
> 1% | ||
last 4 versions | ||
Firefox ESR | ||
not ie 11 | ||
not dead |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"trailingComma": "all", | ||
"singleQuote": true, | ||
"overrides": [ | ||
{ | ||
"files": "*.overrides", | ||
"options": { | ||
"parser": "less" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"extends": ["stylelint-config-idiomatic-order"], | ||
"plugins": ["stylelint-prettier"], | ||
"overrides": [ | ||
{ | ||
"files": ["**/*.less"], | ||
"customSyntax": "postcss-less" | ||
}, | ||
{ | ||
"files": ["**/*.overrides"], | ||
"customSyntax": "postcss-less" | ||
}, | ||
{ | ||
"files": ["**/*.scss"], | ||
"customSyntax": "postcss-scss" | ||
} | ||
], | ||
"rules": { | ||
"prettier/prettier": true, | ||
"order/properties-alphabetical-order": null | ||
}, | ||
"ignoreFiles": "theme/themes/default/**/*.overrides" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,20 @@ | ||
FROM node:16-slim as base | ||
FROM base as builder | ||
# syntax=docker/dockerfile:1 | ||
ARG VOLTO_VERSION | ||
FROM plone/frontend-builder:${VOLTO_VERSION} as builder | ||
|
||
RUN apt-get update \ | ||
&& buildDeps="python3 build-essential git ca-certificates" \ | ||
&& apt-get install -y --no-install-recommends $buildDeps \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
COPY --chown=node . /app/ | ||
|
||
COPY --chown=node .yarnrc.yml Makefile package.json mrs.developer.json jsconfig.json yarn.lock /build/ | ||
COPY --chown=node .yarn /build/.yarn | ||
RUN corepack enable | ||
USER node | ||
WORKDIR /build | ||
RUN <<EOT | ||
make install | ||
yarn build | ||
rm -rf cache omelette .yarn/cache | ||
EOT | ||
|
||
RUN mkdir -p src/addons && make install | ||
FROM plone/frontend-prod-config:${VOLTO_VERSION} | ||
|
||
COPY --chown=node . /build/ | ||
RUN yarn build | ||
LABEL maintainer="kitconcept GmbH <[email protected]>" \ | ||
org.label-schema.name="kitconcept.com-frontend" \ | ||
org.label-schema.description="kitconcept website frontend image." \ | ||
org.label-schema.vendor="kitconcept GmbH" | ||
|
||
|
||
FROM base | ||
|
||
LABEL maintainer="Jonas Piterek <[email protected]>" \ | ||
org.label-schema.name="plonede-frontend" \ | ||
org.label-schema.description="Plonede frontend image." \ | ||
org.label-schema.vendor="Jonas Piterek" | ||
|
||
RUN apt-get update \ | ||
&& buildDeps="busybox" \ | ||
&& apt-get install -y --no-install-recommends $buildDeps \ | ||
&& busybox --install -s \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
USER node | ||
COPY --from=builder /build/ /app/ | ||
|
||
WORKDIR /app | ||
EXPOSE 3000 | ||
CMD ["yarn", "start:prod"] | ||
COPY --from=builder /app/ /app/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.