Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/release/v2.5.23' into release/v2.5
Browse files Browse the repository at this point in the history
# Conflicts:
#	composer.json
#	composer.lock
#	yarn.lock
  • Loading branch information
adriendupuis committed Aug 31, 2021
2 parents b38fdfb + 714d2f9 commit 72c3f03
Show file tree
Hide file tree
Showing 9 changed files with 2,486 additions and 1,876 deletions.
2 changes: 1 addition & 1 deletion .env.dist
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ DATABASE_NAME=ezp
PHP_IMAGE=ezsystems/php:7.3-v2-node10
NGINX_IMAGE=nginx:stable
MYSQL_IMAGE=healthcheck/mariadb
SELENIUM_IMAGE=selenium/standalone-chrome-debug:3.141.59-20200326
SELENIUM_IMAGE=selenium/standalone-chrome-debug:3.141.59-20210422
REDIS_IMAGE=healthcheck/redis

APP_DOCKER_FILE=doc/docker/Dockerfile-app
Expand Down
142 changes: 142 additions & 0 deletions .github/workflows/release_tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
name: Create Release for tag

on:
push:
tags:
- 'v*'
- '!v*-alpha*'

jobs:
provide_changed_packages:
# see json juggling: https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#example-6
# see https://stackoverflow.com/a/62953566/1348344
runs-on: ubuntu-latest

steps:
- name: Set Environment
run: |
echo "BUILD_TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- uses: actions/checkout@v2

# load current composer.lock
- id: currentLock
name: Gather latest package information
run: |
OUT=$(jq --slurp '[.[].packages[] | select(.name | contains("ezsystems") or contains("ibexa")) | [.name, .version] | { name: (.[0]), version: .[1] }]' composer.lock)
echo "::set-output name=lock::$( echo "$OUT" | sed ':a;N;$!ba;s/\n/%0A/g' )"
- name: Get previous release tag based on type
id: prevrelease
uses: ibexa/version-logic-action@master
with:
currentTag: ${{ env.BUILD_TAG }}

# checkout previous tag
- uses: actions/checkout@v2
with:
ref: ${{ steps.prevrelease.outputs.previousTag }}

# load previous composer.lock
- id: previousLock
name: Gather previous package information
run: |
OUT=$(jq --slurp '[.[].packages[] | select(.name | contains("ezsystems") or contains("ibexa")) | [.name, .version] | { name: (.[0]), version: .[1] }]' composer.lock)
echo "::set-output name=lock::$( echo "$OUT" | sed ':a;N;$!ba;s/\n/%0A/g' )"
# do some magic comparing those outputs
- id: output_data
name: Do comparison and output JSON with changes
run: |
FILE1=$(mktemp)
FILE2=$(mktemp)
cat > $FILE1 <<'EOF'
${{ steps.previousLock.outputs.lock }}
EOF
cat > $FILE2 <<'EOF'
${{ steps.currentLock.outputs.lock }}
EOF
# Get only changed packages and sort versions in ascending order
# Step 1: Merge composer.json from two versions, grouping by .name
# Step 2: Take .versions key and remove duplicate versions (means this bundle did not change)
# Step 3: Select only those bundles that have more than 1 version in .versions
# Step 4: Sort versions
# Step 5: (outer brackets) Wrap that into JSON list of objects
# Note: zzzz is added as an additional suffix to properly sort out alpha/beta/etc pre-releases (v2.5.1-alphazzzz < v2.5.1zzzz)
OUT=$(jq -s 'flatten | group_by(.name)' $FILE1 $FILE2 | jq -s '[ .[][] | {name: (.[0].name), versions: [ .[0].version, .[1].version ] | unique} | select(.versions | length > 1) ] | .[].versions |= sort_by( . + "zzzz" | [scan("[0-9]+|[a-z]+")] | map(tonumber? // .) )')
echo "::set-output name=matrix::$( echo "$OUT" | sed ':a;N;$!ba;s/\n/%0A/g' )"
# this step is needed, so the output gets to the next defined job
outputs:
matrix: ${{ steps.output_data.outputs.matrix }}

get_package_changelogs:
needs: provide_changed_packages

runs-on: ubuntu-latest

steps:
- name: Set Environment
run: |
echo "BUILD_TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- name: Get previous release tag based on type
id: prevrelease
uses: ibexa/version-logic-action@master
with:
currentTag: ${{ env.BUILD_TAG }}

- name: Checkout Generator
uses: actions/checkout@v2
with:
repository: ibexa/changelog-generator-action
ref: v2

- name: Setup Python environment
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install pygithub & jira
run: |
pip install pygithub jira
- name: Run generator in a loop
id: generator
env:
INPUT_GITHUB_TOKEN: ${{ secrets.TRAVIS_GITHUB_TOKEN }}
INPUT_JIRA_TOKEN: ${{ secrets.JIRA_TOKEN }}
run: |
cat > input.json <<'EOF'
${{ needs.provide_changed_packages.outputs.matrix }}
EOF
export INPUT_BARE=True
echo "${{ github.repository }} ${{ env.BUILD_TAG }} change log" >> generator_output
echo "" >> generator_output
echo "Changes since ${{ steps.prevrelease.outputs.previousTag }}" >> generator_output
echo "" >> generator_output
jq -c '.[]' input.json | while read i; do
export GITHUB_REPOSITORY=$(jq -r '.name' <<< "$i")
export INPUT_PREVIOUSTAG=$(jq -r '.versions[0]' <<< "$i")
export INPUT_CURRENTTAG=$(jq -r '.versions[1]' <<< "$i")
echo -n "## " >> generator_output
python main.py >> generator_output
echo '' >> generator_output
done
echo "::set-output name=output::$( cat generator_output | sed ':a;N;$!ba;s/\n/%0A/g' )"
- name: Create Release
id: create_release
uses: zendesk/action-create-release@v1
with:
tag_name: ${{ env.BUILD_TAG }}
body: |
${{ steps.generator.outputs.output }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Archive markdown
uses: actions/upload-artifact@v2
with:
name: changelogs
path: generator_output
2 changes: 1 addition & 1 deletion .platform/varnish.vcl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// - Varnish xkey vmod (via varnish-modules package, or via Varnish Plus)
// - eZ Platform 2.5LTS or higher with ezplatform-http-cache (this) bundle
//
// Make sure to at least adjust default parameters.yml, defaults there reflect our testing needs with docker.
// WARNING: Not for us with Fastly, see documentation for where to find dedicated Fastly VCL.

// Not applicable on Platform.sh:
//vcl 4.0;
Expand Down
3 changes: 3 additions & 0 deletions app/config/routing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ ezplatform.ee.page_builder:
defaults:
siteaccess_group_whitelist: '%admin_group_name%'

ezplatform.ee.page_builder_preview:
resource: '@EzPlatformPageBuilderBundle/Resources/config/routing_preview.yaml'

ezplatform.ee.form_builder:
resource: '@EzPlatformFormBuilderBundle/Resources/config/routing.yml'
defaults:
Expand Down
14 changes: 13 additions & 1 deletion bin/.travis/trusty/setup_ezplatform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,15 @@ if [[ -n "${DEPENDENCY_PACKAGE_NAME}" ]]; then
cd -

# use local checkout path relative to docker volume
# create the directory for non-container commands to pass
if [ ! -d /var/www/${BASE_PACKAGE_NAME} ]; then
sudo mkdir -p /var/www/${BASE_PACKAGE_NAME}
fi
echo "> Make composer use tested dependency local checkout ${TMP_TRAVIS_BRANCH} of ${BASE_PACKAGE_NAME}"
composer config repositories.localDependency git /var/www/${BASE_PACKAGE_NAME}
REPOSITORY_PROPERTIES=$( jq -n \
--arg basePackageName "/var/www/$BASE_PACKAGE_NAME" \
'{"type": "path", "url": $basePackageName, "options": { "symlink": false }}' )
composer config repositories.localDependency "$REPOSITORY_PROPERTIES"

echo "> Require ${DEPENDENCY_PACKAGE_NAME}:dev-${TMP_TRAVIS_BRANCH} as ${BRANCH_ALIAS}"
if ! composer require --no-update "${DEPENDENCY_PACKAGE_NAME}:dev-${TMP_TRAVIS_BRANCH} as ${BRANCH_ALIAS}"; then
Expand All @@ -81,6 +88,11 @@ if [[ -n "${DEPENDENCY_PACKAGE_NAME}" ]]; then

fi

if [[ -n "${DOCKER_PASSWORD}" ]]; then
echo "> Set up Docker credentials"
echo ${DOCKER_PASSWORD} | docker login -u ${DOCKER_USERNAME} --password-stdin
fi

echo "> Install DB and dependencies"
docker-compose -f doc/docker/install-dependencies.yml up --abort-on-container-exit

Expand Down
5 changes: 5 additions & 0 deletions bin/.travis/trusty/setup_from_external_repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ if [ "$COMPOSE_FILE" = "" ] ; then
exit 1
fi

if [[ -n "${DOCKER_PASSWORD}" ]]; then
echo "> Set up Docker credentials"
echo ${DOCKER_PASSWORD} | docker login -u ${DOCKER_USERNAME} --password-stdin
fi

echo "> Move '$REPO_DIR' to 'tmp_travis_folder'"
mv $REPO_DIR tmp_travis_folder
ls -al tmp_travis_folder
Expand Down
53 changes: 26 additions & 27 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,32 +31,32 @@
"php": "^7.1.3",
"doctrine/doctrine-bundle": "^1.9.1",
"doctrine/orm": "^2.6.3",
"ezsystems/date-based-publisher": "~3.2.6",
"ezsystems/doctrine-dbal-schema": "~0.1.3",
"ezsystems/ez-support-tools": "~1.0.8",
"ezsystems/ezplatform-admin-ui": "~1.5.15",
"ezsystems/ezplatform-admin-ui-assets": "~4.2.1",
"ezsystems/ezplatform-admin-ui-modules": "~1.5.10",
"ezsystems/ezplatform-core": "~1.0.4",
"ezsystems/date-based-publisher": "~3.2.8",
"ezsystems/doctrine-dbal-schema": "~0.1.4",
"ezsystems/ez-support-tools": "~1.0.11",
"ezsystems/ezplatform-admin-ui": "~1.5.23",
"ezsystems/ezplatform-admin-ui-assets": "~4.2.2",
"ezsystems/ezplatform-admin-ui-modules": "~1.5.12",
"ezsystems/ezplatform-core": "~1.0.5",
"ezsystems/ezplatform-cron": "~2.0.4",
"ezsystems/ezplatform-design-engine": "~2.0.0",
"ezsystems/ezplatform-ee-installer": "~2.5.3",
"ezsystems/ezplatform-form-builder": "~1.2.10",
"ezsystems/ezplatform-ee-installer": "~2.5.4",
"ezsystems/ezplatform-form-builder": "~1.2.14",
"ezsystems/ezplatform-graphql": "~1.0.8",
"ezsystems/ezplatform-http-cache": "~1.0.2",
"ezsystems/ezplatform-http-cache-fastly": "~1.1.4",
"ezsystems/ezplatform-matrix-fieldtype": "~1.0.6",
"ezsystems/ezplatform-page-builder": "~1.3.14",
"ezsystems/ezplatform-page-fieldtype": "~1.3.10",
"ezsystems/ezplatform-richtext": "~1.1.10",
"ezsystems/ezplatform-http-cache-fastly": "~1.1.5",
"ezsystems/ezplatform-matrix-fieldtype": "~1.0.7",
"ezsystems/ezplatform-page-builder": "~1.3.21",
"ezsystems/ezplatform-page-fieldtype": "~1.3.15",
"ezsystems/ezplatform-richtext": "~1.1.11",
"ezsystems/ezplatform-solr-search-engine": "~1.7.7",
"ezsystems/ezplatform-standard-design": "~0.2.2",
"ezsystems/ezplatform-user": "~1.0.7",
"ezsystems/ezplatform-workflow": "~1.1.10",
"ezsystems/ezpublish-kernel": "~7.5.13",
"ezsystems/flex-workflow": "~3.2.6",
"ezsystems/repository-forms": "~2.5.8",
"ezsystems/symfony-tools": "~1.1.2",
"ezsystems/ezplatform-user": "~1.0.8",
"ezsystems/ezplatform-workflow": "~1.1.13",
"ezsystems/ezpublish-kernel": "~7.5.21",
"ezsystems/flex-workflow": "~3.2.8",
"ezsystems/repository-forms": "~2.5.10",
"ezsystems/symfony-tools": "~1.1.6",
"friendsofsymfony/jsrouting-bundle": "^1.6.3",
"gregwar/captcha-bundle": "^2.0",
"incenteev/composer-parameter-handler": "^2.1.3",
Expand All @@ -65,7 +65,6 @@
"overblog/graphql-bundle": "^0.11.11",
"scssphp/scssphp": "~1.0",
"sensio/distribution-bundle": "^5.0.25",
"sensiolabs/security-checker": "^5.0",
"symfony/assetic-bundle": "^2.8.2",
"symfony/monolog-bundle": "^3.3.1",
"symfony/swiftmailer-bundle": "^3.2.4",
Expand All @@ -87,19 +86,20 @@
"ezsystems/allure-behat": "~2.0.3",
"ezsystems/allure-php-api": "~2.0.1",
"ezsystems/behat-screenshot-image-driver-cloudinary": "~1.1.1",
"ezsystems/behatbundle": "~7.0.8",
"ezsystems/behatbundle": "~7.0.9",
"liuggio/fastest": "~1.6.0",
"overblog/graphiql-bundle": "^0.1.2",
"phpunit/phpunit": "^6.5.13",
"sensio/generator-bundle": "^3.1.7",
"symfony/phpunit-bridge": "^3.4.18"
},
"conflict": {
"symfony/symfony": "3.4.9||3.4.12||3.4.16",
"doctrine/dbal": "2.7.0",
"doctrine/persistence": "1.3.2",
"twig/twig": "2.6.1",
"symfony/webpack-encore-bundle": "1.2.0||1.2.1"
"laminas/laminas-code": "^4.4",
"symfony/symfony": "3.4.9||3.4.12||3.4.16",
"symfony/webpack-encore-bundle": "1.2.0||1.2.1",
"twig/twig": "2.6.1"
},
"scripts": {
"symfony-scripts": [
Expand All @@ -110,8 +110,7 @@
"@php bin/console bazinga:js-translation:dump web/assets --merge-domains",
"@php bin/console assetic:dump",
"yarn install",
"EzSystems\\EzPlatformEncoreBundle\\Composer\\ScriptHandler::compileAssets",
"@php bin/security-checker security:check || true"
"EzSystems\\EzPlatformEncoreBundle\\Composer\\ScriptHandler::compileAssets"
],
"post-install-cmd": [
"@symfony-scripts"
Expand Down
Loading

0 comments on commit 72c3f03

Please sign in to comment.