Koha Test Wiki Canasta - March 2024
One of a series of test instances for migrating the Koha Wiki MediaWiki database.
For the current Koha Wiki, visit https://wiki.koha-community.org .Using Travis CI to build and release plugins
Jump to navigation
Jump to search
Building and deploying plugins using Travis CI
Using Travis CI to automate your plugins is easy! Follow these steps:
- You will need to copy the following files from the Kitchen Sink plugin, if you are using the Kitchen Sink as the base for your plugin, proceed to step 2!
- .travis.yml
- deploy.sh
- gulpfile.js
- increment_version.js
- package-lock.json
- package.json
- Edit those files and replace all references to the Kitchen Sink plugin and GitHub repository with your own
- Set the current and previous version in package.json to the version set in your plugin pm file.
- In your pm file
- Replace the actual version with "{VERSION}", like so: our $VERSION = "{VERSION}";
- Change the date_updated to "1900-01-01", like so: date_updated => "1900-01-01",
- Commit the new files and changes to your module file, but don't push to your GitHub repo just yet
- Browse to https://github.com/settings/tokens and create a new GitHub token with the scope of 'repo'
- Save the resultant token for later in these instructions
- Browse to https://travis-ci.org/ and connect your GitHub account to Travis CI
- In Travis CI
- Locate the "Search all repositories" search box in the upper left, type in the name of your Github Repo
- Choose to "Activate repository" for Travis CI
- Once, activated, choose "Settings" under "More options" in the upper right
- Turn on "Build only if .travis.yml is present"
- Create a new environment variable named "GITHUB_TOKEN"
- Paste the GitHub token value into the "Value" field
- Ensure "Display value in build log" is off. It should be off by default
- Click the 'Add' button to save the environment variable
- Push the new commit you made in your plugin to your GitHub repo
- Wait a bit, within a minute or so you should see a build kick off on https://travis-ci.org/
- Once it has completed, check the releases page for your plugin on GitHub, you should now see a shiny new release!
If at any time, you want to push a commit to your repo without trigging a new release, just follow the instructions here: https://docs.travis-ci.com/user/customizing-the-build/#Skipping-a-build