Skip to content

Commit

Permalink
add govc homebrew/debian to pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
drnic committed Jul 11, 2018
1 parent 5b83dd7 commit 85f9e9a
Show file tree
Hide file tree
Showing 5 changed files with 113 additions and 11 deletions.
23 changes: 14 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,18 @@ $ brew tap starkandwayne/cf

Current brews offered:

- [spruce](https://github.com/geofffranks/spruce)
- [genesis](https://github.com/starkandwayne/genesis)
- [gotcha](https://github.com/starkandwayne/gotcha)
- [safe](https://github.com/starkandwayne/safe)
- [shield](https://github.com/starkandwayne/shield)
- [yaml2json](https://github.com/bronze1man/go-yaml2json)
- [uaa-cli](https://github.com/cloudfoundry-incubator/uaa-cli)

```
- Stark & Wayne tools:
- [genesis](https://github.com/starkandwayne/genesis)
- [gotcha](https://github.com/starkandwayne/gotcha)
- [safe](https://github.com/starkandwayne/safe)
- [shield](https://github.com/starkandwayne/shield)
- Other's tools:
- [spruce](https://github.com/geofffranks/spruce)
- [yaml2json](https://github.com/bronze1man/go-yaml2json)
- [uaa-cli](https://github.com/cloudfoundry-incubator/uaa-cli)
- [govc](https://github.com/vmware/govmomi)

```plain
$ brew install spruce
$ brew install gotcha
```
Expand Down Expand Up @@ -63,6 +66,8 @@ apt-get install concourse # also installs concourse-fly
apt-get install om
apt-get install pivnet-cli
apt-get install pks
apt-get install govc
```

NOTE: The `vault` package was manually created by https://gist.github.com/drnic/c03bf5929c7da3421e3978058845512b. The CI pipeline needs a way to detect and fetch latest Vault CLI downloads.
Expand Down
2 changes: 2 additions & 0 deletions apt/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ <h1>Stark &amp; Wayne APT repository</h1>
apt-get install om
apt-get install pivnet-cli
apt-get install pks

apt-get install govc
</pre>
<p>These packages are <a href="https://ci.starkandwayne.com/teams/main/pipelines/homebrew-recipes?groups=debian">automatically generated</a> when their respective upstream projects publish new releases.</p>
<p>The scripts for building these Debian packages are at <a href="https://github.com/starkandwayne/homebrew-cf/tree/master/ci">https://github.com/starkandwayne/homebrew-cf in /ci subfolder</a>. Pull requests for new packages and fixes are welcome.</p>
Expand Down
91 changes: 90 additions & 1 deletion ci/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ groups:
- direnv-debian
- terraform-debian
- bosh-bootloader-debian
- govc-homebrew
- govc-debian
- name: homebrew
jobs:
- spruce-homebrew
Expand All @@ -83,6 +85,7 @@ groups:
- bosh2-homebrew
- uaa-cli-homebrew
- bosh-init-homebrew
- govc-homebrew
- name: debian
jobs:
- spruce-debian
Expand All @@ -109,6 +112,7 @@ groups:
- direnv-debian
- terraform-debian
- bosh-bootloader-debian
- govc-debian

jobs:
- name: install-debs-in-order-debian
Expand Down Expand Up @@ -222,7 +226,6 @@ jobs:
repository: pushme/homebrew
rebase: true


- name: eden-debian
public: true
serial_groups: [apt]
Expand Down Expand Up @@ -1463,6 +1466,85 @@ jobs:
GPG_PUBLIC_KEY: (( grab meta.gpg.public_key ))
GPG_PRIVATE_KEY: (( grab meta.gpg.private_key ))

- name: govc-debian
public: true
serial_groups: [apt]
plan:
- aggregate:
- get: homebrew
resource: homebrew
- get: homebrew-public-key
trigger: true
- get: govc
resource: govc
params:
globs: [govc_linux_amd64.gz]
trigger: true
- task: create-debian
config:
platform: linux
image_resource: (( grab meta.image ))
inputs:
- name: homebrew
- name: govc
path: recipe
run:
path: "homebrew/ci/scripts/create-debian-pkg-from-binary.sh"
params:
DEBUG: 1
REPO_ROOT: homebrew
REPO_OUT: pushme
IN_BINARY_PREFIX_GZ: govc_linux_amd64
IN_BINARY_AFTER_UNPACK: govc
OUT_BINARY: govc
NAME: govc
LICENSE: Apache-2.0
DESCRIPTION: CLI to vSphere
URL: https://github.com/vmware/govmomi
MAINTAINERS: https://github.com/vmware/govmomi/graphs/contributors
VENDOR: "VMWare"
RELEASE_BUCKET: (( grab meta.debian.s3_bucket ))
AWS_ACCESS_KEY: (( grab meta.debian.aws_access_key ))
AWS_SECRET_KEY: (( grab meta.debian.aws_secret_key ))
GPG_ID: (( grab meta.gpg.id ))
GPG_PUBLIC_KEY: (( grab meta.gpg.public_key ))
GPG_PRIVATE_KEY: (( grab meta.gpg.private_key ))

- name: govc-homebrew
public: true
serial: true
plan:
- aggregate:
- get: homebrew
resource: homebrew
- get: govc
resource: govc
params:
globs: [govc_darwin_amd64.gz]
trigger: true
- task: update-homebrew
config:
platform: linux
image_resource: (( grab meta.image ))
inputs:
- name: homebrew
- name: govc
path: recipe
outputs:
- name: pushme
run:
path: "homebrew/ci/scripts/update-homebrew.sh"
args:
- govc.rb
params:
REPO_ROOT: homebrew
REPO_OUT: pushme
BINARY: "govc_darwin_amd64.gz"
- put: homebrew
params:
repository: pushme/homebrew
rebase: true

resources:
- name: homebrew
type: git
Expand Down Expand Up @@ -1652,6 +1734,13 @@ resources:
repository: bosh-bootloader
access_token: (( grab meta.github.access_token ))

- name: govc
type: github-release
source:
user: vmware
repository: govmomi
access_token: (( grab meta.github.access_token ))

resource_types:
- name: hashicorp-release
type: docker-image
Expand Down
6 changes: 6 additions & 0 deletions ci/scripts/create-debian-pkg-from-binary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ if [[ ${IN_BINARY_PREFIX_ZIP:-X} != "X" ]]; then
IN_BINARY=${IN_BINARY_AFTER_UNPACK:-$OUT_BINARY}
cd -
fi
if [[ ${IN_BINARY_PREFIX_GZ:-X} != "X" ]]; then
cd recipe
gunzip $IN_BINARY_PREFIX_GZ*gz
IN_BINARY=${IN_BINARY_AFTER_UNPACK:-$OUT_BINARY}
cd -
fi

recipe_binaries=
provides=
Expand Down
2 changes: 1 addition & 1 deletion ci/scripts/update-homebrew.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ if [[ "$(git status -s)X" != "X" ]]; then
if [[ -z $(git config --global user.name) ]]; then
git config --global user.name "CI Bot"
fi

set -e
echo ">> Running git operations as $(git config --global user.name) <$(git config --global user.email)>"
echo ">> Getting back to master (from detached-head)"
Expand Down

0 comments on commit 85f9e9a

Please sign in to comment.