Preheat your oven to 400 degrees F.
To begin, cube your French bread or sourdough into cubes that are about 3/4-1 inch wide (though they don't need to be exact). Spread them out on a large sheet pan, and bake at 400 for 10 minutes, or until the bread is dry and lightly toasted. When done, remove from the oven and set aside.
Cut off the bulb end and the dark green parts of your leek. Compost or set aside to make veggie broth. Then, cut the leek in quarters, lengthwise, then cut the quarters again into small semicircles about 1/4" wide. Wash the cut leeks well, then drain and dry completely with a clean towel or paper towels.
Bring the olive oil to medium-low heat in a sauté pan. Add the washed and dried cut leek and shallot, and sauté for about 5-6 minutes, or until the leeks soften and the shallot becomes translucent. Season with the salt and pepper and stir well. When done, remove from heat and set aside.
In a large mixing bowl, add the eggs, whole milk, mustard, thyme, salt, and pepper. Whisk well until everything is homogenous and you don't see any streaks of egg whites left.
Use a stick of butter to grease your 9x13" baking dish. Then, add about half of the bread, sautéed leeks and shallots, and artichokes, and top it with half of the gruyère cheese. Then, repeat this with the remaining bread, veggies, artichokes, and cheese. Pour the egg mixture evenly over everything.
Cover the baking dish with cling wrap or beeswax wrap, and let it rest in the refrigerator for at LEAST four hours, preferably overnight.