-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: build packages in parallel #17723
feat: build packages in parallel #17723
Conversation
/packaging |
.ci/packaging.groovy
Outdated
axes { | ||
axis { | ||
name 'PLATFORMS' | ||
values '+linux/armv7', '+linux/ppc64le', '+linux/s390x', '+linux/mips64', 'darwin' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I'm missing something, but don't we build windows packages?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not from the betas-ci, we only have this jobs https://beats-ci.elastic.co/job/elastic+beats+master+package/
I've check https://github.com/elastic/beats/blob/master/dev-tools/mage/platforms.go#L29-L70 and there is a bunch of platforms we do not build on the beats-ci, Should we build them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checking the logs, I think does no matter what you put on PLATFORMS env var you always build all the packages
This is a log where PLATFORMS is +linux/s390x
https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/pipelines/packaging/branches/PR-17723/runs/1/nodes/155/log/?start=0
but after build all the cross-compile Docker images I think it is compiling packages that are not requested.
[2020-04-15T10:42:45.027Z] >> Building using: cmd='build/mage-linux-amd64 buildGoDaemon', env=[CC=s390x-linux-gnu-gcc, CXX=s390x-linux-gnu-g++, GOARCH=s390x, GOARM=, GOOS=linux, PLATFORM_ID=linux-s390x]
[2020-04-15T10:42:45.027Z] >> Building using: cmd='build/mage-linux-amd64 buildGoDaemon', env=[CC=aarch64-linux-gnu-gcc, CXX=aarch64-linux-gnu-g++, GOARCH=arm64, GOARM=, GOOS=linux, PLATFORM_ID=linux-arm64]
[2020-04-15T10:42:45.027Z] >> Building using: cmd='build/mage-linux-amd64 golangCrossBuild', env=[CC=o64-clang, CXX=o64-clang++, GOARCH=amd64, GOARM=, GOOS=darwin, PLATFORM_ID=darwin-amd64]
[2020-04-15T10:42:45.027Z] >> Building using: cmd='build/mage-linux-amd64 golangCrossBuild', env=[CC=x86_64-w64-mingw32-gcc, CXX=x86_64-w64-mingw32-g++, GOARCH=amd64, GOARM=, GOOS=windows, PLATFORM_ID=windows-amd64]
[2020-04-15T10:43:26.771Z] >> Building using: cmd='build/mage-linux-amd64 buildGoDaemon', env=[CC=gcc, CXX=g++, GOARCH=amd64, GOARM=, GOOS=linux, PLATFORM_ID=linux-amd64]
[2020-04-15T10:43:26.771Z] >> Building using: cmd='build/mage-linux-amd64 buildGoDaemon', env=[CC=gcc, CXX=g++, GOARCH=386, GOARM=, GOOS=linux, PLATFORM_ID=linux-386]
[2020-04-15T10:43:29.276Z] >> Building using: cmd='build/mage-linux-amd64 golangCrossBuild', env=[CC=aarch64-linux-gnu-gcc, CXX=aarch64-linux-gnu-g++, GOARCH=arm64, GOARM=, GOOS=linux, PLATFORM_ID=linux-arm64]
[2020-04-15T10:43:29.276Z] >> Building using: cmd='build/mage-linux-amd64 golangCrossBuild', env=[CC=gcc, CXX=g++, GOARCH=386, GOARM=, GOOS=linux, PLATFORM_ID=linux-386]
[2020-04-15T10:46:05.836Z] >> Building using: cmd='build/mage-linux-amd64 golangCrossBuild', env=[CC=gcc, CXX=g++, GOARCH=amd64, GOARM=, GOOS=linux, PLATFORM_ID=linux-amd64]
[2020-04-15T10:46:19.465Z] >> Building using: cmd='build/mage-linux-amd64 golangCrossBuild', env=[CC=i686-w64-mingw32-gcc, CXX=i686-w64-mingw32-g++, GOARCH=386, GOARM=, GOOS=windows, PLATFORM_ID=windows-386]
[2020-04-15T10:47:15.806Z] >> Building using: cmd='build/mage-linux-amd64 golangCrossBuild', env=[CC=s390x-linux-gnu-gcc, CXX=s390x-linux-gnu-g++, GOARCH=s390x, GOARM=, GOOS=linux, PLATFORM_ID=linux-s390x]
[2020-04-15T10:51:47.176Z] >> Building using: cmd='build/mage-linux-amd64 buildGoDaemon', env=[CC=s390x-linux-gnu-gcc, CXX=s390x-linux-gnu-g++, GOARCH=s390x, GOARM=, GOOS=linux, PLATFORM_ID=linux-s390x]
[2020-04-15T10:51:47.176Z] >> Building using: cmd='build/mage-linux-amd64 buildGoDaemon', env=[CC=aarch64-linux-gnu-gcc, CXX=aarch64-linux-gnu-g++, GOARCH=arm64, GOARM=, GOOS=linux, PLATFORM_ID=linux-arm64]
[2020-04-15T10:51:47.176Z] >> Building using: cmd='build/mage-linux-amd64 buildGoDaemon', env=[CC=gcc, CXX=g++, GOARCH=amd64, GOARM=, GOOS=linux, PLATFORM_ID=linux-amd64]
[2020-04-15T10:51:47.177Z] >> Building using: cmd='build/mage-linux-amd64 buildGoDaemon', env=[CC=gcc, CXX=g++, GOARCH=386, GOARM=, GOOS=linux, PLATFORM_ID=linux-386]
[2020-04-15T10:51:48.682Z] >> Building using: cmd='build/mage-linux-amd64 golangCrossBuild', env=[CC=x86_64-w64-mingw32-gcc, CXX=x86_64-w64-mingw32-g++, GOARCH=amd64, GOARM=, GOOS=windows, PLATFORM_ID=windows-amd64]
[2020-04-15T10:51:48.989Z] >> Building using: cmd='build/mage-linux-amd64 golangCrossBuild', env=[CC=o64-clang, CXX=o64-clang++, GOARCH=amd64, GOARM=, GOOS=darwin, PLATFORM_ID=darwin-amd64]
[2020-04-15T10:51:49.289Z] >> Building using: cmd='build/mage-linux-amd64 golangCrossBuild', env=[CC=gcc, CXX=g++, GOARCH=amd64, GOARM=, GOOS=linux, PLATFORM_ID=linux-amd64]
[2020-04-15T10:51:49.577Z] >> Building using: cmd='build/mage-linux-amd64 golangCrossBuild', env=[CC=gcc, CXX=g++, GOARCH=386, GOARM=, GOOS=linux, PLATFORM_ID=linux-386]
[2020-04-15T10:55:11.890Z] >> Building using: cmd='build/mage-linux-amd64 golangCrossBuild', env=[CC=aarch64-linux-gnu-gcc, CXX=aarch64-linux-gnu-g++, GOARCH=arm64, GOARM=, GOOS=linux, PLATFORM_ID=linux-arm64]
[2020-04-15T10:55:39.158Z] >> Building using: cmd='build/mage-linux-amd64 golangCrossBuild', env=[CC=s390x-linux-gnu-gcc, CXX=s390x-linux-gnu-g++, GOARCH=s390x, GOARM=, GOOS=linux, PLATFORM_ID=linux-s390x]
[2020-04-15T10:55:47.588Z] >> Building using: cmd='build/mage-linux-amd64 golangCrossBuild', env=[CC=i686-w64-mingw32-gcc, CXX=i686-w64-mingw32-g++, GOARCH=386, GOARM=, GOOS=windows, PLATFORM_ID=windows-386]
[2020-04-15T11:00:17.233Z] >> Building using: cmd='build/mage-linux-amd64 buildGoDaemon', env=[CC=gcc, CXX=g++, GOARCH=amd64, GOARM=, GOOS=linux, PLATFORM_ID=linux-amd64]
[2020-04-15T11:00:17.233Z] >> Building using: cmd='build/mage-linux-amd64 buildGoDaemon', env=[CC=s390x-linux-gnu-gcc, CXX=s390x-linux-gnu-g++, GOARCH=s390x, GOARM=, GOOS=linux, PLATFORM_ID=linux-s390x]
[2020-04-15T11:00:17.233Z] >> Building using: cmd='../../heartbeat/build/mage-linux-amd64 golangCrossBuild', env=[CC=x86_64-w64-mingw32-gcc, CXX=x86_64-w64-mingw32-g++, GOARCH=amd64, GOARM=, GOOS=windows, PLATFORM_ID=windows-amd64]
[2020-04-15T11:00:17.233Z] >> Building using: cmd='../../heartbeat/build/mage-linux-amd64 golangCrossBuild', env=[CC=o64-clang, CXX=o64-clang++, GOARCH=amd64, GOARM=, GOOS=darwin, PLATFORM_ID=darwin-amd64]
[2020-04-15T11:00:19.419Z] >> Building using: cmd='build/mage-linux-amd64 golangCrossBuild', env=[CC=x86_64-w64-mingw32-gcc, CXX=x86_64-w64-mingw32-g++, GOARCH=amd64, GOARM=, GOOS=windows, PLATFORM_ID=windows-amd64]
[2020-04-15T11:00:19.420Z] >> Building using: cmd='build/mage-linux-amd64 golangCrossBuild', env=[CC=o64-clang, CXX=o64-clang++, GOARCH=amd64, GOARM=, GOOS=darwin, PLATFORM_ID=darwin-amd64]
[2020-04-15T11:04:10.993Z] >> Building using: cmd='../../heartbeat/build/mage-linux-amd64 golangCrossBuild', env=[CC=gcc, CXX=g++, GOARCH=386, GOARM=, GOOS=linux, PLATFORM_ID=linux-386]
[2020-04-15T11:04:15.760Z] >> Building using: cmd='../../heartbeat/build/mage-linux-amd64 golangCrossBuild', env=[CC=gcc, CXX=g++, GOARCH=amd64, GOARM=, GOOS=linux, PLATFORM_ID=linux-amd64]
[2020-04-15T11:04:47.868Z] >> Building using: cmd='../../heartbeat/build/mage-linux-amd64 golangCrossBuild', env=[CC=aarch64-linux-gnu-gcc, CXX=aarch64-linux-gnu-g++, GOARCH=arm64, GOARM=, GOOS=linux, PLATFORM_ID=linux-arm64]
[2020-04-15T11:05:04.160Z] >> Building using: cmd='../../heartbeat/build/mage-linux-amd64 golangCrossBuild', env=[CC=s390x-linux-gnu-gcc, CXX=s390x-linux-gnu-g++, GOARCH=s390x, GOARM=, GOOS=linux, PLATFORM_ID=linux-s390x]
[2020-04-15T11:08:25.855Z] >> Building using: cmd='build/mage-linux-amd64 golangCrossBuild', env=[CC=gcc, CXX=g++, GOARCH=386, GOARM=, GOOS=linux, PLATFORM_ID=linux-386]
[2020-04-15T11:08:47.841Z] >> Building using: cmd='build/mage-linux-amd64 golangCrossBuild', env=[CC=gcc, CXX=g++, GOARCH=amd64, GOARM=, GOOS=linux, PLATFORM_ID=linux-amd64]
[2020-04-15T11:09:34.544Z] >> Building using: cmd='build/mage-linux-amd64 golangCrossBuild', env=[CC=aarch64-linux-gnu-gcc, CXX=aarch64-linux-gnu-g++, GOARCH=arm64, GOARM=, GOOS=linux, PLATFORM_ID=linux-arm64]
[2020-04-15T11:09:47.741Z] >> Building using: cmd='../../heartbeat/build/mage-linux-amd64 golangCrossBuild', env=[CC=i686-w64-mingw32-gcc, CXX=i686-w64-mingw32-g++, GOARCH=386, GOARM=, GOOS=windows, PLATFORM_ID=windows-386]
[2020-04-15T11:11:54.243Z] >> Building using: cmd='build/mage-linux-amd64 golangCrossBuild', env=[CC=i686-w64-mingw32-gcc, CXX=i686-w64-mingw32-g++, GOARCH=386, GOARM=, GOOS=windows, PLATFORM_ID=windows-386]
[2020-04-15T11:12:01.802Z] >> Building using: cmd='build/mage-linux-amd64 buildGoDaemon', env=[CC=gcc, CXX=g++, GOARCH=386, GOARM=, GOOS=linux, PLATFORM_ID=linux-386]
[2020-04-15T11:12:04.365Z] >> Building using: cmd='build/mage-linux-amd64 golangCrossBuild', env=[CC=s390x-linux-gnu-gcc, CXX=s390x-linux-gnu-g++, GOARCH=s390x, GOARM=, GOOS=linux, PLATFORM_ID=linux-s390x]
[2020-04-15T11:13:26.020Z] >> Building using: cmd='build/mage-linux-amd64 buildGoDaemon', env=[CC=aarch64-linux-gnu-gcc, CXX=aarch64-linux-gnu-g++, GOARCH=arm64, GOARM=, GOOS=linux, PLATFORM_ID=linux-arm64]
[2020-04-15T11:17:35.398Z] >> Building using: cmd='build/mage-linux-amd64 golangCrossBuild', env=[CC=s390x-linux-gnu-gcc, CXX=s390x-linux-gnu-g++, GOARCH=s390x, GOARM=, GOOS=linux, PLATFORM_ID=linux-s390x]
[2020-04-15T11:18:24.276Z] >> Building using: cmd='build/mage-linux-amd64 golangCrossBuild', env=[CC=gcc, CXX=g++, GOARCH=amd64, GOARM=, GOOS=linux, PLATFORM_ID=linux-amd64]
[2020-04-15T11:18:24.276Z] >> Building using: cmd='../../journalbeat/build/mage-linux-amd64 golangCrossBuild', env=[CC=gcc, CXX=g++, GOARCH=386, GOARM=, GOOS=linux, PLATFORM_ID=linux-386]
[2020-04-15T11:18:24.276Z] >> Building using: cmd='build/mage-linux-amd64 golangCrossBuild', env=[CC=gcc, CXX=g++, GOARCH=386, GOARM=, GOOS=linux, PLATFORM_ID=linux-386]
[2020-04-15T11:20:42.369Z] >> Building using: cmd='build/mage-linux-amd64 golangCrossBuild', env=[CC=aarch64-linux-gnu-gcc, CXX=aarch64-linux-gnu-g++, GOARCH=arm64, GOARM=, GOOS=linux, PLATFORM_ID=linux-arm64]
[2020-04-15T11:22:49.461Z] >> Building using: cmd='../../journalbeat/build/mage-linux-amd64 golangCrossBuild', env=[CC=s390x-linux-gnu-gcc, CXX=s390x-linux-gnu-g++, GOARCH=s390x, GOARM=, GOOS=linux, PLATFORM_ID=linux-s390x]
[2020-04-15T11:23:43.333Z] >> Building using: cmd='../../journalbeat/build/mage-linux-amd64 golangCrossBuild', env=[CC=gcc, CXX=g++, GOARCH=amd64, GOARM=, GOOS=linux, PLATFORM_ID=linux-amd64]
[2020-04-15T11:24:41.950Z] >> Building using: cmd='../../journalbeat/build/mage-linux-amd64 golangCrossBuild', env=[CC=aarch64-linux-gnu-gcc, CXX=aarch64-linux-gnu-g++, GOARCH=arm64, GOARM=, GOOS=linux, PLATFORM_ID=linux-arm64]
[2020-04-15T11:24:52.326Z] >> Building using: cmd='build/mage-linux-amd64 buildGoDaemon', env=[CC=s390x-linux-gnu-gcc, CXX=s390x-linux-gnu-g++, GOARCH=s390x, GOARM=, GOOS=linux, PLATFORM_ID=linux-s390x]
[2020-04-15T11:24:54.897Z] >> Building using: cmd='build/mage-linux-amd64 buildGoDaemon', env=[CC=gcc, CXX=g++, GOARCH=386, GOARM=, GOOS=linux, PLATFORM_ID=linux-386]
[2020-04-15T11:24:57.437Z] >> Building using: cmd='build/mage-linux-amd64 buildGoDaemon', env=[CC=gcc, CXX=g++, GOARCH=amd64, GOARM=, GOOS=linux, PLATFORM_ID=linux-amd64]
[2020-04-15T11:24:59.987Z] >> Building using: cmd='build/mage-linux-amd64 buildGoDaemon', env=[CC=aarch64-linux-gnu-gcc, CXX=aarch64-linux-gnu-g++, GOARCH=arm64, GOARM=, GOOS=linux, PLATFORM_ID=linux-arm64]
[2020-04-15T11:31:30.088Z] >> Building using: cmd='build/mage-linux-amd64 buildGoDaemon', env=[CC=s390x-linux-gnu-gcc, CXX=s390x-linux-gnu-g++, GOARCH=s390x, GOARM=, GOOS=linux, PLATFORM_ID=linux-s390x]
[2020-04-15T11:31:30.088Z] >> Building using: cmd='build/mage-linux-amd64 buildGoDaemon', env=[CC=aarch64-linux-gnu-gcc, CXX=aarch64-linux-gnu-g++, GOARCH=arm64, GOARM=, GOOS=linux, PLATFORM_ID=linux-arm64]
[2020-04-15T11:31:30.088Z] >> Building using: cmd='build/mage-linux-amd64 buildGoDaemon', env=[CC=gcc, CXX=g++, GOARCH=amd64, GOARM=, GOOS=linux, PLATFORM_ID=linux-amd64]
[2020-04-15T11:31:30.088Z] >> Building using: cmd='build/mage-linux-amd64 buildGoDaemon', env=[CC=gcc, CXX=g++, GOARCH=386, GOARM=, GOOS=linux, PLATFORM_ID=linux-386]
[2020-04-15T11:31:31.895Z] >> Building using: cmd='build/mage-linux-amd64 golangCrossBuild', env=[CC=x86_64-w64-mingw32-gcc, CXX=x86_64-w64-mingw32-g++, GOARCH=amd64, GOARM=, GOOS=windows, PLATFORM_ID=windows-amd64]
[2020-04-15T11:31:31.895Z] >> Building using: cmd='build/mage-linux-amd64 golangCrossBuild', env=[CC=gcc, CXX=g++, GOARCH=amd64, GOARM=, GOOS=linux, PLATFORM_ID=linux-amd64]
[2020-04-15T11:31:32.179Z] >> Building using: cmd='build/mage-linux-amd64 golangCrossBuild', env=[CC=s390x-linux-gnu-gcc, CXX=s390x-linux-gnu-g++, GOARCH=s390x, GOARM=, GOOS=linux, PLATFORM_ID=linux-s390x]
[2020-04-15T11:31:32.179Z] >> Building using: cmd='build/mage-linux-amd64 golangCrossBuild', env=[CC=o64-clang, CXX=o64-clang++, GOARCH=amd64, GOARM=, GOOS=darwin, PLATFORM_ID=darwin-amd64]
[2020-04-15T11:36:53.973Z] >> Building using: cmd='build/mage-linux-amd64 golangCrossBuild', env=[CC=gcc, CXX=g++, GOARCH=386, GOARM=, GOOS=linux, PLATFORM_ID=linux-386]
[2020-04-15T11:37:15.932Z] >> Building using: cmd='build/mage-linux-amd64 golangCrossBuild', env=[CC=aarch64-linux-gnu-gcc, CXX=aarch64-linux-gnu-g++, GOARCH=arm64, GOARM=, GOOS=linux, PLATFORM_ID=linux-arm64]
[2020-04-15T11:37:24.636Z] >> Building using: cmd='build/mage-linux-amd64 golangCrossBuild', env=[CC=i686-w64-mingw32-gcc, CXX=i686-w64-mingw32-g++, GOARCH=386, GOARM=, GOOS=windows, PLATFORM_ID=windows-386]
[2020-04-15T11:43:27.014Z] >> Building using: cmd='../../packetbeat/build/mage-linux-amd64 golangCrossBuild', env=[CC=i686-w64-mingw32-gcc, CXX=i686-w64-mingw32-g++, GOARCH=386, GOARM=, GOOS=windows, PLATFORM_ID=windows-386]
[2020-04-15T11:43:27.014Z] >> Building using: cmd='build/mage-linux-amd64 buildGoDaemon', env=[CC=gcc, CXX=g++, GOARCH=386, GOARM=, GOOS=linux, PLATFORM_ID=linux-386]
[2020-04-15T11:43:27.279Z] >> Building using: cmd='build/mage-linux-amd64 buildGoDaemon', env=[CC=aarch64-linux-gnu-gcc, CXX=aarch64-linux-gnu-g++, GOARCH=arm64, GOARM=, GOOS=linux, PLATFORM_ID=linux-arm64]
[2020-04-15T11:43:27.279Z] >> Building using: cmd='build/mage-linux-amd64 golangCrossBuild', env=[CC=i686-w64-mingw32-gcc, CXX=i686-w64-mingw32-g++, GOARCH=386, GOARM=, GOOS=windows, PLATFORM_ID=windows-386]
[2020-04-15T11:43:27.539Z] >> Building using: cmd='build/mage-linux-amd64 buildGoDaemon', env=[CC=gcc, CXX=g++, GOARCH=amd64, GOARM=, GOOS=linux, PLATFORM_ID=linux-amd64]
[2020-04-15T11:43:27.539Z] >> Building using: cmd='build/mage-linux-amd64 buildGoDaemon', env=[CC=s390x-linux-gnu-gcc, CXX=s390x-linux-gnu-g++, GOARCH=s390x, GOARM=, GOOS=linux, PLATFORM_ID=linux-s390x]
[2020-04-15T11:45:49.679Z] >> Building using: cmd='build/mage-linux-amd64 golangCrossBuild', env=[CC=x86_64-w64-mingw32-gcc, CXX=x86_64-w64-mingw32-g++, GOARCH=amd64, GOARM=, GOOS=windows, PLATFORM_ID=windows-amd64]
[2020-04-15T11:46:02.163Z] >> Building using: cmd='../../packetbeat/build/mage-linux-amd64 golangCrossBuild', env=[CC=x86_64-w64-mingw32-gcc, CXX=x86_64-w64-mingw32-g++, GOARCH=amd64, GOARM=, GOOS=windows, PLATFORM_ID=windows-amd64]
[2020-04-15T11:48:24.606Z] >> Building using: cmd='build/mage-linux-amd64 golangCrossBuild', env=[CC=o64-clang, CXX=o64-clang++, GOARCH=amd64, GOARM=, GOOS=darwin, PLATFORM_ID=darwin-amd64]
[2020-04-15T11:48:24.606Z] >> Building using: cmd='build/mage-linux-amd64 golangCrossBuild', env=[CC=gcc, CXX=g++, GOARCH=amd64, GOARM=, GOOS=linux, PLATFORM_ID=linux-amd64]
[2020-04-15T11:48:24.606Z] >> Building using: cmd='build/mage-linux-amd64 golangCrossBuild', env=[CC=s390x-linux-gnu-gcc, CXX=s390x-linux-gnu-g++, GOARCH=s390x, GOARM=, GOOS=linux, PLATFORM_ID=linux-s390x]
[2020-04-15T11:48:24.606Z] >> Building using: cmd='build/mage-linux-amd64 golangCrossBuild', env=[CC=gcc, CXX=g++, GOARCH=386, GOARM=, GOOS=linux, PLATFORM_ID=linux-386]
[2020-04-15T11:52:41.540Z] >> Building using: cmd='build/mage-linux-amd64 golangCrossBuild', env=[CC=aarch64-linux-gnu-gcc, CXX=aarch64-linux-gnu-g++, GOARCH=arm64, GOARM=, GOOS=linux, PLATFORM_ID=linux-arm64]
[2020-04-15T11:52:49.115Z] >> Building using: cmd='../../packetbeat/build/mage-linux-amd64 golangCrossBuild', env=[CC=s390x-linux-gnu-gcc, CXX=s390x-linux-gnu-g++, GOARCH=s390x, GOARM=, GOOS=linux, PLATFORM_ID=linux-s390x]
[2020-04-15T11:52:57.588Z] >> Building using: cmd='../../packetbeat/build/mage-linux-amd64 golangCrossBuild', env=[CC=gcc, CXX=g++, GOARCH=386, GOARM=, GOOS=linux, PLATFORM_ID=linux-386]
[2020-04-15T11:53:02.372Z] >> Building using: cmd='../../packetbeat/build/mage-linux-amd64 golangCrossBuild', env=[CC=gcc, CXX=g++, GOARCH=amd64, GOARM=, GOOS=linux, PLATFORM_ID=linux-amd64]
[2020-04-15T11:57:14.075Z] >> Building using: cmd='../../packetbeat/build/mage-linux-amd64 golangCrossBuild', env=[CC=aarch64-linux-gnu-gcc, CXX=aarch64-linux-gnu-g++, GOARCH=arm64, GOARM=, GOOS=linux, PLATFORM_ID=linux-arm64]
[2020-04-15T11:58:15.176Z] >> Building using: cmd='../../packetbeat/build/mage-linux-amd64 golangCrossBuild', env=[CC=o64-clang, CXX=o64-clang++, GOARCH=amd64, GOARM=, GOOS=darwin, PLATFORM_ID=darwin-amd64]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, checking the output of one of the old jobs, the PLATFORMS env var it is ignored always build all the packages
https://beats-ci.elastic.co/job/elastic+beats+7.x+multijob-package-linux/125/console
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
neat!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To build one specific architecture you would use PLATFORMS='!defaults +linux/amd64'
.
PLATFORMS is a set that implicitly contains defaults
where defaults is (linux/amd64, linux/386, windows/amd64, windows/386, and darwin/amd64). When you use +
that adds to the set. And when you write any other specificer (e.g. darwin
) this acts as a filter to only allow platforms matching darwin
. Special sets/keywords are defaults
and all
.
For example, these are all the same. They only build packages for linux/amd64.
+all linux/amd64
- add all possible platforms, but filter down to only linux/amd64defaults linux/amd64
- add the defaults then filter down to only linux/amd64linux/amd64
-defaults
is always implicit so this just filters to only include linux/amd64!defaults +linux/amd64
- remove the defaults (leaving nothing) then add in linux/amd64
Docs: https://godoc.org/github.com/elastic/beats/dev-tools/mage#NewPlatformList
304ee6c
to
733080e
Compare
6a5df4e
to
733080e
Compare
@andrewkroh there is something weird with the windows packages, if I add the windows packages to the PLATFORMS env var they are not generated
If I do not set the PLATFORMS variable the windows packages are built.
I've checked the filter applied and it is OK https://github.com/elastic/beats/blob/master/winlogbeat/scripts/mage/package.go#L40 BTW it happens with all beat. I will keep the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great. Left a few minor comments.
I'll look into that. That's not the behavior I expected. One thing that is special about Winlogbeat is that it only builds packages for Windows so it has a built-in filter. Perhaps this is some side-effect of that. beats/winlogbeat/scripts/mage/package.go Line 40 in 98255f8
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code change LGTM. I'm good with it if there's sucessful packaging build with it.
bc4342f
to
cdcd60c
Compare
cdcd60c
to
adfa160
Compare
What does this PR do?
It split the package by architecture to build it in parallel.
Why is it important?
It will reduce the build time for packages