Skip to content

cf-routing/golang-release

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

golang

Note: requires bosh-cli version v2.0.36+ to vendor-package and create-release.

To vendor golang package into your release, run:

$ git clone https://github.com/bosh-packages/golang-release
$ cd ~/workspace/your-release
$ bosh vendor-package golang-1.19-linux ~/workspace/golang-release

Included packages:

  • golang-1-{linux,darwin,windows}: updated with latest version of go 1.x
  • golang-1.18-{linux,darwin,windows}: updated with latest version of go 1.18.x
  • golang-1.19-{linux,darwin,windows}: updated with latest version of go 1.19.x

To use golang-* package for compilation in your packaging script:

#!/bin/bash -eu
source /var/vcap/packages/golang-1.19-linux/bosh/compile.env
go build ...

or on Windows:

. C:\var\vcap\packages\golang-1.19-windows\bosh\compile.ps1
go build ...

[advanced use] To use golang-* package at runtime in your job scripts:

#!/bin/bash -eu
source /var/vcap/packages/golang-1.19-linux/bosh/runtime.env
go run ...

or on Windows:

. C:\var\vcap\packages\golang-1.19-windows\bosh\runtime.ps1
go run ...

Development

To run tests cd tests/ && BOSH_ENVIRONMENT=vbox ./run.sh

Adding a new golang line

To add a new line, edit the variable in the top of dev/add-line Execute the script, commit changes, and update the pipeline.

The blobs necessary for the new version line will automatically be added via CI. The build-docker-image job will fail until the blobs are added by the bump job.

Windows

You will need to set the following variables, for example:

export STEMCELL_PATH="/path/to/windows/stemcell.zip"
export STEMCELL_VERSION="<version>"
export OS="windows2019"
export JOB_NAME="test-windows"
export VM_EXTENSIONS="[50GB_ephemeral_disk]"

About

Golang release for use with `bosh vendor-package`

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 78.6%
  • Dockerfile 13.4%
  • PowerShell 7.5%
  • Go 0.5%