Skip to content

Latest commit

 

History

History
46 lines (34 loc) · 752 Bytes

box-promote.md

File metadata and controls

46 lines (34 loc) · 752 Bytes

BoxPromote

All properties and methods from BoxCommon are valid in addition to the properties and methods documented here.

Methods

promote()

Promotes images and pushes git tag to repository

Example

jenkins.yaml:

common:
  images:
    - test/a
    - test/b
promote:
  baseVersion: "0.1.0"

Jenkinsfile:

@Library('jenkins-shared-library@master')
import com.boxboat.jenkins.pipeline.promote.*

def promotions = ["", "stage", "prod"]
properties([
  parameters([
    choice(name: 'promotionKey', choices: deployments, description: 'Promotion', defaultValue: '')
  ])
])

def promote = new BoxPromote()

node() {
  promote.wrap {
    stage('Promote'){
      promote.promote()
    }
  }
}