123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- # AU template: https://github.com/majkinetor/au-packages-template
- version: '{build}'
- max_jobs: 1
- image: WMF 5
- # History plugin requires complete log
- #clone_depth: 5
- branches:
- only:
- - master
- #build:
- # verbosity: minimal
- environment:
- # Set au version to use or omit to use the latest. Specify branch name to use development version from Github
- #au_version:
- au_push: true
- # Force test: use 1 to test all, or N to split testing into N groups
- au_test_groups: 1
- # Github token to commit pushed packages to repository
- github_user_repo: douglaswth/chocolatey-packages
- github_api_key:
- secure: vBQ66VcMD7oL1DZk4lKbBLKH0SLnGdTAg87cHRjCwQ6wENWv0mNln+1J6uN3HdJK
- # Mail credentials - for error notifications
- mail_user:
- secure: IQJ6qpMhBU90yO/Mj+qVs1hYyIwT4Ri9LiHdbLhHiX4=
- mail_pass:
- secure: wLGxZRm3B8BkkKqf+C6WAM/dp7CfGtgaO20Xp2y9Shs=
- mail_server: smtp.gmail.com
- mail_port: 587
- mail_enablessl: true
- # ID of the gist used to save run results - create a gist under the github_user (secret or not) and grab the id - https://gist.github.com/name/id
- # Optional, leave empty to create anonymous gist
- gist_id: d98014ed4fcaa5cc65bb902f21ce366a
- # Force test: gist id for test results
- gist_id_test: b003c5505c6cc5c6a67f8de9e68c183e
- # Chocolatey API key - to push updated packages
- api_key:
- secure: oODJ824CND7pSFOUd6ben+k0hRi5bsHPckwiisDA4rHIX4fPI708FnxUosWvy5lc
- init:
- - git config --global user.email "chocolatey@realdimensions.net"
- - git config --global user.name "Chocolatey"
- - git config --global core.safecrlf false
- install:
- - ps: 'Get-CimInstance win32_operatingsystem -Property Caption, OSArchitecture, Version | fl Caption, OSArchitecture, Version'
- - ps: $PSVersionTable
- - git --version
- - ps: |
- git clone -q https://github.com/majkinetor/au.git $Env:TEMP/au
- . "$Env:TEMP/au/scripts/Install-AU.ps1" $Env:au_version
- - ps: |
- "Build info"
- ' {0,-20} {1}' -f 'SCHEDULED BUILD:', ($Env:APPVEYOR_SCHEDULED_BUILD -eq 'true')
- ' {0,-20} {1}' -f 'FORCED BUILD:' , ($Env:APPVEYOR_FORCED_BUILD -eq 'true')
- ' {0,-20} {1}' -f 'RE BUILD:' , ($Env:APPVEYOR_RE_BUILD -eq 'true')
- build_script:
- - ps: |
- $ErrorActionPreference = 'Continue'
- if ($Env:APPVEYOR_PROJECT_NAME -like '*test*') { ./test_all.ps1 "random $Env:au_test_groups"; return }
- if ( ($Env:APPVEYOR_SCHEDULED_BUILD -ne 'true') -and ($Env:APPVEYOR_FORCED_BUILD -ne 'true') ) {
- switch -regex ($Env:APPVEYOR_REPO_COMMIT_MESSAGE)
- {
- '\[AU (.+?)\]' { $forced = $Matches[1] }
- '\[PUSH (.+?)\]' {
- $packages = $Matches[1] -split ' '
- Write-Host "PUSHING PACKAGES: $packages"
- foreach ($package in $packages) {
- Write-Host ("{0}`n{1}`n" -f ('-'*60), "PACKAGE: $package")
- $package_dir = ls -recurse | ? { $_.Name -eq "$package.nuspec"} | select -First 1 | % Directory
- if (!$package_dir) { Write-Warning "Can't find package '$package'"; continue }
- pushd $package_dir; choco pack; Push-Package; popd
- }
- return
- }
- }
- }
- ./update_all.ps1 -ForcedPackages $forced
- 7z a au_temp.zip $Env:TEMP\chocolatey\au\*
- artifacts:
- - path: update_info.xml
- - path: Update-AUPackages.md
- - path: au_temp.zip
- notifications:
- - provider: Email
- to: $(mail_user)
- on_build_success: false
- on_build_failure: true
- on_build_status_changed: true
- #on_finish:
- #- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|