Code Monkey home page Code Monkey logo

bitrise-step-trigger-bitrise-workflow's Introduction

Trigger Bitrise workflow

Triggers workflow on bitrise.io with specified parameters

How to use this Step

Can be run directly with the bitrise CLI, just git clone this repository, cd into it's folder in your Terminal/Command Line and call bitrise run test.

Check the bitrise.yml file for required inputs which have to be added to your .bitrise.secrets.yml file!

Step by step:

  1. Open up your Terminal / Command Line
  2. git clone the repository
  3. cd into the directory of the step (the one you just git cloned)
  4. Create a .bitrise.secrets.yml file in the same directory of bitrise.yml (the .bitrise.secrets.yml is a git ignored file, you can store your secrets in it)
  5. Check the bitrise.yml file for any secret you should set in .bitrise.secrets.yml
  • Best practice is to mark these options with something like # define these in your .bitrise.secrets.yml, in the app:envs section.
  1. Once you have all the required secret parameters in your .bitrise.secrets.yml you can just run this step with the bitrise CLI: bitrise run test

An example .bitrise.secrets.yml file:

envs:
- A_SECRET_PARAM_ONE: the value for secret one
- A_SECRET_PARAM_TWO: the value for secret two

How to create your own step

  1. Create a new git repository for your step (don't fork the step template, create a new repository)
  2. Copy the step template files into your repository
  3. Fill the step.sh with your functionality
  4. Wire out your inputs to step.yml (inputs section)
  5. Fill out the other parts of the step.yml too
  6. Provide test values for the inputs in the bitrise.yml
  7. Run your step with bitrise run test - if it works, you're ready

For Step development guidelines & best practices check this documentation: https://github.com/bitrise-io/bitrise/blob/master/_docs/step-development-guideline.md.

NOTE:

If you want to use your step in your project's bitrise.yml:

  1. git push the step into it's repository
  2. reference it in your bitrise.yml with the git::PUBLIC-GIT-CLONE-URL@BRANCH step reference style:
- git::https://github.com/user/my-step.git@branch:
   title: My step
   inputs:
   - my_input_1: "my value 1"
   - my_input_2: "my value 2"

You can find more examples of step reference styles in the bitrise CLI repository.

How to contribute to this Step

  1. Fork this repository
  2. git clone it
  3. Create a branch you'll work on
  4. To use/test the step just follow the How to use this Step section
  5. Do the changes you want to
  6. Run/test the step before sending your contribution
  • You can also test the step in your bitrise project, either on your Mac or on bitrise.io
  • You just have to replace the step ID in your project's bitrise.yml with either a relative path, or with a git URL format
  • (relative) path format: instead of - original-step-id: use - path::./relative/path/of/script/on/your/Mac:
  • direct git URL format: instead of - original-step-id: use - git::https://github.com/user/step.git@branch:
  • You can find more example of alternative step referencing at: https://github.com/bitrise-io/bitrise/blob/master/_examples/tutorials/steps-and-workflows/bitrise.yml
  1. Once you're done just commit your changes & create a Pull Request

Share your own Step

You can share your Step or step version with the bitrise CLI. If you use the bitrise.yml included in this repository, all you have to do is:

  1. In your Terminal / Command Line cd into this directory (where the bitrise.yml of the step is located)
  2. Run: bitrise run test to test the step
  3. Run: bitrise run audit-this-step to audit the step.yml
  4. Check the share-this-step workflow in the bitrise.yml, and fill out the envs if you haven't done so already (don't forget to bump the version number if this is an update of your step!)
  5. Then run: bitrise run share-this-step to share the step (version) you specified in the envs
  6. Send the Pull Request, as described in the logs of bitrise run share-this-step

That's all ;)

bitrise-step-trigger-bitrise-workflow's People

Contributors

godrei avatar koral-- avatar lpusok avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bitrise-step-trigger-bitrise-workflow's Issues

Unable to export BITRISE_GIT_COMMIT to next workflow

Im using the following from primary workflow,
hoping to override the commit hash in the workflow its triggering:

   - [email protected]:
        inputs:
        - exported_environment_variable_names: DEPLOY_ENV|BITRISE_GIT_COMMIT
        - api_token: "$BITRISE_API_TOKEN"
        - workflow_id: deploy_to_env

I see DEPLOY_ENV being sent through ok, but BITRISE_GIT_COMMIT doesn't override input variables of the workflow thats triggered.
Whats the best way to trigger a new workflow with a commit hash?

Could not send request, error: invalid character 'A' looking for beginning of value

When using the trigger-bitrise-workflow I receive the following error for a few PRs-

Build Trigger API HTTP response status: 500 Internal Server Error
Could not send request, error: invalid character 'A' looking for beginning of value

From some investigation, it seems like it might be related to needing to escape the CommitMessage param being passed. It only happens for certain CommitMessages and I've included a sample below which causes the 500. I've tried checking out bitrise-step-trigger-bitrise-workflow to fix, but can't get the bitrise run test to work.

- CommitMessage: Update dependency eslint-plugin-react to v7.7.0
This Pull Request updates dependency [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react) from `v7.6.1` to `v7.7.0`
<details>
<summary>Release Notes</summary>
### [`v7.7.0`](https://github.com/yannickcr/eslint-plugin-react/blob/master/CHANGELOG.md#770---2018-02-19)
##### Added
* [`forbid-foreign-prop-types`][]: add `allowInPropTypes` option ([#1655][] @iansu)
* Add [`jsx-max-depth`][] rule ([#1260][] @chriswong)
##### Fixed
* [`no-access-state-in-setstate`][]: Exclude references to this.state in setState callback ([#1610][] @pfhayes)
* [`no-danger-with-children`][]: prevent infinite loop ([#1571][] @ljharb)
* [`sort-prop-types`][]: Fix sortShapeProp when shape is not an object literal ([#1669][] @justinanastos)
* [`jsx-child-element-spacing`][]: fix error location ([#1666][] @pfhayes)
* [`no-unused-prop-types`][]: fix for createClass ([#1675][] @yuri-sakharov)
* [`prop-types`][]: include nextProps checking in shouldComponentUpdate ([#1690][] @amerryma)
* [`jsx-curly-spacing`][]: refactor to fix start and end-braces in a single pass ([#1414][] @s-h-a-d-o-w)
##### Changed
* [`jsx-child-element-spacing`][]: add missing docs ([#1665][] @pfhayes); fix docs ([#1670][] @SammyM)
[7.7.0]: https://github.com/yannickcr/eslint-plugin-react/compare/v7.6.1...v7.7.0
[#1690]: https://github.com/yannickcr/eslint-plugin-react/pull/1690
[#1675]: https://github.com/yannickcr/eslint-plugin-react/pull/1675
[#1670]: https://github.com/yannickcr/eslint-plugin-react/pull/1670
[#1669]: https://github.com/yannickcr/eslint-plugin-react/pull/1669
[#1666]: https://github.com/yannickcr/eslint-plugin-react/pull/1666
[#1655]: https://github.com/yannickcr/eslint-plugin-react/pull/1655
[#1610]: https://github.com/yannickcr/eslint-plugin-react/pull/1610
[#1414]: https://github.com/yannickcr/eslint-plugin-react/pull/1414
[#1260]: https://github.com/yannickcr/eslint-plugin-react/pull/1260
[#1571]: https://github.com/yannickcr/eslint-plugin-react/issue/1571
---
</details>
<details>
<summary>Commits</summary>
#### v7.7.0
-   [`cfd3959`](https://github.com/yannickcr/eslint-plugin-react/commit/cfd3959ff8e3b11262b0006dff28d0c957b282a2) [Docs] add `jsx-child-element-spacing`
-   [`70e8a02`](https://github.com/yannickcr/eslint-plugin-react/commit/70e8a023ee6d37ccd090161a747a8c35ca78081c) Merge pull request [#1610](https://github.com/yannickcr/eslint-plugin-react/issues/1610) from pfhayes/setstate
-   [`5e1a64c`](https://github.com/yannickcr/eslint-plugin-react/commit/5e1a64c14f8fda5e186991b1e09a55f476a64e27) [Fix] `no-danger-with-children`: prevent infinite loop
-   [`d8dff26`](https://github.com/yannickcr/eslint-plugin-react/commit/d8dff2639d7085ccbf9dd52d027e787f1494c962) test(sort-prop-types) Add failing test for when `sortShapeProp` is true and shape not object literal
-   [`17ac433`](https://github.com/yannickcr/eslint-plugin-react/commit/17ac433b4d97659b74cf682b7e79d48542a13822) fix(sort-prop-types): Fix sortShapeProp when shape is not an object literal
-   [`d818f2b`](https://github.com/yannickcr/eslint-plugin-react/commit/d818f2b87eb4edd0ecbb4f3839389e75cc38bc00) Merge pull request [#1669](https://github.com/yannickcr/eslint-plugin-react/issues/1669) from justinanastos/fix/sort-prop-types-shape-no-properties-1668
-   [`05c49d4`](https://github.com/yannickcr/eslint-plugin-react/commit/05c49d4d322f255fbdc304a7593a1471dd0a781a) [Fix] `jsx-child-element-spacing`: fix error location
-   [`2839b5d`](https://github.com/yannickcr/eslint-plugin-react/commit/2839b5d4c618450d094ab9715a95eff7b7e30942) Fix an issue with the documentation for 'jsx-child-element-spacing'
-   [`d318e52`](https://github.com/yannickcr/eslint-plugin-react/commit/d318e52826d27b291edad0bf9dca0d3f09ea01aa) Remove failing test for renamed React import
-   [`dda03e9`](https://github.com/yannickcr/eslint-plugin-react/commit/dda03e934468f4b2b6f088146e070296a64ae463) Created test
-   [`78e2951`](https://github.com/yannickcr/eslint-plugin-react/commit/78e29517a285d905f109b62dccab0f76d10dc219) Fixed bug
-   [`b1444be`](https://github.com/yannickcr/eslint-plugin-react/commit/b1444be8dd8dc56a5936e540487dc2e8e3eb0d3b) Added more tests
-   [`24658b5`](https://github.com/yannickcr/eslint-plugin-react/commit/24658b56968d25c1b0fb4f3f238c7abbf4f4b5ba) Added more valid tests
-   [`3d83d13`](https://github.com/yannickcr/eslint-plugin-react/commit/3d83d13fe1900c8b16f7f65019e38d83e98746e5) Added more tests
-   [`fb2fefd`](https://github.com/yannickcr/eslint-plugin-react/commit/fb2fefd05cd28f0f4f021d82a26b7bb0105e4637) Merge pull request [#1675](https://github.com/yannickcr/eslint-plugin-react/issues/1675) from yuri-sakharov/fix/react-no-unused-prop-types
-   [`90e3767`](https://github.com/yannickcr/eslint-plugin-react/commit/90e3767221a59f85f6f31e54f4a0c9d67be120c1) Update no-unused-prop-types rule for new React class component lifecycles
-   [`c0c7ce0`](https://github.com/yannickcr/eslint-plugin-react/commit/c0c7ce0847ce4cc3d5cae927792835d9c9ad120e) Update no-unused-prop-types rule to be aware of 16.3 lifecycle changes
-   [`352642f`](https://github.com/yannickcr/eslint-plugin-react/commit/352642ff43d77368dfc1b54b3206cdab37c0df46) Add common use-case tests and fix bugs
-   [`830fc3d`](https://github.com/yannickcr/eslint-plugin-react/commit/830fc3d4a05d341234b6c0954b91e7938ca2ff4f) Fix lint errors
-   [`0f480f6`](https://github.com/yannickcr/eslint-plugin-react/commit/0f480f63600d6e8f4aae04196e0672609eae7bed) Add commented-out createClass tests
-   [`0e2e046`](https://github.com/yannickcr/eslint-plugin-react/commit/0e2e0463cb73663d7d2ead66b7418c574ffd9704) [Dev Deps] update `babel-eslint`, `eslint`, `istanbul`, `mocha`
-   [`abe8381`](https://github.com/yannickcr/eslint-plugin-react/commit/abe8381c0d6748047224c430ce47f02e40160ed0) Update CHANGELOG and bump version
</details>
---
This PR has been generated by [Renovate Bot](https://renovateapp.com).
 - WorkflowID: android
 - BranchDest: master

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.