Created
April 25, 2022 07:09
-
-
Save myas92/0cac9ca3c447ddece88c2cfcf6e1feb2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stages: # List of stages for jobs, and their order of execution | |
- build | |
- test | |
- deploy | |
build-job: # This job runs in the build stage, which runs first. | |
stage: build | |
script: | |
- cd /home/user/projects/agent | |
- git pull | |
- npm install | |
test-job: # This job also runs in the test stage. | |
stage: test # It can run at the same time as unit-test-job (in parallel). | |
script: | |
- cd /home/user/projects/agent | |
- npm run test | |
deploy-job: # This job runs in the deploy stage. | |
stage: deploy # It only runs when *both* jobs in the test stage complete successfully. | |
script: | |
- pm2 restart 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment