Skip to content

GitLab Next

    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Menu
    Projects Groups Snippets
  • Get a free trial
  • Sign up
  • Login
  • Sign in / Register
  • gitlab-runner gitlab-runner
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 2,408
    • Issues 2,408
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 128
    • Merge requests 128
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.org
  • gitlab-runnergitlab-runner
  • Issues
  • #268
Closed
Open
Created Nov 05, 2015 by Michael@o3o3o

how to use gitlab ci to deploy project to multiple server respectively

/etc/gitlab-runner/config.toml:

concurrent = 1

[[runners]]
  url = "http://192.168.1.240/ci"
  token = "fb8b064e53e31159e268853af6f8ea"
  name = "production162"
  executor = "ssh"
  [runners.ssh]
    user = "root"
    host = "192.168.1.162"
    port = "22"
    identity_file = "/home/user/.ssh/id_rsa"

[[runners]]
  url = "http://192.168.1.240/ci"
  token = "18795ba96cfe74478ee63ff7decedd"
  name = "production163"
  executor = "ssh"
  [runners.ssh]
    user = "root"
    host = "192.168.1.250"
    port = "22"
    identity_file = "/home/user/.ssh/id_rsa"

.gitlab-ci.yml:

job1:
    stage: deploy
    script:
        - "make install"
        - "./ci.sh"

How can I make job1 run on production163 and production162 respectively?

Assignee
Assign to
Time tracking