Skip to content

Latest commit

 

History

History
50 lines (40 loc) · 1017 Bytes

15_ruby.md

File metadata and controls

50 lines (40 loc) · 1017 Bytes

Lab 15: Ruby

Lab 15.1: Install Ruby

pipeline {
    agent {
        // with hosted env use agent { label env.JOB_NAME.split('/')[0] }
        docker {
            image 'ruby:2.7.1'
          }
    }
    options {
        buildDiscarder(logRotator(numToKeepStr: '5'))
        timeout(time: 10, unit: 'MINUTES')
        timestamps()  // Timestamper Plugin
    }
    stages {
        stage('Build') {
            steps {
                sh  """#!/bin/bash
                    ruby --version
                    bundle --version
                """
            }
        }
    }
}

Lab 15.2: Improve Ruby Lab

Add additional Ruby lab with tests and artifact archiving.

Lab 15.3: Write Custom Step

Write a custom step to move the above boilerplate code into a shared library.


End of Lab 15

Node.js →

← back to overview