-
-
Notifications
You must be signed in to change notification settings - Fork 19
/
.gitlab-ci.yml
47 lines (47 loc) · 2.34 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
build_image:
before_script:
- Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
- git remote set-url origin https://tunisiano187:${Gitlab_api}@gitlab.com/chocolatey-packages/automatic-updating.git
- git config --global user.email $GITLAB_USER_EMAIL
- git config --global user.name $GITLAB_USER_LOGIN
script:
- Write-Host "Windows Version"
- Get-CimInstance win32_operatingsystem -Property Caption, OSArchitecture, Version | fl Caption, OSArchitecture, Version
- Write-Host "Setup AU module"
- ./setup/au_setup.ps1
- Write-Host "Setup requisites"
- ./setup/requisites.ps1
- git remote set-url origin https://$($env:gitlab_user):$($env:gitlab_api_key)@gitlab.com/chocolatey-packages/automatic-updating.git
- git config --global user.email "[email protected]"
- git config --global user.name "$env:gitlab_user"
- git checkout master
- Write-Host "Updating Packages.md"
- ./scripts/ListPackages.ps1
- Write-Host "Start updating packages"
- install-module Wormies-AU-Helpers
- tosend/try.ps1
- cd au
- ./invoke-setup.ps1
- ../scripts/Update-PackageSourceUrl.ps1 -GithubRepository "tunisiano187/Chocolatey-packages" -UseStopwatch
- ../scripts/Update-IconUrl.ps1 -Quiet -GithubRepository "tunisiano187/Chocolatey-packages" -UseStopwatch -Optimize
- ./update_all.ps1
# - ./update.ps1
after_script:
- md upload
- Get-ChildItem -Path ./ -Include *.nupkg -Recurse -File | Move-Item -Destination ./upload/
- Get-ChildItem -Path ./ -Include Update-AUPacakges.md -Recurse -File | Move-Item -Destination ./upload/
- Get-ChildItem -Path ./ -Include update_info.xml -Recurse -File | Move-Item -Destination ./upload/
#- git checkout -B master
#- git add -u :/
#- git commit -m '[skip ci] commit from CI runner'
#- if(git log origin/master..master) { git push origin master }
- choco source add "$CI_SERVER_URL/api/v4/projects/$CI_PROJECT_ID/packages/nuget/index.json" --name gitlab --username gitlab-ci-token --password $CI_JOB_TOKEN --store-password-in-clear-text
- choco push "./upload/*.nupkg" --source gitlab
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule"'
artifacts:
paths:
- upload/
expire_in: 1 week
tags:
- saas-windows-medium-amd64