CI/CD Automation for Fn Project with Oracle FaaS and Developer Cloud Service

March 1, 2019 | 3 minute read
Shay Shmeltzer
Director of Product Management - Oracle
Text Size 100%:

By this time you probably seen multiple blogs about the Fn Project - an open-source, multi-languages, container-native serverless platform. And you might have already heard that Oracle is going to offer a cloud hosted Function as a Service (FaaS) for Fn-based functions called Oracle Functions - currently in limited access (get your invite to try it out here).

So how do you create an automated CI/CD chain for your Fn functions?

Oracle Developer Cloud Service now provides built-in functionality to support you.

DevCS supports Fn Project functions life cycle command definition in our CI/CD jobs. This means that you can automate Fn build and deploy steps in a declarative way. We also added support that enables you to leverage the hosted FaaS offering in the cloud and CI/CD directly into that environment.

Here are the basic steps to get DevCS hooked up to your Fn based FaaS service running in the Oracle Cloud Infrastructure.

Your build will have several steps in it including:

(note - I'm assuming here that you already setup your Fn tenancy following the steps here).

Docker Login

This will let you connect to the hosted docker registry in the Oracle Cloud (OCIR)

Provide your OCIR url ( for example), your user (tenancy/username), and your auth token (note this is not the password but rather the auth token you can get in identity->user->auth tokens).

Docker Login

OCIcli Configuration

The next step is to configure the access to your OCI environment - you do this by picking up the OCIcli build step. Then provide the information including your user's OCID and Fingerprint, your tenancy OCID, your region, and paste in your private key that you generated.


OCI Fn Configuration

Now that your OCI connection is set, let's add the specific configuration for your FaaS instance. From the Fn menu in DevCS pick up the Fn OCI option. Configure it with the details of the Fn environment you created including the compartment ID, the provider (oracle), and the passphrase you used when you created your private key.

Your environment is now ready for using the specific Fn lifecycle commands. We are going to assume that your Fn function code is in your root directory of the Git repository you hooked up to the build job.

Fn Build

The first step will build the function for us. If the code is at the root of your Git, then you only need to specify the Registry Host ( and the username (tenant/user), you can also check the box to get verbose output from the build operation.

Fn Deploy

If the Build was successful the next step is to deploy it to our FaaS service. First make sure you created an app in your FaaS function console. Use the name of that app to fill the "Deploy to App" field. Fill out the Registry Host and Username field similar to the previous step, and don't forget to add the API URL ( You can then decide on some additional options such as verbose output, bumping the version of the app, etc.

Now run the Build and watch the magic take place.

Check out the video below to see it in action.



Shay Shmeltzer

Director of Product Management - Oracle

Shay Shmeltzer is Director of Product Management for Oracle Cloud Development Tools. He is focused on helping developers simplify and streamline their work leveraging Oracle solutions. Shay frequently presents at industry events, publishes articles, and regularly blogs about Oracle's development tools. You can also find him on Twitter at @ShayOracle.

Previous Post

Podcast: JET-Propelled JavaScript

Bob Rhubart | 6 min read

Next Post

How to Connect a Go Program to Oracle Database using godror

Sergio Leunissen | 2 min read