Giter Site home page Giter Site logo

apimap-plugin's Introduction

Apimap.io Jenkins Plugin

๐ŸŽ‰ Welcome ๐ŸŽ‰

This is a part of the Apimap.io project https://github.com/apimap, a freestanding solution to keep track of all functionality a company provides through an API. It is a push based system, connected with your build pipeline or manually updated using our CLI.

Application programming interface (API): Point of functional integration between two or more systems connected through commonly known standards

Why is this project useful? Lost track of all the API functionality provided inside your organization? Don't want to be tied to an API proxy or management solution? The Apimap.io project uploads, indexes and enables discoverability of all your organizations APIs. We care about the source code, removing the limitation of where the API is hosted and how your network is constructed.

Table of Contents

I want to know more of the technical details and implementation guides: DEVELOPER.md

Project Components


This is a complete software solution consisting of a collection of freestanding components. Use only the components you find useful, create the rest to custom fit your organization.

  • A Developer Portal with wizards and implementation information
  • A Discovery Portal to display APIs and filter search results
  • An API to accommodate all the information
  • A Jenkins plugin to automate information parsing and upload
  • A CLI to enable manual information uploads

Build and Run


This is the Jenkins plugin, created to automatically upload metadata and taxonomy files.

Jenkinsfile

The following is an example of how to use the plugin inside a Jenkinsfile

Default values (used if not overwritten when used)

The plugin is configured by default with the following values. If a value is not overwritten with another value the defaults will be used.

Argument Default Value
metadataFile "apimap/metadata.apimap"
taxonomyFile "apimap/taxonomy.apimap"
readmeFile "README.md"
changelogFile "CHANGELOG.md"
repositoryURL empty

Pipeline as Code

The following example show how to use the plugin in a Pipeline as Code environment.

pipeline {
    agent any
    stages{
        stage('Get source'){
            steps{
                git 'https://....'
            }
        }
        stage('Validate'){
            steps{
                script{
                    def result = validateAPI metadataFile: 'apimap/metadata.apimap', 
                            taxonomyFile: 'apimap/taxonomy.apimap'
                    
                    echo result.getDescription()
                }
            }
        }
        stage('Publish'){
            steps{
                script{
                    def result = publishAPI metadataFile: 'apimap/metadata.apimap',
                            taxonomyFile: 'apimap/taxonomy.apimap',
                            readmeFile: 'README.md',
                            changelogFile: 'CHANGELOG.md',
                            repositoryURL: scm.getUserRemoteConfigs()[0].getUrl()

                    echo result.getStatus().toString()
                    echo result.getDescription()
                    echo result.getToken()
                }
            }
        }
    }
}

Build JAR

Based on Java the easiest way to build the artifact is using package

mvnw package

If you build this component on anything newer than Java 8, please add the following parameter. This is due to a limitation in one of the jenkins dependencies.

-Dmaven.test.skip

Requirements

Java version 8 or newer.

Contributing


Read howto contribute to this project.

apimap-plugin's People

Contributors

magnus-sulland-telenor avatar msulland avatar

Watchers

 avatar  avatar

apimap-plugin's Issues

Broken pom.xml

Jenkins and plugins versions report

n/a

What Operating System are you using (both controller, and any agents involved in the problem)?

n/a

Reproduction steps

Look at the pom.xml of this plugin.

Expected Results

See revision and changelist properties per https://www.jenkins.io/doc/developer/publishing/releasing-cd/ and/or https://github.com/jenkinsci/incrementals-tools/

Actual Results

You don't.

Anything else?

You just published the version ${revision}19.v56b_f33268c67 of your plugin because of this (which gets filtered out because of the unexpected value).

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.