{jenkins-plugin-info:oracle-cloud-infrastructure-compute}

Oracle Cloud Infrastructure Compute Plugin allows users to access and manage cloud resources on the Oracle Cloud Infrastructure (OCI) from Jenkins.
A Jenkins master instance with Oracle Cloud Infrastructure Compute Plugin can spin up instances (slaves or agents) on demand within OCI, and remove the instances and free its resources automatically once the Job completes.

Features

Oracle Cloud Infrastructure Compute Plugin provides functionality to dynamically allocate OCI resources for continuous integration tasks, and to bring up and down services or nodes as required to serve Jenkins Build Jobs.
After installing the Oracle Cloud Infrastructure Compute Plugin, you can add an OCI Cloud(s) and Template(s) with the preferred instance configuration. The Template will have a Label that you can use in your Jenkins Job. Multiple Templates are supported. The Template options include Labels, Domains, Credentials, Shapes, Images, Virtual Cloud Network, etc.
After your Jenkins Job completes the instance is cleanly removed and resources are released back to the OCI pool.

Prerequisites

1. Oracle Cloud Account. To sign up, visit Oracle Cloud.
2. Jenkins installed with JDK 8 or higher.

Compatibility

1. Plugin is tested on minimum Jenkins version 1.625.3, it may not work with versions early than 1.554.
2. For Jenkins versions between 1.554 and 1.625, pre-install 'bouncycastle API Plugin' plugin.

Installation

The Oracle Cloud Infrastructure Compute Plugin is available via Jenkins Update Center or can be installed manually.

To install the plugin through Jenkins Update Center navigate to Manage Jenkins > Manage Plugins > Available, and search "Oracle Cloud Infrastructure Compute Plugin"

To build the plugin from repos, OCI Java SDK is required. OCI Java SDK is currently not published to Maven center. To compile and build the plugin, first install OCI Java SDK to the local Maven repository. Refer to OCI Java SDK licensing here.

Installing OCI Java SDK (Github)

$ git clone https://github.com/oracle/oci-java-sdk
$ cd oci-java-sdk
$ mvn compile install

Manually Building and Installing Plugin

1. git clone repo 
2. Update pom.xml with OCI Java SDK you have installed

```
     <oci-java-sdk.version>1.2.34</oci-java-sdk.version>
 ```

3. Compile and Install package

$ mvn package

4. Install hpi:
    - Manage Jenkins > Manage Plugins > Click the Advanced tab > Upload Plugin section, click Choose File > Click Upload
or
    - Copy the downloaded .hpi file into the JENKINS_HOME/plugins directory on the Jenkins master

Configuration

Add New Cloud

  1. From Jenkins Server console, click Manage Jenkins > Configure System
  2. In Cloud section, click Add a new cloud and select Oracle Cloud Infrastructure Compute
  3. Enter credentials to access your OCI account. You can create multiple Clouds.
  4. Click Test Connection to verify that Jenkins can successfully connect to the Oracle Cloud Infrastructure Service.
  5. Click Advanced and if required, enter a number in the Instance Cap field to limit the maximum number of instances that can be created for this Cloud configuration.

Add New Template

  1. Click Add in Instance Templates section to add the OCI configuration. You can add multiple Templates to a Cloud configuration.

  2. Input or select values in the 'Instance Template' section:

  3. Click Verify SSH Key Pair to verify the public key and private key entered are a match.

  4. Click Advanced for more configuration options:

  5. Click Save or Apply

Licensing

Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.

This plugin is licensed under the Universal Permissive License 1.0

This software is dual-licensed to you under the Universal Permissive License (UPL) and Apache License 2.0.

See LICENSE.txt for more details.

Changelog

For Changelog, please refer to CHANGELOG.md.

Contributing

Oracle Cloud Infrastructure Compute Plugin is an open source project. See CONTRIBUTING.md for more details.

Oracle gratefully acknowledges the contributions to Oracle Cloud Infrastructure Compute Plugin that have been made by the community.