Skip testing on tags
Since we're making tags on existing commits on the master
branch, all tests have already been running.
Thus I suggest we remove testing when running CI/CD pipelines against tags by checking the $CI_COMMIT_TAG
variable.
This change will lead to 2 new benefits:
- Pipelines are running faster when deploying (tagging)
- Live deployments work even if tests would fail because of some stylistic error or alike
With stylistic error I mean this case:
- A new feature is developed & tests are running successfully
- Everything is merged on
master
and tests are still running fine - The new version is tagged (based on
master
) and it is deployed successfully - Time flies by and we've to respectively want to retrigger the live deployment (redeployment, get old version up)
- The pipeline for the tag is triggered again, but this time it fails because in the meantime the new linter fails
In this case, you must fix the linter error and create a new version, probably even if there's nothing changed in the code.