separate dependencies by job

This commit is contained in:
/dev/urandom 2021-11-14 14:58:25 +03:00
parent 89d89b222b
commit b21dece3ce

View file

@ -14,14 +14,6 @@
# For more information, see: https://docs.gitlab.com/ee/ci/yaml/index.html#stages
image: alpine:latest
before_script:
- echo "Installing the required programs..."
- apk add discount rsync openssh-client make bash perl gcc
- eval $(ssh-agent -s)
- echo "$DEPLOY_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
stages: # List of stages for jobs, and their order of execution
- build
- test
@ -29,6 +21,9 @@ stages: # List of stages for jobs, and their order of execution
build-job: # This job runs in the build stage, which runs first.
stage: build
before_script:
- echo "Installing the dependencies..."
- apk add discount make bash perl gcc
script:
- make THEME=discount-theme
artifacts:
@ -42,5 +37,12 @@ unit-test-job: # This job runs in the test stage.
deploy-job: # This job runs in the deploy stage.
stage: deploy # It only runs when *both* jobs in the test stage complete successfully.
before_script:
- echo "Installing the dependencies..."
- apk add rsync openssh-client
- eval $(ssh-agent -s)
- echo "$DEPLOY_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
script:
- rsync -ciIlprz out/* deploy@devurandom.xyz:~/out/