Drupal News

[Free/Basketball] Cleveland Cavaliers vs Washington Wizards Live Stream Free NBA Game 6 April 2018

Drupal News Org - Thu, 04/05/2018 - 22:04

[Free/Basketball] Cleveland Cavaliers vs Washington Wizards Live Stream Free NBA Game 6 April 2018

WATCH FREE:

LIVE Cleveland Cavaliers - Washington Wizards - NBA - 6 April 2018  
NBA – Follow the Basketball match between Cleveland Cavaliers and Washington Wizards live with Eurosport.   Our live coverage lets you follow all the key moments as they happen.   Head-to-head: see historical stats and visit our detailed profiles for Cleveland Cavaliers vs Washington Wizards. Get all  
Washington Wizards vs Cleveland Cavaliers Odds - Thursday April 5  
Washington Wizards vs Cleveland Cavaliers Odds - Thursday April 5 2018. Live betting odds and lines, betting trends, against the spread and over/under trends, injury reports and matchup stats for bettors.
Thu, Apr 5 Quicken Loans Arena, Cleveland

Cleveland Cavaliers vs. Washington Wizards: Live Score, Highlights  
Wizards 113, Cavaliers 99 —Final John Wall tallied 21 points and 13 assists to lead the Washington Wizards over the LeBron James-less Cleveland Cavaliers 113-99 on Sunday at the Verizon Center
Cavaliers vs. Wizards: game preview, start time, TV information - Fear  
Plus, this could serve as a first round playoff preview between two teams that don't really like each other. Who: Cleveland Cavaliers vs. Washington Wizards. When: 8 p.m.. Where: Quicken Loans Arena — Cleveland, Ohio. Enemy Blog: Bullets Forever. TV: TNT. Online: WatchTNT. Cavaliers injuries: George  
Cleveland Cavaliers vs. Washington Wizards, Game 79 preview and  
The Cavaliers (48-30) look to sweep this four-game homestand with finale Thursday against the Washington Wizards

Wizards vs. Cavaliers: Watch NBA online, live stream info, odds  
The first game of Thursday night's TNT doubleheader will feature the Washington Wizards heading to the midwest to take on the Cleveland Cavaliers at Quicken Loans Arena. Washington enters the game at 42-36 on the season, which has it tied for seventh place in the Eastern Conference. Meanwhile, the  
Watch Cleveland Cavaliers @ Washington Wizards live streamings for  
Live Now: Cleveland Cavaliers @ Washington Wizards streamings for free. Watch NBA Basketball online broadcasts.

Basketball streams.
Cleveland Cavaliers Basketball - Cavaliers News, Scores, Stats  
Brooks: Harden MVP, but LeBron is deserving. Wizards coach Scott Brooks says Rockets star James Harden is "definitely an MVP" but added LeBron James is also deserving of the award. LeBron muscles to the hoop (0:46). Pierce: Raptors need win vs. Cavs for psyche (1:52). LeBron not worried about playoff seeding 

Metal Toad: Drupal 8: Consumption of a Third-Party API

Main Drupal Feed - Thu, 04/05/2018 - 20:33
Drupal 8: Consumption of a Third-Party API Marcus Bernal Thu, 04/05/2018 - 20:33

For a recent project, we were tasked to consume the client's internal data from a custom API. Now, this scenario was lucky for us, the API provides a total item count of about 5000, but when queried with a start date, it provides all revisions of items between then and now. The premise was that the data was to be downloaded at regular intervals, so that content editors didn't need to copy and past to keep product information up to date.

Acro Media: Drupal Commerce 2: How to Add, Edit and Delete Coupons

Main Drupal Feed - Thu, 04/05/2018 - 14:45

 

Drupal Commerce 2 comes with promotions sub-module that lets you manage store promotions in so many different ways. One common promotion method is to give your customer coupon codes. Coupon codes "unlock" a specific deal for the customer. For example, if you're trying to get a customer to complete an abandoned cart, you may offer a coupon code for 20% off the entire order to try and push them. Maybe you have a weekly newsletter and you want to reward your subscribers with a deal just for them. A custom coupon code with a discount is a great way to do this.

In this Acro Media Tech Talk video, we user our Urban Hipster Commerce 2 demo site to show you just how easy it is to create a promotion and assign a coupon code to it. We'll also show you how you can set additional conditions so that the coupon is only available to use when the conditions are met.

Its important to note that this video was recorded before the official 2.0 release of Drupal Commerce, and so you may see some differences between this video and the current release. The documentation is also evolving over time.

Urban Hipster Commerce 2 Demo site

This video was created using the Urban Hipster Commerce 2 demo site. We've built this site to show the adaptability of the Drupal 8, Commerce 2 platform. Most of what you see is out-of-the-box functionality combined with expert configuration and theming.

More from Acro Media Drupal modules in this demo

Drupal Association blog: Global Training Days Survey Results

Main Drupal Feed - Thu, 04/05/2018 - 14:17

Last year one of the big topics for the Drupal Global Training Days (GTD) Working Group was sorting out what exactly we can do to help with organizing these events. To that end, we sent out a survey to learn more about the kinds of events that people doing GTD events run, or have offered in the past, and how the community can help. We got 33 responses to the survey and 9 of those fine folks also hopped on a phone call with us (myself (add1sun), Mauricio (dinarcon), or Marina (paych)) to talk about the survey answers in more depth. While it's been a little while since we conducted the survey and interviews, we figure this is really interesting and useful information to share with the community.

The first section of this post covers the questions we asked and the results on the survey. The second section dives into our takeaways from the interviews we conducted after the survey.

Survey Results What is your motivation for organizing GTD?

Far and away the most common motivation for running GTD events is to grow the local Drupal community, with over 90% selecting this as at least one reason. The second biggest motivation (39%) was to promote a company or organization, which was then followed up equally at 24% with finding new hires or new clients.

Is your company sponsoring your time to prepare and present the training?

For this question, about 60% of respondents have their company cover their time. There was also a mixed bag of people who are their own business or who freelance, where counting company versus personal time is a blurrier line, as well as people who straddle both, doing some of the work on the clock and the rest on their own time. 21% of those surveyed stated that they are not supported by a company for GTD events.

In which country (and city) have you organized a GTD?

Our list from the survey covered 36 events in 18 different countries, plus an online course with attendees from all over the world.

  • Argentina
  • Australia
  • Bolivia
  • Brazil
  • Cameroon
  • Canada
  • China
  • Costa Rica
  • France
  • India (5)
  • Italy
  • Japan
  • Mexico (3)
  • Moldova
  • Romania
  • Russia
  • Slovakia
  • South Africa
  • United States (11)
In which languages have you organized GTD?

23 (64%) of events are being offered in English. There were 12 languages other than English in the list, with Spanish taking the number 2 slot with 6 events, which lines up with the number of events in Spanish-speaking countries.

Given the wide range of countries, it is a little surprising that there is definitely a concentration of events that are offered in English.

What materials do you use to present the training?

This was split almost evenly between those that use materials they created themselves and those that use a combination of existing materials and their own.

What topics have you covered in the trainings you have presented?

113 responses (with multiple select) indicated almost everyone covers more than 1 topic, and the vast majority of those topics are introductions to Drupal and getting started. Of the topics presented:

  • 94% cover What is Drupal?
  • 85% do Site Building
  • 70% cover the Drupal Community
  • 51% do Theming
  • 42% do module development.

From the results to this question it is clear that most GTD events do not stick with just one broad topic.

What format do you usually follow?

The most popular format (76%) is to have the instructor do a live demonstration and have the students follow along. Next in line is to only give presentations, and the least popular was to have the instructor do a live demo but not have the students work on the project. There were also a couple of people who use recorded videos and then offer Q&A and support to the students as they work through them.

How long does the training last?
  • 36% give full day workshop
  • 24% give half-day workshops
  • 30% do a mix of the 2 formats.
How many people attend your event on average?

Event size was interesting. Over 50% of events had 11-20 attendees. Smaller groups, from 1-10 came in second around 27%, and only 21% of events had more than 20 attendees.

Choose the statement that fits you most with regards to venue cost

Just over a third of respondents have given events at different free venues, while 21% have access to a permanent free venue to use. 30% have used both free and paid venues. Only 1 person has a permanent paid venue they use for GTD.

What type of venues do you use?

Most events use either a company office or a university/educational facility, with conference spaces and co-working/community spaces making up much of the rest. There were also a range of locations from coffee shops to libraries included.

What is the attendee capacity of your venue?

Compared to the class sizes mentioned above, there is certainly space for bigger groups overall, with 60% of venues capable of accepting over 20 attendees.

If you organize GTD in a paid venue, how much does it cost on average? (Use local currency)

For those who do pay for venues, the costs are all over the place, which makes sense given the huge range of locations (both world location and venue type) for these events. The most expensive came in around $400 USD or ~325 EUR.

Which of the following does your venue provide?

Most venues (88%) provide a good internet connection, and a projector with screen. 21% of the venues provide computers to use. Others noted extras they get with their venues include things like parking, snacks, and coffee.

Interview Results

We also spoke to 9 people from 5 countries to dig into what they're doing and how the community and GTD Working Group can help. While everyone has different struggles and needs, there are a few common themes that come through.

Organizing and Marketing

There was a wide variety of needs around organizing and marketing GTD events. This included things like matching up people who like to teach with people who can organize and market the event (many times people don't really want to both!), and there was definitely a repeated request for marketing materials and guidelines for groups to help promote their events. There were also some interesting ideas like creating badges for trainers and attendees, as well as having better ways for GTD organizers and trainers to share information, either through online knowledge bases or in-person events, like GTD-focused activities at DrupalCons.

Curriculum

Not surprisingly curriculum and course materials came up for a lot of people. As we saw from the survey results, a lot of people create their own materials, often through need, not because they necessarily want to. There was a common thread of requests for workshop agendas, slides, and all kinds of training materials, centrally located so that people could more easily build a workshop without investing a lot of curriculum time. A number of people also pointed out that not having materials in the local language was a problem, and is time-consuming work to translate existing materials.

Infrastructure

The last main theme that we saw was about the technical and venue needs. This ranged from funding for space to hold GTDs, having a standard way to get students set up with a local environment, and having a regular way to collect feedback on events, and be able to share that information.

While the GTD Working Group certainly can't tackle all of these things, this gives a good starting point for the biggest pain points that the community can address to accelerate GTDs and the adoption of Drupal. If there are particular topics or initiatives in here that you would like to help with, please reach out to the working group to get connected with others and see what resources are available to help.

CTI Digital: The Release of Drupal 8.5 (What’s New and What’s on the Horizon)

Main Drupal Feed - Thu, 04/05/2018 - 13:38

Drupal 8.5 was released on the 7th of March 2018 with a host of new features, bug fixes, and improvements. There are plenty of exciting updates for developers in this blog. Or if you're a business owner, click here to find out what this means for you.

OPTASY: How to Set Up Google Analytics on Your Drupal Site: A Dead-Simple Step-by-Step Guide

Main Drupal Feed - Thu, 04/05/2018 - 13:04
How to Set Up Google Analytics on Your Drupal Site: A Dead-Simple Step-by-Step Guide admin Thu, 04/05/2018 - 13:04

Let me guess: it's for “luring” online visitors that you've built your Drupal site! For attracting traffic, which would then turn into leads/retail sales/customers... you name it. Yet, without an efficient web analytics service, you're just firing at the target... blindfolded. And so, why not go for the best? Especially since it's free and there's even a dedicated Drupal module streamlining... everything. Here's how you integrate Google Analytics into your Drupal site.

Who are your visitors? Where do they come from? And what do they do precisely during their visits on your Drupal site? How long are their visits? What content on your site do they linger on and what content do they “stubbornly” ignore? Needless to say that for getting your answers to all these questions you need to set up Google Analytics on your website.

Since:

roomify.us: Tutorial: building a simple event approval workflow Drupal 8 & BEE

Main Drupal Feed - Thu, 04/05/2018 - 11:59
BEE makes it easy to quickly implement all kinds of booking & reservation use cases. We've created a new video that walks you through setting up BEE to handle event reservations with a moderation workflow:

State Portal

Drupal Themes - Thu, 04/05/2018 - 11:44

Drop Guard: Drop Guard’s Showdown with SA-CORE-2018-002

Main Drupal Feed - Thu, 04/05/2018 - 10:30
Drop Guard’s Showdown with SA-CORE-2018-002

A lot of Drop Guard users faced their first Highly Critical SA-CORE-2018-002 update within the PSA-2018-001 release last week. We interviewed a bunch of them and want to share Drop Guard’s performance with you. This means that we will share its achievements, its flaws and its “should have performed better”.
 

The Good

Until today, Drop Guard performed 7370 updates for Drupal agencies and their clients all around the globe.

Drupal 8 Drupal Drupal Community Drupal Planet Security Update

myDropWizard.com: Get FREE help from a "Wizard" at DrupalCon Nashville!

Main Drupal Feed - Thu, 04/05/2018 - 06:53

We're trying something new this year at Drupalcon 2018! Book some time with a myDropWizard "Support Wizard" for some FREE help with your Drupal site!

You're a first time Drupalcon attendee? You're a veteran Drupaler? Either way, you made part of your Drupalcon mission to fix a lingering issue - or at least to be pointed in the right direction!

We're here to help!

We spend our days helping Drupalers just like you every day with their support needs, so we thought "Let's bring that myDropWizard Support Face-to-Face with Drupalers: FOR FREE!"

So, drop by Booth #818 or (better yet!) schedule with us below!

Hook 42: Community in Harmony - Hook 42 gives back at DrupalCon Nashville

Main Drupal Feed - Thu, 04/05/2018 - 03:09

DrupalCon is one of the most exciting Drupal events all year, especially for those of us who enjoy working in the community. We really get to shine.

This year is no different. It’s nice to share knowledge through presentations, but there are many ways to give back to the Drupal Open Source project.

Colorfield: Drupal 7 to Drupal 8 migration with configuration entities

Main Drupal Feed - Wed, 04/04/2018 - 18:38
Drupal 7 to Drupal 8 migration with configuration entities christophe Wed, 04/04/2018 - 20:38 The migrate system is stable since Drupal 8.5.0, so this is a great time to review the migration tools provided by the community. This post does not cover migration from the UI, it focuses on partially customized migration that are runned with Drush. In most cases, you will probably want to review the content model a bit (you know, that content type or field machine name that does not actually reflect the truth since its creation, ...). The idea behind is to delegate the heavy lifting to Migrate Upgrade for migration template generation, then apply content model changes if needed.

TIP Solutions: Why a critical security hole is actually not so bad?

Main Drupal Feed - Wed, 04/04/2018 - 16:28
First (before the problem)

If you have a Drupal site and this is the first time you hear about the critical vulnerability published on March 28 2018 read the two last chapters immediately.

During the last week in the Drupal community around the world there has been a hustle about the security hole which was named DrupalGeddon2 [1] [2]. This vulnerability was "highly critical" and got many people scared - unnecessary. This post tries to explain when the vulnerability will become a problem? When the vulnerability is actually not a problem and how to handle the situation right. 

DrupalGeddon DrupalGeddon2 tietoturva Planet Drupal

Dropsolid: How we installed a Drupal security patch on 1300 sites, stress-free!

Main Drupal Feed - Wed, 04/04/2018 - 15:28
04 Apr How we installed a Drupal security patch on 1300 sites, stress-free! Nick Veenhof Drupal

Yesterday a highly critical security issue in Drupal was released. The issue itself is considered critical, because, the way we understood, it makes it possible to execute code as an anonymous user. This could lead to a complete hack of your site and complete exposure of your content - or, worse, if your webserver is badly configured, a full-scale hostile takeover of your server. (More background info available here and here.)

The issue was announced to the Drupal community a week early, so our Dropsolid team had plenty of time to anticipate and prepare. Currently, Dropsolid serves 482 unique and active projects, which contain on average three environments. To be more precise, this gave us a whopping 1316 active Drupal installations to patch. These environments are located on 65 different servers. 45 of those servers are out of our hands and are managed by other hosting companies, such as Combell or even dedicated hardware on site with the customer. At Dropsolid we prefer to host the websites within our own control, but to the Dropsolid Platform this ultimately makes no difference. For some customers we also collaborate with Acquia - these clients are taken care of by Acquia’s golden glove service.

So, back to preparing to patch all the different Drupal installations. We would be lying if we said that all Drupal installs were running on the latest and greatest, so we used Ansible and the Dropsolid Platform to gather all the necessary data and perform a so-called dry run. This was a real-world test across all our installations to verify if we could pass on a patch and then deploy it as soon as we have confirmed that the patch works for all the versions that we have available on our Dropsolid Platform. For example, it verified if the patch tool is available on the server, it injected a text file that we then patched to make sure the flow of patching a Drupal installation would go smoothly, etc. Obviously we detected some hiccups as we were testing, but we were left with enough time to resolve all issues in advance.

Throughout the evening, we had plenty of engineers on stand-by, ready to jump in should something in the automated process go wrong. The entire rollout took us about 2 hours - from the release of the patch over verifying the patch on all the different Drupal releases to rolling it out on all sites and, finally, relax with a few beers. This doesn't mean we had it easy. We had to work a lot, but a lot of hours just to make sure we could handle this load in this amount of time. That is why we are continuously building on our Dropsolid Platform.

Those who joined our hangout could bear witness to exactly how comfortable and relaxed our engineers were feeling during the rollout.

You might ask, joined our hangout? What are we on about exactly? Well, since the Drupal community was in this together, I suggested on Twitter to all join in together and at least make it a fun time.

A few nice things that happened during this hangout:

  • Someone played live ukelele for us while we waited
  • Someone posted a fake patch and made everyone anxious, but at least it was a good test!
  • People were able to watch Dropsolid in total transparency how we coped with this patch and were also able to interact and talk to others in the hangout.

It made the whole evening a fun activity, as witnessed by Baddy Sonja.

Obviously this couldn’t have happened without the help of our great engineers at Dropsolid - and also because we invest a lot of our R&D time into the development of the Dropsolid Platform, so we can do the same exercise times 10 or times 100 without any extra human effort. Thanks to the Drupal security team for the good care and the warning ahead of time. It made a tremendous difference!

All our Dropsolid customers can rest assured that we have their backs, all the time!

If you are not a Dropsolid customer yet and you are interested to see how we can help you make your digital business easy, we’d be more than happy to talk. If you are running a Drupal site and need help with your updates or with your processes, we’d be glad to to help out and onboard you onto our Dropsolid Platform. You can keep your server contract while benefiting from our digital governance and expertise. Are you in charge of many many digital assets and feeling the pain? Maybe it’s time you can start doing the fun things again - just have a chat with us!

 

Get in touch

Evolving Web: Structuring Content with Drupal 8

Main Drupal Feed - Wed, 04/04/2018 - 14:11
Structuring Your Drupal Website

Drupal has always been a strong content management platform. The number one reason we use Drupal is because it so easily adapts to our clients’ content models. It enables us to easily map and structure many different types of complex content.

Let’s look at how we go about structuring that content in Drupal, and how we use terminology to define, group and link different types of content.

Content Entities

In Drupal 8, every piece of content is an entity. To structure a site, you want to define different types of entities that will store different types of content.

Let’s take a publishing website as an example. We’re going to create entities for: books, authors, editions, interviews, reviews, book collections, book categories, and so on. You can start by drawing a map of all these nouns. I like mapping out content on a whiteboard because it’s easy to erase and change your mind and it’s bigger than a piece of paper.

Relationships

Once you’ve mapped all the different types of content that will exist on your site, identify the connections between them. Simply draw arrows arrows between the content types that are related to one another.

For example:

  • A book has an author (or multiple authors): draw an arrow from book to author

  • A book can have editions: draw an arrow from book to edition

  • A book can have reviews, interviews: connect these

  • A book collection has books: group books by collection

  • A book has categories: associate books with topics and categories

Entity Terminology: Bundles, Nodes, Taxonomy, Paragraphs, Blocks

Nodes, taxonomy terms, custom blocks, and paragraphs are all different types of entities. Each entity type has unique properties that make it better suited for different use cases and content types.

Here’s a breakdown of the most important Drupal terminology you need to know to structure your content:

  • Node: A page of content is a node, accessible via its own URL
  • Taxonomy terms: Used to categorize other content, taxonomy terms live in a hierarchy. They can be used to filter content and create unique landing pages.
  • Paragraphs: Content that lives within other content and doesn’t need a dedicated URL is a paragraph.
  • Custom Block: Any content that will be reused throughout the site becomes a custom block. You can also embed a block in a node.
  • Bundle: An entity sub-type is a bundle. Usually, bundles can have have unique fields and settings.
  • Field: A field is a component of the content, i.e. an ISBN, author’s name, or book title
Applying this Model to our Example Project

Here’s how we would decide which entity type to use for each content type:

  • Books and authors become nodes

  • Book categories become taxonomy terms

  • Interviews, reviews and editions could be paragraphs

  • Books and authors would be node bundles (aka content types)

  • A book category is a taxonomy bundle (aka vocabulary)

  • A book collection is a block bundle (block type)

  • Reviews and interviews are paragraph bundles (aka paragraph types)

  • A book collection that needs to be displayed on several pages becomes a block

Focusing on Each Entity to Create Fields

Once you’re looking at a book, you can start to think about what defines a book.

Ask yourself:

  • What information should it have?

  • Which information needs to be displayed?

  • How will we filter and order this content?

  • Will there be a single value for the field or multiple values?

List the various components of the content: title, author, ISBN, covers, genres, editions, reviews, interviews. Each of these will be a field.

Fields in Drupal can be single value (for example, each book has a single ISBN number) or multi-value (a book can have multiple reviews or authors). There are many other fields types that can store the content in a certain way that will affect how it can be displayed or used later (text, date, number, email, link, etc). A field that links one entity to another is a ‘reference’ field.

Information Architecture

So far we’ve talked about structuring your content using entities and bundles. But how do users actually access your content? When you’re building out your site map, you’ll probably picture top-level pages. These may link to dynamic lists of content, or they may have sub-pages that are added beneath them.

Linking to Content

In Drupal, we have three main ways to link to content: menus, views, and fields. In general, this is how we use them:

Menus are for static content: Menus are a static hierarchy of content. If you’re creating permanent content on the site that will be relevant for a long time, you’ll probably link to it through a menu.

Views are for dynamic content: Content that is ‘dynamic’ that will be added to frequently and is too abundant to add to a menu will probably be listed and linked to via views (the Drupal term for ‘list of content’).

Entity reference fields or link fields: You can also explicitly add a link from one content item to another using an entity reference field or a link field. For example, if you have a book and you want to have it link to three other hand-selected ‘related books’, you could create a ‘Content’ reference field for this.

You can go through your site map and figure out which pages are static (linked to by the menu) and dynamic content (linked via views). Landing pages tend to be connection pages. For example, a landing page might live in the menu, list a bunch of dynamic pages and also include explicit links to other pages via ‘calls to action’.  

Applying Menus and Views to Our Example

Using our example, you may have a static page for ‘About Us’, ‘Contact Information’, or ‘History of Publishing’. These would be created as pages and linked to via the menu.

You may also have a page that lists all the books and another that lists all the authors. Because your lists of books and authors are likely to change often, these lists should be created using views. When you add a new book or a new author, it automatically appears in the list.

Taxonomies make creating lists more interesting because we can create lists of content that are filtered by a particular taxonomy term. For example, if ‘prize winning’ is a book category, a taxonomy allows us to create a list of all the books that are ‘prize-winning’.

Finally, you might have a landing page for an upcoming book tour that includes details about the tour, a link to the book being promoted, and also links to other books by the author.

Conclusion

There are many more things to know to build a site with Drupal. But when you’re planning out your content, you simply need to be able to draw out the structure and communicate this with your team. Knowing the basic Drupal concepts will help you communicate clearly and think about the site’s architecture at a high level.

To read about a real-life project in which we built out book content in Drupal 8, read about our project for Princeton University Press.

+ more awesome articles by Evolving Web

Flocon de toile | Freelance Drupal: Working with the Drupal Commerce 2 checkout flows

Main Drupal Feed - Wed, 04/04/2018 - 12:00

Drupal Commerce 2 allows to define out of the box multiple checkout flows, allowing to customize according to the order, the product purchased, the customer profile this buying process and modify it accordingly. This is an extremely interesting feature, in that it can simplify as much as necessary this famous checkout flows. Do you sell physical (and therefore with associated delivery) and digital (without delivery) products? In a few clicks you can have two separate checkout flows that will take into account these specificities.

Lullabot: Continuous Integration in Drupal 8 with Travis CI

Main Drupal Feed - Wed, 04/04/2018 - 10:07

This article is the second in our series on Continuous Integration tools for Drupal 8, which started with CircleCI. This time, we explore Travis CI.

Travis CI is the most well known CI tool for open source projects. Its setup process is straightforward and it offers a lot of flexibility and resources to implement Continuous Integration for any kind of project. In this article we will implement the same set of jobs that we did with CircleCI and then compare both tools.

Resources

This article makes references to the following resources:

Browse the demo project to discover where the CI components are placed, then use the one-line installer to add these components automatically to your project.

The goal

We want to run the following jobs in a Drupal 8 project when someone creates a pull request:

To accomplish the above, we will use the following tools in Travis CI:

  • Drush, Drupal’s command line interface, to perform Drupal-related tasks like installing Drupal or updating the database.
  • Docker Compose, via docker4drupal, to build the environment where Behat tests run.
  • Robo, a PHP task runner, to define a set of tasks for each of the above jobs.

Here is a screenshot of the Travis CI dashboard with the above setup in place:

undefined

Now, let’s see how this has been set up. If you want to dive straight into the code, have a look at the demo Drupal 8 repository.

Setting up Travis CI

Travis CI requires the presence of a .travis.yml file at the root of the repository that dictates how it will build and test the project. I have used this installer that adds the following files:

Additionally, a few dependencies are added via Composer, which are required for the CI jobs.

After adding the above files to the repository, it’s time to give Travis CI access to it. Open https://travis-ci.org and authenticate there with your GitHub account. Next, add the repository at the Travis CI dashboard as shown below:

undefined

That’s it! After this, future changes to the repository should trigger builds at Travis CI. If you create a pull request, you will see a status message like the following one:

undefined Seeing the jobs at work

Here is an excerpt of the .travis.yml file. We are leveraging Travis’ build matrix for spinning up three jobs that run in parallel:

env: matrix: - JOB=job:check-coding-standards - JOB=job:run-unit-tests - JOB=job:run-behat-tests install: - composer --verbose install script: - vendor/bin/robo $JOB

The script section is called three times: one for each value assigned to the $JOB variable. It calls a different Robo task each time. We decided to write the implementation of each job as Robo tasks because:

  • It makes the .travis.yml file easier to read and maintain.
  • It makes the job implementations portable between CI tools.
  • It gives developers an opportunity to run the jobs locally.

If you are curious what a Robo task looks like, here is the implementation of the one that runs Behat tests:

/** * Command to run behat tests. * * @return \Robo\Result * The result of the collection of tasks. */ public function jobRunBehatTests() { $collection = $this->collectionBuilder(); $collection->addTaskList($this->downloadDatabase()); $collection->addTaskList($this->buildEnvironment()); $collection->addTask($this->waitForDrupal()); $collection->addTaskList($this->runUpdatePath()); $collection->addTaskList($this->runBehatTests()); return $collection->run(); } Building the environment with Docker Compose

The build environment task shown above, $this→buildEnvironment(), uses Docker Compose to build a Docker environment where the Drupal site will be configured, the database will be updated, and finally, Behat tests will run.

In contrast with CircleCI, where we define the mix of Docker images that the test environment will use to run the jobs, Travis CI offers two environments (Precise and Trusty) with common pre-installed services. Trusty has everything that we need for checking coding standards or running PHPUnit tests, but Behat tests require more setup which we find easier to manage via Docker Compose.

Here are the contents of the build environment task. For simplicity, we have removed a few unrelated lines:

/** * Builds the Docker environment. * * @return \Robo\Task\Base\Exec[] * An array of tasks. */ protected function buildEnvironment() { $force = true; $tasks = []; $tasks[] = $this->taskFilesystemStack() ->copy('.travis/docker-compose.yml', 'docker-compose.yml', $force); $tasks[] = $this->taskExec('docker-compose pull --parallel'); $tasks[] = $this->taskExec('docker-compose up -d'); return $tasks; }

The above task uses this docker-compose.yml file to build the environment.

Generating and visualizing coverage reports

Travis CI does not support storing artifacts like CircleCI does. Therefore, we need to use a third-party service to host them. Travis documentation suggests either uploading them to an Amazon S3 bucket or using Coveralls, a hosted analysis tool. We chose the latter because it posts a summary in each pull request with a link to the full coverage report.

Setting up Coveralls is straightforward. Start by opening https://coveralls.io and then, after authenticating with your GitHub account, use their browser to find and connect to a repository, like this:

undefined

Next, it is recommended to review the repository settings so we can customize the developer experience:

undefined

With that in place, new pull requests will show a status message with a one-line summary of the coverage report, plus a link to the full details:

undefined

Finally, when we click on Details, we see the following coverage report:

undefined A comparison to CircleCI

CircleCI can do all that Travis CI does with less setup. For example, coverage reports and Behat screenshots can be stored as job artifacts and visualized at the CircleCI dashboard. Additionally, CircleCI’s Command Line Interface gives a chance to developers to debug jobs locally.

Travis CI shines on flexibility: for example, only the Behat job uses Docker Compose to build the environment while the rest of the jobs use the Trusty image. Additionally, there is a huge amount of articles and documentation, which you will surely find helpful when tweaking the jobs to fit your team's needs.

If you liked Travis CI, check out this installer to get started quickly in your Drupal 8 project.

What next?

We aren’t sure about which tool to pick for our next article in this series on CI tools for Drupal 8. Do you have a preference? Do you have feedback on what you’ve found relevant about this article? Please let us know by posting a comment.

Acknowledgements

Kalamuna Blog: How-to: Using Drupal-Project to Craft Your Perfect Start State

Main Drupal Feed - Wed, 04/04/2018 - 06:05
How-to: Using Drupal-Project to Craft Your Perfect Start State Shannon O'Malley Tue, 04/03/2018 - 23:05

The drupal-project repository is quickly becoming the de facto starter for all Drupal 8 projects. So how can you quickly spin up a new site with Composer and drupal-project? How do you take drupal-project and customize it to suit your particular needs? And, how do you leverage post-install tasks to keep yourself DRY? This February I gave a talk at DrupalCamp Florida where I got into all of these questions.

Categories Articles Drupal

OSTraining: A Further Look at the New Layout Builder in Drupal 8

Main Drupal Feed - Wed, 04/04/2018 - 05:48

Earlier in this blog, OSTraining's Steve Burge made an excellent introduction to the new Drupal Layout Builder.

Many users have been eagerly expecting this module and it was released in version 8.5.

In this tutorial, you will take a further look at how to work with this module. You will see how to use the Layout Builder to configure:

  • Content types.
  • Nodes.

Agiledrop.com Blog: AGILEDROP: DrupalCon Nashville, here I come!

Main Drupal Feed - Wed, 04/04/2018 - 00:22
I was not planning to go to DrupalCon this year due to so many things going on at the company, but with a little delegation effort, I will be able to go.  I would not like to miss this one, to be honest. So here is what I am looking forward to in Nashville.   Meeting new people DrupalCons in the US are the biggest Drupal events, and even if you are an active community member for 11 years like I am, you still see a lot of new faces. Developers are generally more on the introvert side, so you don't see so much intentional networking like on some other events, but don't hesitate to ask the… READ MORE

Pages