Fix Gitlab CI script
.gitlab-ci.yml
needs to be fixed.
Script should do the following for verifying merge requests:
-
pull in changes from the appropriate branch (the detached merge request branch) -
update npm and run npm install
-
run the linter -
run pipeline-tests
script
This may need to be done in a new directory each time to avoid file conflicts with new branch states. However, a pipeline will run much faster if it is done in the same directory and can just pull in new git changes, as this avoids a long npm install
job.
Ideally, the script will also deploy the back end and front end (separately as currently in the script). This is not necessary as QPlan can be run locally and is not actually being released yet. In the future, a different server may be used to host a deployed QPlan, but ideally the one server can both run tests and deploy. The following should be done for deployment, only on changes to the release
branch:
-
pull in changes from release
-
update npm and run npm install
-
deploy API as seen in deploy_api
stage currently in script (assuming QPlan was already started, ideally make deployment be able to handle if QPlan is not already running) -
deploy UI as seen in deploy_ui
stage currently in script
The following factors must also be considered:
- Be modular and clean. There may be significant overlap in stage operation and poor scripting will make the file hard to understand
- Parallelism. If the same directory is to be used for multiple pipeline runs, it must be verified that pipelines will wait for earlier ones to complete to avoid one pipeline overwriting the files in use by another pipeline.
- Use
database_deploy
to have an instance that isn't production, but is still an always available, up to date, live version of QPlan. This may be therelease
version of QPlan for now.