Skip to content
Snippets Groups Projects
Commit ade4e9e1 authored by Steven Ayers's avatar Steven Ayers
Browse files

Issue #3399648: Tugboat integration

parent 73d35a7f
No related branches found
No related tags found
1 merge request!2Issue #3399648 by bluegeek9: Tugboat integration
Pipeline #45158 failed
services:
php:
# Specify the version of Drupal you wish to use for Tugboat below.
image: q0rban/tugboat-drupal:10
default: true
http: false
depends: mysql
commands:
update: |
set -eux
# Check out a branch using the unique Tugboat ID for this repository, to
# ensure we don't clobber an existing branch.
git checkout -b $TUGBOAT_REPO_ID
# Composer is hungry. You need a Tugboat project with a pretty sizeable
# chunk of memory.
export COMPOSER_MEMORY_LIMIT=-1
# This is an environment variable we added in the Dockerfile that
# provides the path to Drupal composer root (not the web root).
cd $DRUPAL_COMPOSER_ROOT
# We configure the Drupal project to use the checkout of the module as a
# Composer package repository.
composer config repositories.tugboat vcs $TUGBOAT_ROOT
composer config minimum-stability dev
# Now we can require this module, specifing the branch name we created
# above that uses the $TUGBOAT_REPO_ID environment variable.
composer require drupal/knowledge:dev-$TUGBOAT_REPO_ID
# Install Drupal on the site.
vendor/bin/drush \
--yes \
--db-url=mysql://tugboat:tugboat@mysql:3306/tugboat \
--site-name="Live preview for ${TUGBOAT_PREVIEW_NAME}" \
--account-pass=admin \
site:install standard
# Set up the files directory permissions.
mkdir -p $DRUPAL_DOCROOT/sites/default/files
chgrp -R www-data $DRUPAL_DOCROOT/sites/default/files
chmod 2775 $DRUPAL_DOCROOT/sites/default/files
chmod -R g+w $DRUPAL_DOCROOT/sites/default/files
# Enable the module.
vendor/bin/drush --yes pm:enable knowledge
vendor/bin/drush cache:rebuild
build: |
set -eux
# Delete and re-check out this branch in case this is built from a Base Preview.
git branch -D $TUGBOAT_REPO_ID && git checkout -b $TUGBOAT_REPO_ID || true
export COMPOSER_MEMORY_LIMIT=-1
cd $DRUPAL_COMPOSER_ROOT
composer install --optimize-autoloader
# Update this module, including all dependencies.
composer update drupal/knowledge --with-all-dependencies
vendor/bin/drush --yes updb
vendor/bin/drush cache:rebuild
mysql:
image: tugboatqa/mariadb
......@@ -5,12 +5,16 @@
"keywords": ["Drupal", "Knowledge"],
"homepage": "http://drupal.org/project/knowledge",
"license": "GPL-2.0+",
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"drupal/core": "^9 || ^10",
"drupal/autocomplete_id": "^1.5",
"drupal/charts": "^5.0",
"drupal/moderation_note": "1.0-beta5",
"drupal/core": "^9 || ^10",
"drupal/field_group": "^3.4",
"drupal/moderation_note": "^1.0-beta5",
"drupal/search_api": "^1.0",
"drupal/token": "^1.13",
"drupal/views_date_format_sql": "3.0-alpha3"
},
"authors": [
......
langcode: en
status: true
dependencies:
module:
- user
id: user.knowledge_coach
field_name: knowledge_coach
entity_type: user
type: entity_reference
settings:
target_type: user
module: core
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: true
custom_storage: false
langcode: en
status: true
dependencies:
module:
- user
id: user.knowledge_leader
field_name: knowledge_leader
entity_type: user
type: entity_reference
settings:
target_type: user
module: core
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: true
custom_storage: false
......@@ -226,8 +226,8 @@ knowledge.node.merge:
requirements:
_permission: 'merge duplicate knowledge'
options:
parameters:
original:
type: entity:node
duplicate:
type: entity:node
parameters:
original:
type: entity:node
duplicate:
type: entity:node
services:
logger.channel.knowledge:
parent: logger.channel_base
arguments: ['knowledge']
parent: logger.channel_base
arguments: ['knowledge']
knowledge.breadcrumb:
class: Drupal\knowledge\KnowledgeBreadcrumbBuilder
......
......@@ -5,5 +5,5 @@ core_version_requirement: 9.x || 10.x
package: 'Knowledge (experimental)'
lifecycle: experimental
dependencies:
- knowledge:knowledge
- autocomplete_id:autocomplete_id
- knowledge:knowledge
- autocomplete_id:autocomplete_id
......@@ -8,8 +8,8 @@ use Drupal\Core\Entity\EntityPublishedInterface;
use Drupal\Core\Entity\EntityPublishedTrait;
use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\Core\Field\BaseFieldDefinition;
use Drupal\Core\Entity\RevisionableContentEntityBase;
use Drupal\Core\Field\BaseFieldDefinition;
use Drupal\field\Entity\FieldStorageConfig;
use Drupal\knowledge\KnowledgeInterface;
use Drupal\user\Entity\User;
......
......@@ -156,7 +156,7 @@ display:
display_options:
path: test-body-filter
display_description: ''
filters:
filters: { }
defaults:
filters: false
filter_groups: false
......@@ -174,7 +174,7 @@ display:
display_options:
path: test-body-paris
display_description: ''
filters:
filters: { }
defaults:
filters: false
filter_groups: false
......
......@@ -27,7 +27,7 @@ class KnowledgeCSSTest extends KnowledgeTestBase {
*
* @see https://www.drupal.org/project/drupal/issues/3267890
*/
protected $defaultTheme = 'starterkit';
protected $defaultTheme = 'stable9';
/**
* {@inheritdoc}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment