Skip to content
This repository has been archived by the owner on Jul 27, 2022. It is now read-only.

ISAICP-5825: Introduce Toolkit #2113

Merged
merged 38 commits into from
May 19, 2020
Merged

ISAICP-5825: Introduce Toolkit #2113

merged 38 commits into from
May 19, 2020

Conversation

claudiu-cristea
Copy link
Contributor

@claudiu-cristea claudiu-cristea commented May 4, 2020

IMPORTANT! This PR requires changes in the CPHP pipeline configuration. For this reason, the PR was tested in the refs/heads/ISAICP-5825 pipeline. See the successful build 89265070-4575-45fe-a351-172ee5143e4e.

Upstream PRs:

QA notes:

  • With this PR some Phing targets were converted to Task Runner commands and some are replaced by Toolkit commands.
  • Some Phing targets were removed:
    • truncate-cache-tables: Now, we skip the cache tables on backup, The following change has been made to the Jenkins job:
      @@ -7,7 +7,9 @@ DUMP_NAME="JOINUP_PRD_${DATE_ONLY}_${BUILD_ID}.sql"
      
      cd /web/content/joinup/current
      
      -vendor/bin/drush sql-dump --structure-tables-list=cache,cache_* > /tmp/${DUMP_NAME}
      +SKIP_TABLES=$(vendor/bin/drush sql:query 'SHOW TABLES LIKE "cache\_%"')
      +SKIP_TABLES=$(echo ${SKIP_TABLES} | sed 's/ /,/g')
      +vendor/bin/drush sql:dump --skip-tables-list=${SKIP_TABLES} > /tmp/${DUMP_NAME}
      
       gzip /tmp/${DUMP_NAME}
      
    • empty-mysql-database: This is accomplished now by the Drush command, part of the toolkit:install-dump.
    • setup-acceptance: Not used.
    • rebuild-dev: Not used.
    • run-behat-tests: Not used.
    • provision-stack: Not used.
    • enable-uat-modules: Not used.
    • eulogin-ecas-mock-check-requirements, eulogin-ecas-mock-image-download, eulogin-ecas-mock-setup, eulogin-ecas-mock-start, eulogin-ecas-mock-stop: Not used.
    • setup-stage-file-proxy, configure-stage-file-proxy: Not used.
    • clear-cache: Use directly the Drush command.
  • All Joinup classes were moved in the right place, under ./src/. Some of them were wrongly placed under ./scripts/, but that is the place for command line/bash scripts. I've also fixed the namespace of the classes, from \DrupalProject\... to \Joinup\....
  • Scripts from ./resources/codedeploy/ are dead code. Removed.
  • Merged the build.dist.xml into build.project.xml and build.properties.dist into build.properties for simplicity. Otherwise this transition to Toolkit could be too expensive.
  • Removed the Phing task setmysqlautoincrement. It's a migration artefact.

CPHP changes:

Build settings

  • Add ENV vars:
    • SPARQL_HOST=virtuoso7
    • SPARQL_PORT=8890
  • Remove Phing variables:
    • solr.published_core.host
    • solr.unpublished_core.host
    • sparql.host
    • sparql.dsn

Test settings (Behat & PHPUnit)

  • Add ENV vars:
    • SPARQL_HOST=virtuoso7
    • SPARQL_PORT=8890
    • SPARQL_USER=dba
    • SPARQL_PASSWORD=dba
    • SOLR_CORE_PUBLISHED_NAME=drupal_published
    • SOLR_CORE_PUBLISHED_URL=http://localhost:8983/solr
    • SOLR_CORE_UNPUBLISHED_NAME=drupal_unpublished
    • SOLR_CORE_UNPUBLISHED_URL=http://localhost:8983/solr
  • Remove Phing variables:
    • solr.published_core.host
    • solr.unpublished_core.host
    • sparql.host
    • sparql.dsn

Created follow-ups

  • ISAICP-5987
  • ISAICP-5988
  • ISAICP-5989
  • ISAICP-5990
  • ISAICP-5991

runner/solr.yml Outdated Show resolved Hide resolved
@pfrenssen pfrenssen self-assigned this May 7, 2020
Copy link
Contributor

@pfrenssen pfrenssen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice work! Most of the commands work flawless, and seeing the implementation of the task runner commands in YML files I can really now understand the benefit of it!

src/TaskRunner/ConfigProviders/JoinupConfigProvider.php Outdated Show resolved Hide resolved
runner/solr.yml Outdated Show resolved Hide resolved
runner/solr.yml Outdated Show resolved Hide resolved
runner/solr.yml Outdated Show resolved Hide resolved
local.env.dist Outdated Show resolved Hide resolved
runner/solr.yml Outdated Show resolved Hide resolved
@claudiu-cristea
Copy link
Contributor Author

claudiu-cristea commented May 13, 2020

Fixed the QA reamrks.

New successful build after fixing the QA remarks https://app.continuousphp.com/git-hub/ec-europa/joinup-dev/build/6fda3807-6b78-45d3-98a5-43a6a895875c

@pfrenssen
Copy link
Contributor

All looking good, ready to merge when this build is green: https://app.continuousphp.com/git-hub/ec-europa/joinup-dev/build/99873127-b887-429a-99a9-05798ddbf90a

@pfrenssen pfrenssen merged commit 88b46d5 into develop May 19, 2020
@pfrenssen pfrenssen deleted the ISAICP-5825 branch May 19, 2020 13:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants