Skip to content

Instantly share code, notes, and snippets.

@alena1108
Created March 14, 2019 20:32
Show Gist options
  • Save alena1108/84a670bf97a11e66fc7263604b8d3608 to your computer and use it in GitHub Desktop.
Save alena1108/84a670bf97a11e66fc7263604b8d3608 to your computer and use it in GitHub Desktop.
Windows agent build failure
Started by user Alena
Building in workspace C:\Program Files (x86)\Jenkins\workspace\windows-rancher-agent
> git.exe rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git.exe config remote.origin.url https://github.com/rancher/rancher # timeout=10
Fetching upstream changes from https://github.com/rancher/rancher
> git.exe --version # timeout=10
> git.exe fetch --tags --progress https://github.com/rancher/rancher +refs/heads/*:refs/remotes/origin/*
> git.exe rev-parse "tags/v2.2.0-rc5^{commit}" # timeout=10
> git.exe rev-parse "refs/remotes/origin/tags/v2.2.0-rc5^{commit}" # timeout=10
Checking out Revision 88824c02cbaf2b9827d5b0f8ffa07719365c5ead (tags/v2.2.0-rc5)
> git.exe config core.sparsecheckout # timeout=10
> git.exe checkout -f 88824c02cbaf2b9827d5b0f8ffa07719365c5ead
Commit message: "UI 2.2.8"
First time build. Skipping changelog.
[windows-rancher-agent] $ powershell.exe -NonInteractive -ExecutionPolicy ByPass "& 'C:\Windows\TEMP\jenkins8438430510773790478.ps1'"
Running version getting
PS_VERSION is 6.0.2-nanoserver-1803
VERSION is v2.2.0-rc5-nanoserver-1803
Running agent build
Sending build context to Docker daemon 152.5MB
Step 1/15 : ARG PS_VERSION
Step 2/15 : FROM golang:1.11.0-windowsservercore-1803 AS build-stage
---> c27067935a54
Step 3/15 : SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
---> Using cache
---> a89fb2077310
Step 4/15 : RUN New-Item -Type Directory -Path '"C:\Program Files\volumeplugins"' -ErrorAction Ignore; Write-Host 'Downloading Volume plugins ...'; [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -UseBasicParsing -OutFile '"C:\Program Files\flexvolume.zip"' -Uri "https://github.com/Microsoft/K8s-Storage-Plugins/releases/download/v0.0.2/flexvolume-windows.zip"; Write-Host 'Expanding volumeplugins/flexvolume binaries ...'; Expand-Archive -Force -Path '"C:\Program Files\flexvolume.zip"' -DestinationPath '"C:\Program Files\volumeplugins"'; Write-Host 'Complete.';
---> Using cache
---> b75c5e90031e
Step 5/15 : ARG VERSION=dev
---> Using cache
---> 20220ed5fcd8
Step 6/15 : ENV AGENT_VERSION=$VERSION
---> Running in 1953a1fd2208
Removing intermediate container 1953a1fd2208
---> 8732bc37102a
Step 7/15 : COPY [".", "C:/gopath/src/github.com/rancher/rancher/"]
---> 54e170a1db72
Step 8/15 : RUN cd C:\gopath\src\github.com\rancher\rancher; $env:GOARCH='amd64'; $env:GOOS='windows'; $env:CGO_ENABLED=0; Write-Host 'Building ...'; & .\scripts\windows\validate.ps1; go build -i -tags k8s -ldflags ('-X main.VERSION={0} -s -w -extldflags -static' -f $env:AGENT_VERSION) -o .\bin\agent.exe .\pkg\agent; if ($?) { .\bin\agent.exe --version; Write-Host 'Complete.'; } else { Write-Host 'Built failed.'; exit 1; };
---> Running in e7fd62cb19f7
Building ...
Running validation
Running: go vet
# github.com/rancher/rancher/pkg/controllers/user/logging/utils
pkg\controllers\user\logging\utils\syslog.go:96:38: undefined: syslog.Priority
pkg\controllers\user\logging\utils\syslog.go:97:28: undefined: syslog.Priority
pkg\controllers\user\logging\utils\syslog.go:112:9: undefined: syslog.LOG_INFO
# github.com/rancher/rancher/pkg/rkeworker
pkg\rkeworker\execute_windows.go:53:24: not enough arguments in call to runProcess
have (context.Context, string, "github.com/rancher/rancher/vendor/github.com/rancher/types/apis/management.cattle.io/v3".Process, bool)
want (context.Context, string, "github.com/rancher/rancher/vendor/github.com/rancher/types/apis/management.cattle.io/v3".Process, bool, bool)
pkg\rkeworker\execute_windows.go:62:24: not enough arguments in call to runProcess
have (context.Context, string, "github.com/rancher/rancher/vendor/github.com/rancher/types/apis/management.cattle.io/v3".Process, bool)
want (context.Context, string, "github.com/rancher/rancher/vendor/github.com/rancher/types/apis/management.cattle.io/v3".Process, bool, bool)
Running: golint
Running: go fmt
# github.com/rancher/rancher/pkg/rkeworker
pkg\rkeworker\execute_windows.go:53:24: not enough arguments in call to runProcess
have (context.Context, string, "github.com/rancher/rancher/vendor/github.com/rancher/types/apis/management.cattle.io/v3".Process, bool)
want (context.Context, string, "github.com/rancher/rancher/vendor/github.com/rancher/types/apis/management.cattle.io/v3".Process, bool, bool)
pkg\rkeworker\execute_windows.go:62:24: not enough arguments in call to runProcess
have (context.Context, string, "github.com/rancher/rancher/vendor/github.com/rancher/types/apis/management.cattle.io/v3".Process, bool)
want (context.Context, string, "github.com/rancher/rancher/vendor/github.com/rancher/types/apis/management.cattle.io/v3".Process, bool, bool)
Built failed.
The command 'powershell -Command $ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue'; cd C:\gopath\src\github.com\rancher\rancher; $env:GOARCH='amd64'; $env:GOOS='windows'; $env:CGO_ENABLED=0; Write-Host 'Building ...'; & .\scripts\windows\validate.ps1; go build -i -tags k8s -ldflags ('-X main.VERSION={0} -s -w -extldflags -static' -f $env:AGENT_VERSION) -o .\bin\agent.exe .\pkg\agent; if ($?) { .\bin\agent.exe --version; Write-Host 'Complete.'; } else { Write-Host 'Built failed.'; exit 1; };' returned a non-zero code: 1
[ERROR]: Build rancher/rancher-agent:v2.2.0-rc5-nanoserver-1803 FAILED
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Login Succeeded
Running version getting
PS_VERSION is 6.0.2-nanoserver-1803
VERSION is v2.2.0-rc5-nanoserver-1803
The push refers to repository [docker.io/rancher/rancher-agent]
An image does not exist locally with the tag: rancher/rancher-agent
Error response from daemon: No such image: rancher/rancher-agent:v2.2.0-rc5-nanoserver-1803-bak
Error: No such image: rancher/rancher-agent:v2.2.0-rc5-nanoserver-1803-bak
rancher/rancher-agent:v2.2.0-rc5-nanoserver-1803 has something wrong while PUSHING
Build step 'Windows PowerShell' marked build as failure
Finished: FAILURE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment