Rearranged repository, trying to rearrange appveyor builds...

keith.barrows's Avatar

keith.barrows

19 Jul, 2020 10:25 PM

I had a very shallow github layout like:

root
root\proj1
root\proj2
root\proj3

Now, I've changed it to:

root\Core\proj1
root\Core\proj2
root\Core\proj3
root\Framework\proj1
root\Framework\proj2
root\Standard\proj1
As I test with just 1 project from each tree I am not yet successful. My current YAML file looks like:
version: 0.0.{build}
init:
- cmd: git config --global core.autocrlf true
branches:
  only:
  - master
image: Visual Studio 2017
configuration: Release
notifications:
- provider: Email
  to:
  - [email blocked]
  subject: CI build 0.0.{build} failed!
  on_build_success: true
  on_build_failure: true
  on_build_status_changed: true
clone_folder: C:\sol3
environment:
  build: '{build}'
  matrix:
  - project_name: Sol3.Standard.Infrastructure
  - project_name: Sol3.Core.Infrastructure
  - project_name: Sol3.Framework.Infrastructure
nuget:
  account_feed: true
  project_feed: true
build_script:
- pwsh: >-
    Set-Location .\$env:project_name
    ./build.ps1
    Set-Location ..
artifacts:
- path: '*/.nupkg'
deploy: off

Do I set each of the Environment:Matrix:Project_Name to a folder\folder\name format?
Do I set Build_Script differently?
Will the Environment:Matrix:Project_Name control the build order?

Will continue to play around with this as I await better minds to answer my questions. :)

  1. 1 Posted by keith.barrows on 19 Jul, 2020 10:57 PM

    keith.barrows's Avatar

    I changed the project names to include the directory structure and the build worked. However, the Pack did not - for obvious reasons.

    Build file:

    Write-Host "---==[ BEFORE BUILD" $env:project_name $env:APPVEYOR_BUILD_VERSION "SCRIPT ]==---"
    dotnet --version
    dotnet restore --verbosity normal
    Write-Host "---==[ BUILD" $env:project_name $env:APPVEYOR_BUILD_VERSION "SCRIPT ]==---"
    dotnet build --verbosity normal
    Write-Host "---==[ AFTER BUILD" $env:project_name $env:APPVEYOR_BUILD_VERSION "SCRIPT ]==---"
    dotnet pack --no-build /p:PackageVersion=$env:APPVEYOR_BUILD_VERSION --verbosity normal
    #nuget push .\bin\release\$env:project_name.$env:APPVEYOR_BUILD_VERSION.nupkg -ApiKey gnsob4ooc2th7pjtxx7yqflr -Source https://ci.appveyor.com/nuget/keithbarrows/api/v2/package
    Push-AppveyorArtifact .\bin\Release\$env:project_name.$env:APPVEYOR_BUILD_VERSION.nupkg
    

    Is there a way to have 2 matrixes in the environment setting? i.e.:

    environment:
      build: '{build}'
      matrix:
      - project_name: Sol3.Standard.Infrastructure
      - project_name: Sol3.Core.Infrastructure
      - project_name: Sol3.Framework.Infrastructure
      matrix:
      - dir_name: \src\Standard\
      - dir_name: \src\Core\
      - dir_name: \src\Framework\
    

    Thoughts?

  2. 2 Posted by keith.barrows on 19 Jul, 2020 11:06 PM

    keith.barrows's Avatar

    Hmmm. Found a way to split project from directory so now I have 2 of 3 green builds. Just need to figure out why the 3rd project fails its build.

    Solution:

    environment:
      build: '{build}'
      matrix:
      - project_name: Sol3.Standard.Infrastructure
        dir_name: '\src\Standard\'
      - project_name: Sol3.Core.Infrastructure
        dir_name: '\src\Core\'
      - project_name: Sol3.Framework.Infrastructure
        dir_name: '\src\Framework\'
     ```
    

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

 

26 Sep, 2024 03:49 PM
26 Sep, 2024 09:02 AM
25 Sep, 2024 07:07 PM
24 Sep, 2024 08:39 PM
24 Sep, 2024 06:47 AM
20 Sep, 2024 05:50 PM