diff --git a/.deploy/deploy-dev.yaml b/.deploy/deploy-dev.yaml index 7e19b2d..f1b880e 100644 --- a/.deploy/deploy-dev.yaml +++ b/.deploy/deploy-dev.yaml @@ -64,12 +64,8 @@ services: gitlab-runner: image: mathwave/sprint-repo:gitlab-runner volumes: - - type: volume - source: gitlab-runner - target: /home - - type: bind - source: /var/run/docker.sock - target: /var/run/docker.sock + - gitlab-runner:/home + - /var/run/docker.sock:/var/run/docker.sock environment: GITLAB_REGISTRATION_TOKEN: $GITLAB_REGISTRATION_TOKEN deploy: @@ -81,11 +77,3 @@ services: update_config: parallelism: 1 order: start-first - -volumes: - gitlab-runner: - driver: local - driver_opts: - o: volume - type: none - device: /home/ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 769de96..649afc5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,8 +2,15 @@ stages: - deploy-dev - deploy-prod + +.deploy: + before-script: + - docker volume create --name gitlab-runner --driver local --opt type=volume --opt device=/home + deploy-dev: stage: deploy-dev + extends: + - .deploy tags: - dev rules: @@ -15,6 +22,8 @@ deploy-dev: deploy-prod: stage: deploy-prod + extends: + - .deploy tags: - prod only: