liatrio / image-builder-ruby

image-builder-ruby repository

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What is the image for?

The intended purpose of this image is for it to be used as a Jenkins agent. By using the installed features the user is able to create Jenkins pipelines that can run Ruby scripts and applications. An example of using this image as a Jenkins agent via Kubernetes can be seen below.

First, an example of configuring the pod template in yaml to create the agent.

jenkins:
  clouds:
    - kubernetes:
        name: "kubernetes"
        templates:
          - name: "image-builder-ruby"
            label: "image-builder-ruby"
            nodeUsageMode: NORMAL
            containers:
              - name: "image-ruby"
                image: "ghcr.io/liatrio/image-builder-ruby:${builder_images_version}"

And then specifying the agent in the Jenkinsfile for an example step.

stage('Build') {
  agent {
    label "image-builder-ruby"
  }
  steps {
    container('image-ruby') {
      sh "echo 'puts "Hello Ruby"' > hello.rb"
      ruby hello.rb
    }
  }
}

What is installed on this image?

  • Version 3.X.Y of the Ruby programming language.

About

image-builder-ruby repository

License:MIT License


Languages

Language:Dockerfile 100.0%