  The Gaia second Data Release (DR2) presents a first mapping of full-sky RR
Lyrae stars and Cepheids observed by the spacecraft during the initial 22
months of science operations. The Specific Object Study (SOS) pipeline,
developed to validate and fully characterise Cepheids and RR Lyrae stars (SOS
Cep&RRL) observed by Gaia, has been presented in the documentation and papers
accompanying the Gaia first Data Release. Here we describe how the SOS pipeline
was modified to allow for processing the Gaia multiband (G, G_BP and G_RP) time
series photometry of all-sky candidate variables and produce specific results
for confirmed RR Lyrae stars and Cepheids that are published in the DR2
catalogue. The SOS Cep&RRL processing uses tools such as the period-amplitude
and the period-luminosity relations in the G band. For the analysis of the Gaia
DR2 candidates we also used tools based on the G_BP and G_RP photometry, such
as the period-Wesenheit relation in (G,G_RP). Multiband time series photometry
and characterisation by the SOS Cep&RRL pipeline are published in Gaia DR2 for
150,359 such variables (9,575 classified as Cepheids and 140,784 as RR Lyrae
stars) distributed all over the sky. The sample includes variables in 87
globular clusters and 14 dwarf galaxies. To the best of our knowledge, as of 25
April 2018, variability of 50,570 of these sources (350 Cepheids and 50,220 RR
Lyrae stars) is not known in the literature, hence likely they are new
discoveries by Gaia. An estimate of the interstellar absorption is published
for 54,272 fundamental-mode RR Lyrae stars from a relation based on the G-band
amplitude and the pulsation period. Metallicities derived from the Fourier
parameters of the light curves are also released for 64,932 RR Lyrae stars and
3,738 fundamental-mode classical Cepheids with period shorter than 6.3 days.
