Skip to content
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

chore: new build process #492

Merged
merged 20 commits into from
Aug 6, 2018
Merged

chore: new build process #492

merged 20 commits into from
Aug 6, 2018

Conversation

hacdias
Copy link
Member

@hacdias hacdias commented Aug 5, 2018

Please read #399 before any of the following conversations.

.travis.yml Outdated
provider: releases
api_key:
secure: fEJu6vcxplTZ3ZR/fALLBp4mPWViIba4aeoiwNVJ9zqKmiZ5KG0pRqTMyevt8JUlR9yW0QNAfzkpd+wCqBHVWKIOy9Sy1Ocp3D0TY23ZAV29qKWwON9alBPqs6X6v6FiO0JFf5tARd+bpTmB3gFEUL1AGJ/UADv15fjwTERWlueloP6jmUCTCZEaTxkwrWxM8eBcMb3RlQykVKCMAZ5lGILWEKvJ8eBA7eP6GQtscCyS4tud+UWUb60VAufSPFv5K99dapm/1EXTTjgbtiY/zPP6FigR2RN/F6U0IUeEZbmftWcuDsp6lG4qInfwB1wK22F62KV193h8kgFDd8fB3hZuBVqBMtCxhuDFUFpULo2nAK8yyJP4/nc8SejHTxgFmIMhnUxLcE0om0E6bD6dFGNON08Bb/DheIvTzJSl44x6BomC/6xKKUp/GI6jGIxhV7YuWSJB4V3/5kG2ePbjEn/L+9BLY6L0kY7eea31xpSdDk881p0NOCN0lrD8RcDFf9qBtVhsh/RG2nbloC9mJI1iLTX/JRK4Rg1FROtsOE7PWPy3DbDB1rEweea2qahIbThbvfYbIhCYi0Oly6aeSJYfphQFY/hyNNrZZmWCq9gejVZelLDiYEV8Zkorhn4i/hPQ13nkVn1Rbd8jacoM1i3M4S4hkhjzlBIB+N2qudE=
file: "dist/*.tar.gz"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be everything on dist, even the checksums and *.zip.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. I replaced it with dist/*.*. This will include CHANGELOG.md and config.yaml too. Is it ok?

$ ls dist/*.*
dist/CHANGELOG.md                        dist/linux-armv5-filebrowser.tar.gz
dist/config.yaml                         dist/linux-armv6-filebrowser.tar.gz
dist/darwin-amd64-filebrowser.tar.gz     dist/linux-armv7-filebrowser.tar.gz
dist/dragonfly-amd64-filebrowser.tar.gz  dist/netbsd-386-filebrowser.tar.gz
dist/filebrowser_0.0.0_checksums.txt     dist/netbsd-amd64-filebrowser.tar.gz
dist/freebsd-386-filebrowser.tar.gz      dist/openbsd-386-filebrowser.tar.gz
dist/freebsd-amd64-filebrowser.tar.gz    dist/openbsd-amd64-filebrowser.tar.gz
dist/linux-386-filebrowser.tar.gz        dist/solaris-amd64-filebrowser.tar.gz
dist/linux-amd64-filebrowser.tar.gz      dist/windows-386-filebrowser.zip
dist/linux-arm64-filebrowser.tar.gz      dist/windows-amd64-filebrowser.zip
$ tree dist
dist
├── CHANGELOG.md
├── config.yaml
├── darwin-amd64-filebrowser.tar.gz
├── dragonfly-amd64-filebrowser.tar.gz
├── filebrowser_0.0.0_checksums.txt
├── freebsd-386-filebrowser.tar.gz
├── freebsd-amd64-filebrowser.tar.gz
├── linux-386-filebrowser.tar.gz
├── linux-amd64-filebrowser.tar.gz
├── linux-arm64-filebrowser.tar.gz
├── linux-armv5-filebrowser.tar.gz
├── linux-armv6-filebrowser.tar.gz
├── linux-armv7-filebrowser.tar.gz
├── netbsd-386-filebrowser.tar.gz
├── netbsd-amd64-filebrowser.tar.gz
├── openbsd-386-filebrowser.tar.gz
├── openbsd-amd64-filebrowser.tar.gz
├── solaris-amd64-filebrowser.tar.gz
├── windows-386-filebrowser.zip
├── windows-amd64-filebrowser.zip
├── darwin_amd64
│   └── filebrowser
├── dragonfly_amd64
│   └── filebrowser
├── freebsd_386
│   └── filebrowser
├── freebsd_amd64
│   └── filebrowser
├── linux_386
│   └── filebrowser
├── linux_amd64
│   └── filebrowser
├── linux_arm_5
│   └── filebrowser
├── linux_arm_6
│   └── filebrowser
├── linux_arm64
│   └── filebrowser
├── linux_arm_7
│   └── filebrowser
├── netbsd_386
│   └── filebrowser
├── netbsd_amd64
│   └── filebrowser
├── openbsd_386
│   └── filebrowser
├── openbsd_amd64
│   └── filebrowser
├── solaris_amd64
│   └── filebrowser
├── windows_386
│   └── filebrowser.exe
└── windows_amd64
    └── filebrowser.exe

@eine eine force-pushed the chore/build branch 4 times, most recently from 2d73cde to 245ba6f Compare August 6, 2018 03:44
@eine eine force-pushed the chore/build branch 2 times, most recently from e4c9cb8 to 5e5e3e6 Compare August 6, 2018 11:48
@eine
Copy link
Contributor

eine commented Aug 6, 2018

The current tagging/CI proposal is as follows:

  • Some maintainer/user needs to manually tag a commit in filebrowser/frontend (which is a submodule of filebrowser/filebrowser).
  • Then, he/she executes build/release.sh in filebrowser/filebrowser:
    • If the requested tag/semver exists in frontend, it is checked out. If not, it exits.
    • The version is substituted in filebrowser/filebrowser/filebrowser.go.
    • A commit is added.
    • The commit is tagged.
    • The tag is pushed.

When a tag is pushed to filebrowser/filebrowser, if the test stage in travis-ci is successful, a deployment stage is executed. In this one, the release binaries are built with goreleaser and rice-box is pushed to filebrowser/caddy with build/push_ricebox.sh:

  • A branch named update-rice-box is created from master.
  • assets/rice-box.go is replaced.
  • A commit is added.
  • The commit is tagged.
  • The branch and tag are pushed to filebrowser/caddy.

A maintainer is required in order to merge/squash/rebase this single commit to master.


Furthermore, a PR could be automatically created by using the GitHub REST API: https://developer.github.com/v3/pulls/#create-a-pull-request. However, although creating the PR is quite easy, handling the authentication seems to be not so straightforward: https://developer.github.com/v3/auth/. Therefore, I prefer to keep it apart from this PR.


@hacdias, please let know if you find any pending work to be done here.

@hacdias
Copy link
Member Author

hacdias commented Aug 6, 2018

Awesome!

@hacdias hacdias merged commit 8ad626b into master Aug 6, 2018
@hacdias
Copy link
Member Author

hacdias commented Aug 6, 2018

🚀🚀 👏 👏 👏 👏 👏 👏 👏 👏 👏 👏 👏 👏 🚀🚀

Huge thanks! 😄

@hacdias hacdias deleted the chore/build branch August 6, 2018 19:44
@hacdias
Copy link
Member Author

hacdias commented Aug 6, 2018

@1138-4eb could you just take a look at why it failed deploying? https://travis-ci.com/filebrowser/filebrowser/jobs/138442868#L584

@eine
Copy link
Contributor

eine commented Aug 6, 2018

Sure. I'll check it now.

EDIT

It is fixed. It was a quite stupid error on my side: travis-ci/travis-ci#7641

eine pushed a commit to filebrowser/community that referenced this pull request Aug 7, 2018
eine pushed a commit to filebrowser/community that referenced this pull request Aug 7, 2018
@eine eine mentioned this pull request Aug 8, 2018
hacdias added a commit that referenced this pull request May 11, 2019
chore: new build process
Former-commit-id: 5c703aea976d95470a5f427a2c2d7b15d08c0e9e [formerly 326fcdd2d11d414c557986c74ec343d5c2221168] [formerly 7a5991c0e85806e82256b201b515a070e0e95ec9 [formerly 8ad626b]]
Former-commit-id: f78d78c109181cd9c52bd91753d4e39e8f65e077 [formerly 05e6b729485ddfa48ad428c389bd85d8ab11f366]
Former-commit-id: e91d24edfdff15c075e4f980a88b3dc8cf9d5254
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants