get_last_circleci_build_number_bitbucket plugin
Getting Started
This project is a fastlane plugin. To get started with fastlane-plugin-get_last_circleci_build_number_bitbucket
, add it to your project by running:
fastlane add_plugin get_last_circleci_build_number_bitbucket
Ensure you have the following enviroment variables set:
-
CIRCLECI_TOKEN
- your circleci token you can create one by getting a token from circle ciProfile > Personal Api Tokens
-
CIRCLECI_USER_NAME
- the username which owns the project -
CIRCLECI_REPOSITORY
- the name of the repository
You should be able to find your repository name and user name on circleci when you enter into a project the url will be https://app.circleci.com/projects/project-setup/github/dawidvdh/some-project
so in this case dawidvdh
is my username and some-project
is my project.
Usage
I typical use it in a project like so:
before_all do |options, params|
Dotenv.overload '.env'
build_number = params[:build_number] || ENV["CIRCLE_BUILD_NUM"] || get_last_circleci_build_number
end
where my .env
contains CIRCLECI_TOKEN
, CIRCLECI_USER_NAME
and CIRCLECI_REPOSITORY
.
About get_last_circleci_build_number_bitbucket
Makes user of circleci gem to fetch the last build number from circleci.
Issues and Feedback
For any other issues and feedback about this plugin, please submit it to this repository.
Troubleshooting
If you have trouble using plugins, check out the Plugins Troubleshooting guide.
Using fastlane Plugins
For more information about how the fastlane
plugin system works, check out the Plugins documentation.
About fastlane
fastlane is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out fastlane.tools.