Giter VIP home page Giter VIP logo

spring5-kotlin's Introduction

spring5-kotlin

DEPRECATED The Atomist generators in this repository have been updated and moved to other repositories. The latest Spring Java and Kotlin generators can be found in atomist/spring-automation. The latest automation generators can be found in atomist/node-automation.


This repository contains examples demonstrating use of the Atomist API. You will find examples illustrating:

  • Creating bot commands using command handlers

These examples use the @atomist/automation-client node module to implement a local client that connects to the Atomist API.

Prerequisites

Enroll the Atomist bot in your Slack team

Add to Slack

Node.js

You will need to have Node.js installed. To verify that the right versions are installed, please run:

$ node -v
v8.4.0
$ npm -v
5.4.1

Cloning the repository and installing dependencies

To get started run the following commands to clone the project, install its dependencies, and build the project:

$ git clone [email protected]:atomist/automation-seed-ts.git
$ cd automation-seed-ts
$ npm install
$ npm run build

Configuring your environment

If this is the first time you will be running an Atomist API client locally, you should first configure your system using the atomist-config script:

$ `npm bin`/atomist-config [SLACK_TEAM_ID]

The script does two things: records what Slack team you want your automations running in and creates a GitHub personal access token with "read:org" scope.

You must run the automations in a Slack team of which you are a member. You can get your Slack team ID by typing team in a DM to the Atomist Bot. If you do not supply the Slack team ID on the command line, the script will prompt you to enter it.

The atomist-config script will prompt you for your GitHub credentials. It needs them to create the GitHub personal access token. Atomist does not store your credentials and only writes the token to your local machine.

The Atomist API client sends GitHub personal access token when connecting to the Atomist API. The Atomist API will use the token to confirm you are who you say you are and are in a GitHub org connected to the Slack team in which you are running the automations.

Starting up the automation-client

To start the client, run the following command:

$ npm run autostart

Invoking a command handler from Slack

This project contains the code to generate a new Spring 5 Kotlin project by running the generate spring-boot kotlin command. The code that defines the bot command and implements responding to the command, i.e., the command handler, can be found in KotlinSpring5.ts. Once you have your local automation client running (the previous step in this guide), you can invoke the command handler by sending the Atomist bot the command in the #general channel of the [atomist-playground Slack team][play-slack]:

@atomist generate spring-boot kotlin

Once you've submitted the command in Slack, you'll see the incoming and outgoing messages show up in the logs of your locally running automation-client. Ultimately, you should see the response from the bot in Slack.

Support

General support questions should be discussed in the #support channel in our community Slack team at atomist-community.slack.com.

If you find a problem, please create an issue.

Development

You will need to install node to build and test this project.

Build and Test

Command Description
npm install to install all the required packages
npm start to start the Atomist automation client
npm run autostart run the client, refreshing when files change
npm run lint to run tslint against the TypeScript
npm run compile to compile all TypeScript into JavaScript
npm test to run tests and ensure everything is working
npm run autotest run tests continuously
npm run clean remove stray compiled JavaScript files and build directory

Release

To create a new release of the project, simply push a tag of the form M.N.P where M, N, and P are integers that form the next appropriate semantic version for release. The version in the package.json must be the same as the tag. For example:

$ git tag -a 1.2.3
$ git push --tags

The Travis CI build (see badge at the top of this page) will publish the NPM module and automatically create a GitHub release using the tag name for the release and the comment provided on the annotated tag as the contents of the release notes.


Created by Atomist. Need Help? Join our Slack team.

spring5-kotlin's People

Contributors

cdupuis avatar ddgenome avatar jrday avatar

Stargazers

Kieran Bristow avatar Dan Minshew avatar Dmitriy Kopylenko avatar

Watchers

 avatar James Cloos avatar Jim Clark avatar

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.