Skip to content

Commit faeed63

Browse files
committed
close #294 update pipeline test for new windows worker
1 parent 275737d commit faeed63

File tree

5 files changed

+23
-10
lines changed

5 files changed

+23
-10
lines changed

ci/chocolatey/chocolatey.ps1

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,29 @@
1+
## concourse task for releasing a package on chocolatey
12

2-
ls
3+
ls #debugging
4+
5+
# read version from file
36
$version = Get-Content .\gp-version\version
47

58
Expand-Archive .\phlow-artifact-windows-s3\git-phlow-*.zip -DestinationPath .\phlow-artifact-windows-s3
69

10+
# list artifact for debugging purpose
711
ls .\phlow-artifact-windows-s3
812

13+
914
mv phlow-artifact-windows-s3/git-phlow.exe git-phlow/ci/chocolatey/tools/
1015

1116
cd git-phlow/ci/chocolatey
1217
ls tools/
1318

19+
# update the nuspec file
1420
$NuSpecFilePath = ".\git-phlow.nuspec"
1521
$file = Get-Item -Path $NuSpecFilePath
1622
[ xml ]$fileContents = Get-Content -Path $NuSpecFilePath
1723
$fileContents.package.metadata.version = '{0}' -f $version
1824
$fileContents.Save($file.Fullname)
1925

20-
$token = [Environment]::GetEnvironmentVariable("chocotoken","User")
26+
$token = $env:chocotoken
2127

2228
choco pack
2329

ci/chocolatey/chocolatey.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ inputs:
77
- name: phlow-artifact-windows-s3
88

99
params:
10-
token:
10+
chocotoken:
1111

1212
run:
1313
path: powershell.exe

ci/pipeline.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,8 @@ jobs:
169169
trigger: true
170170
- task: choco-release
171171
file: git-phlow/ci/chocolatey/chocolatey.yml
172+
params:
173+
chocotoken: {{choco-token}}
172174

173175
resource_types:
174176
#PIP RESOURCE_TYPE

ci/windows/go-test-windows.ps1

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,26 @@
11
#SET GOPATH TO TMP DIRECTORY, BECAUSE WE WANT THE DEPENDENCIES LOCALLY
2+
3+
# this line is important. The worker have been configured through a build session, so the powershell
4+
# have not been reloaded to update the path. Therefore we must set it each time.
5+
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine")
6+
27
$env:GOPATH = "$PWD\"
38
$env:GOBIN = "$PWD\bin"
49

5-
#NAVIGATE TO FOLDER
6-
mkdir -p $env:GOPATH/src/github.com/praqma
10+
##NAVIGATE TO FOLDER
11+
mkdir -Path $env:GOPATH/src/github.com/praqma
712
cp -R git-phlow/ $env:GOPATH/src/github.com/praqma
813

914
cd $env:GOPATH/src/github.com/praqma/git-phlow
15+
ls
1016

11-
#GET DEPENDENCIES
17+
##GET DEPENDENCIES
1218
go get -d -t -v ./...
1319

14-
#RUN TESTS
20+
##RUN TESTS
1521
cd plugins
1622
go test -v ./...
1723

18-
# USES THE LATEST EXITCODE, WHICH IS FROM GO TEST, AND EXITS WITH THAT. THIS FIXIS
24+
## USES THE LATEST EXITCODE, WHICH IS FROM GO TEST, AND EXITS WITH THAT. THIS FIXIS
1925
# ISSUE #152
2026
exit $lastexitcode

ci/windows/windows.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ platform: windows
33

44
inputs:
55
- name: git-phlow
6-
6+
77
run:
8-
98
path: powershell.exe
109
args:
1110
- -File

0 commit comments

Comments
 (0)