Skip to content

CLI tooling for extending codemagic

License

Notifications You must be signed in to change notification settings

js-soft/codemagic-tools

Repository files navigation

codemagic-tools

GitHub Actions CI npm version

Codemagic Tools is a collection of tools to be used in Codemagic CI/CD pipelines.

Installation

npm install @js-soft/codemagic-tools

Usage

Teams Messaging

Develop Messages

jscm teams-develop --platform <platform> --projectName <projectName>

This command will inform about a new development build and additionally provide a link to the build. In case of a failed build it will also provide a link to the build log.

Production Messages

jscm teams-publish --platform <platform> --projectName <projectName>

This command will inform about an app version, that was released in a store. It additionally provides a link to the build logs.

Testing

For testing a JSON like created in Codemagic is provided. Additionally a bash-script, which can be used to test the command is provided. Upon execution the test script will ask you to specify the following variables:

  • webhook - webhook url you want to send to / or just some valid https-address
  • BuildId - a string
  • ProjectId - a string
  • buildNumber - a number

After preparation of your local environment the script will execute the jscm command.

It will execute both possible command:

  • teams-develop (in failed/successful state/without artifacts)
  • teams-production (in failed/successful state/without artifacts)

→ This will result in 6(4 failed/2 successful) messages being sent to the specified teams channel.

Calling the test script

./test/test_teams_messaging.sh

License

MIT