Skip to content

Commit

Permalink
Merge branch 'main' into plone606
Browse files Browse the repository at this point in the history
  • Loading branch information
mamico authored Nov 17, 2023
2 parents f4b3bc1 + 415be9b commit 12fbf38
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 3 deletions.
52 changes: 51 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,15 @@ jobs:
IMAGE_ID=$(echo ghcr.io/${{ github.repository }} | tr '[A-Z]' '[a-z]')
echo ::set-output name=IMAGE_ID::$IMAGE_ID
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch

- name: Get the version
id: get_version
run: |
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
VERSION="${{ steps.extract_branch.outputs.branch }}"
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
[ "$VERSION" == "main" ] && VERSION=latest
echo ::set-output name=VERSION::$VERSION
Expand Down Expand Up @@ -78,3 +83,48 @@ jobs:
--form ref=main \
--form "variables[GITHUB_TAG]=${{ steps.get_version.outputs.VERSION }}" \
"https://gitlab.com/api/v4/projects/${{ secrets.PROJECT_ID }}/trigger/pipeline"
build-acceptance-image:
name: Build docker image for acceptance tests
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2

- name: Login to Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Get the image id
id: get_image_id
run: |
IMAGE_ID=$(echo ghcr.io/${{ github.repository }}-acceptance | tr '[A-Z]' '[a-z]')
echo ::set-output name=IMAGE_ID::$IMAGE_ID
- name: Get the version
id: get_version
run: |
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
[ "$VERSION" == "main" ] && VERSION=latest
echo ::set-output name=VERSION::$VERSION
- name: Build and push container image
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile.acceptance
push: true
tags: ${{ steps.get_image_id.outputs.IMAGE_ID }}:${{ steps.get_version.outputs.VERSION }}
platforms: linux/amd64,linux/arm64
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ pyvenv.cfg
/var
/src/*
Pipfile*
.python-version
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@

- Upgrade Plone 6.0.4 -> 6.0.8 [mamico]

- design.plone.contenttypes 6.0.21 -> 6.1.0 [mamico]
- Optionally add image_scales and image_field in Summary serializer. [mamico]
- Add @@design-utils view that shows all available utility views. [cekk]
- Add user action that points to @@design-utils view. [cekk]
- Add @@export-incarichi view that allows to download a csv file with all - Persona and their roles. [cekk]
- Add tipologia_bando to summary serializer. [cekk]

- redturtle.volto 5.3.0 -> 5.4.0 [cekk]
- Return error instead of raise Excpetion for BadRequest in querystringsearch [mamico]
- Add upgrade step and setuphandler to fix robots.txt original rules adding 'Allow: /?expand' [lucabel]

## 20231030-02

- design.plone.contenttypes 6.0.20 -> 6.0.21 [cekk]
Expand Down
10 changes: 10 additions & 0 deletions Dockerfile.acceptance
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM plone/server-acceptance:6.0.4
COPY docker/create-constraints.py docker/*.cfg docker/*.txt /app/
COPY versions.cfg /
RUN pip install -r https://dist.plone.org/release/6.0.4/requirements.txt ${PIP_PARAMS} && \
python create-constraints.py constraints.cfg constraints.txt && \
./bin/pip install --ignore-requires-python -r requirements-acceptance.txt -c constraints.txt ${PIP_PARAMS} && \
find /app/lib -name LC_MESSAGES -exec chown -R plone:plone {} \;

# Run DESIGN_PLONE_POLICY_ACCEPTANCE_TESTING by default
CMD ["design.plone.policy.testing.DESIGN_PLONE_POLICY_ACCEPTANCE_TESTING"]
3 changes: 3 additions & 0 deletions docker/requirements-acceptance.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Plone
design.plone.policy[test]
collective.MockMailHost
4 changes: 2 additions & 2 deletions versions.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ collective.volto.socialsettings = 0.2.1
collective.volto.subfooter = 1.1.0
collective.volto.subsites = 1.4.0
collective.z3cform.datagridfield = 3.0.1
design.plone.contenttypes = 6.0.21
design.plone.contenttypes = 6.1.0
design.plone.policy = 5.0.6
eea.api.taxonomy = 1.5
et-xmlfile = 1.1.0
Expand All @@ -58,7 +58,7 @@ redturtle.bandi = 1.4.3
redturtle.faq = 1.0.1
redturtle.filesretriever = 1.0.0
redturtle.rssservice = 2.2.0
redturtle.volto = 5.3.0
redturtle.volto = 5.4.0
redturtle.voltoplugin.editablefooter = 1.1.2
rer.customersatisfaction = 2.0.0
sentry-sdk = 1.12.1
Expand Down

0 comments on commit 12fbf38

Please sign in to comment.