Skip to content

Deploy Your Own Artifact

It is possible to deploy your own artifacts into the environments through the Kubernetes pipeline. This is done by providing a custom Dockerfile as shown in the steps below:

  1. Fork the CICD sample repository that contains a Maven Multi-Module project.

  2. Update the repositories in the  sample values file used in the  Pipeline Quick Start Guide to include the forked repository in place of [git-username] as highlighted below:

    - name: wso2mi
     email: <EMAIL>
        path: tests
    customChart: false
    name: micro-integrator
    version: 1.2.0-3
    repo: ''
        - organization: *reg_username
        repository: wso2mi
         deployment: wso2microIntegrator
            baseImage: 'wso2/wso2mi:1.2.0'
            gitRepository: '[git-username]/cicd-sample-docker-mi'
            enabled: false
            hostname: ''
            port: 9008 
  3. Upgrade the Helm chart with the command below.

    $ helm upgrade <RELEASE_NAME> wso2/kubernetes-pipeline -f values-mi.yaml


    This may take up to 10 minutes.

  4. Restart the Jenkins pod by deleting the existing pods. This will cause the cluster to spawn a new pod for Jenkins.

    $ POD_NAME=`kubectl get pods --selector=app=jenkins -n <NAMESPACE> -o 
    json -o jsonpath='{ .items[0] }'`
    $ kubectl delete pod $POD_NAME -n <NAMESPACE>

    Replace <NAMESPACE> with the namespace in your cluster.

  5. Create a clone of the forked artifact source repository as follows:

    $ git clone[git-username]/cicd-sample-docker-mi.git

    Replace the [git-username] tag with the name of your GitHub username.

  6. Modify the API located at cicd-sample-docker-mi>helloworldConfigs/src/main/synapse-config/apis/HelloWorld.xml to return a new response as below:


  7. Commit and push the changes into your forked repository.

  8. If you have completed the steps in Testing The Pipeline Environment document, stop the manual judgment and watch the sample artifact being deployed in the Spinnaker dashboard.

    Spinnaker1 Spinnaker2 Spinnaker3

  9. Invoke the service 

    curl -k  
  10. You will get the following response: {"Hello":"New World"}