  Obtaining large samples of galaxy clusters is important for cosmology, since
cluster counts as a function of redshift and mass can constrain the parameters
of our Universe. They are also useful to understand the formation and evolution
of clusters. We develop an improved version of the AMACFI cluster finder (now
AMASCFI) and apply it to the 154 deg2 of the Canada France Hawaii Telescope
Legacy Survey (CFHTLS) to obtain a catalogue of 1371 cluster candidates with
mass M200 > 10^14 Msun and redshift z < 0.7. We derive the selection function
of AMASCFI from the Millennium simulation, and cluster masses from a
richness-mass scaling relation built from matching our candidates with X-ray
detections. We study the evolution of these clusters with mass and redshift by
computing the i'-band galaxy luminosity functions (GLFs) for the early (ETGs)
and late-type galaxies (LTGs). This sample is 90% pure and 70% complete,
therefore our results are representative the cluster population in these
redshift and mass ranges. We find an increase of both the ETG and LTG faint
populations with decreasing redshift (with Schechter slopes alpha_ETG = -0.65
+/- 0.03 at z=0.6 and alpha_ETG = -0.79 +\- 0.02 at z=0.2) and also a decrease
of the LTG bright end, but not of the ETG's. Our large sample allows us to
break the degeneracy between mass and redshift, finding that the redshift
evolution is more pronounced in high-mass clusters, but that there is no
significant dependence of the faint end on mass for a given redshift. These
results show that the cluster red sequence is mainly formed at redshift z >
0.7, and that faint ETGs continue to enrich the red sequence through quenching
of brighter LTGs at z < 0.7. The efficiency of this quenching is higher in
large-mass clusters while the accretion rate of faint LTGs is lower as the more
massive clusters have already emptied most of their environment at higher
redshifts.
