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

[CI] Automate release to GitHub #122

Merged
merged 4 commits into from
Aug 20, 2020

Conversation

v1v
Copy link
Member

@v1v v1v commented Aug 12, 2020

What

  • Automate the release process to be tag-based, with the format v[0-9]*
  • Makefile changed to drive the release automation.
    • Will create a release based on the given tag.
    • Will upload all the artifacts.
  • Timeout for the build/test of one hour and timeout for the release of 12 hours. See 3af5924, it does ntohing but adding a new parent stage for all the build/test stages.
  • Notify when the tag is ready to be released with an email.
  • Gatekeeper based, so it requires an input approval to be able to do the release.
  • Using https://github.com/github-release/github-release to access the GH release/upload asserts.

Tests

required to run the build and generate package goals.

## change USER=elastic for USER=v1v in .ci/release.sh
## export your GITHUB token
export GITHUB_TOKEN=****
## Create a release for the tag 1.4
TAG_NAME=1.4 make -f .ci/Makefile release
+ USER=v1v
+ REPO=apm-agent-php
+ go get github.com/github-release/github-release
+ github-release release --user v1v --repo apm-agent-php --tag 1.4
+ for package in build/packages/*
++ basename build/packages/apm-agent-php-0.1_preview-1.noarch.rpm
+ name=apm-agent-php-0.1_preview-1.noarch.rpm
+ github-release upload --user v1v --repo apm-agent-php --tag 1.4 --name apm-agent-php-0.1_preview-1.noarch.rpm --file build/packages/apm-agent-php-0.1_preview-1.noarch.rpm
+ for package in build/packages/*
++ basename build/packages/apm-agent-php-0.1_preview-1.noarch.rpm.sha512
+ name=apm-agent-php-0.1_preview-1.noarch.rpm.sha512
+ github-release upload --user v1v --repo apm-agent-php --tag 1.4 --name apm-agent-php-0.1_preview-1.noarch.rpm.sha512 --file build/packages/apm-agent-php-0.1_preview-1.noarch.rpm.sha512
+ for package in build/packages/*
++ basename build/packages/apm-agent-php.tar
+ name=apm-agent-php.tar
+ github-release upload --user v1v --repo apm-agent-php --tag 1.4 --name apm-agent-php.tar --file build/packages/apm-agent-php.tar
+ for package in build/packages/*
++ basename build/packages/apm-agent-php.tar.sha512
+ name=apm-agent-php.tar.sha512
+ github-release upload --user v1v --repo apm-agent-php --tag 1.4 --name apm-agent-php.tar.sha512 --file build/packages/apm-agent-php.tar.sha512
+ for package in build/packages/*
++ basename build/packages/apm-agent-php_0.1-preview_all.deb
+ name=apm-agent-php_0.1-preview_all.deb
+ github-release upload --user v1v --repo apm-agent-php --tag 1.4 --name apm-agent-php_0.1-preview_all.deb --file build/packages/apm-agent-php_0.1-preview_all.deb
+ for package in build/packages/*
++ basename build/packages/apm-agent-php_0.1-preview_all.deb.sha512
+ name=apm-agent-php_0.1-preview_all.deb.sha512
+ github-release upload --user v1v --repo apm-agent-php --tag 1.4 --name apm-agent-php_0.1-preview_all.deb.sha512 --file build/packages/apm-agent-php_0.1-preview_all.deb.sha512

See https://github.com/v1v/apm-agent-php/releases/tag/1.4

Use case

When a tag was created with the format v[0-9]* from a particular commit from the master branch,
Then the CI pipeline will be in charge to release it.

Issues

Related #10

@v1v v1v requested review from SergeyKleyman and a team August 12, 2020 12:37
@v1v v1v self-assigned this Aug 12, 2020
@apmmachine
Copy link
Contributor

apmmachine commented Aug 12, 2020

💚 Build Succeeded

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #122 updated]

  • Start Time: 2020-08-19T12:55:28.027+0000

  • Duration: 20 min 3 sec

Test stats 🧪

Test Results
Failed 0
Passed 195
Skipped 0
Total 195

…utomation-tag-based

* upstream/master:
  Support APK with FPM (elastic#92)
  Add ENVIRONMENT configuration option
  Change composer installation in docker (elastic#128)
  Add tests/APM_Agents_shared directory
@v1v v1v merged commit 8eccf0b into elastic:master Aug 20, 2020
@v1v v1v deleted the feature/release-automation-tag-based branch September 16, 2020 12:16
v1v added a commit to v1v/apm-agent-php that referenced this pull request Sep 21, 2020
It was disabled accidentally in elastic#122
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.

5 participants