Review Apps for GitLab Pages Improvement: pages:deploy Job Triggering
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Description
I was just playing with Review Apps for a GitLab Pages site but couldn't get it to work properly.
The Problem
With a standard Review Apps setup, you would have the master branch auto-deploy to the staging environment and manual deploy to the production environment. To get GitLab Pages to run its pages:deploy job, all the jobs need to be named pages. That means that there would need to be two jobs on the master branch pipeline, both of which have the same name. Of course, that doesn't work.
The pipeline would look like this. Notice the same names.
Proposal
As of yet, I have not thought of a good solution working with the current tools.
The only solution I thought of would be making GitLab Pages trigger its deploy job for jobs named pages-*.
Or instead just these names:
pages-reviewpages-stagingpages-production
This would fix the issue of the staging pages job and production pages job having the same name.
That pipeline would look something like this. There are pages:deploy jobs for both pages-staging and pages-production.
Links / references
- gitlab-com/blog-posts#338 (closed)
- Hosting on GitLab.com with GitLab Pages
- Documentation on GitLab Pages
- Getting started with Review Apps
- Dynamic Environments
P.S.
I started playing around the GDK to see if I could make this work myself, but I don't know Ruby so I didn't get far.