allowed to use multiple projects for a single codebase?

Stanislaw Halik's Avatar

Stanislaw Halik

03 May, 2019 02:26 AM

Hey,

The "opentrack" project is using CI as more of an afterthought than core development tool. Is it allowed (and not frowned upon, either) to add multiple projects for each platform, rather than a single project configured to use all supported platforms? This would ease configuration a lot. Does having multiple projects consume any more resources than having a single one?

cheers,
sh

  1. Support Staff 1 Posted by Owen McDonnell on 04 May, 2019 03:51 AM

    Owen McDonnell's Avatar

    It's no problem to have multiple projects that all draw from the same repository. But keep a couple things in mind....

    Projects do not really consume resources, but build jobs do, and for free plan, you are only allowed 1 concurrent job. If one is running, others will be queued.

    Secondly, if you add a repo as a new project when there is already a project with that name, AppVeyor will assign a random slug based on that name. But you can rename the slug via the AppVeyor Rest API.
    Here is a sample powershell script to change a project slug.

    $token = '<your_appveyor_api_token>'
    $headers = @{
      "Authorization" = "Bearer $token"
      "Content-type" = "application/json"
    }
    
    $response = Invoke-RestMethod -Uri 'https://ci.appveyor.com/api/projects/<your_account_name>/<current_project_slug>/settings' -Headers $headers -Method Get
    
    $response.settings.slug="<new_project_slug>"
    
    Invoke-RestMethod -Uri 'https://ci.appveyor.com/api/projects' -Headers $headers -Method PUT -Body ($response.settings | convertto-json -depth 5)
    

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac