Skip to content

Commit 85f9e9a

Browse files
committed
add govc homebrew/debian to pipeline
1 parent 5b83dd7 commit 85f9e9a

File tree

5 files changed

+113
-11
lines changed

5 files changed

+113
-11
lines changed

README.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,18 @@ $ brew tap starkandwayne/cf
88

99
Current brews offered:
1010

11-
- [spruce](https://github.com/geofffranks/spruce)
12-
- [genesis](https://github.com/starkandwayne/genesis)
13-
- [gotcha](https://github.com/starkandwayne/gotcha)
14-
- [safe](https://github.com/starkandwayne/safe)
15-
- [shield](https://github.com/starkandwayne/shield)
16-
- [yaml2json](https://github.com/bronze1man/go-yaml2json)
17-
- [uaa-cli](https://github.com/cloudfoundry-incubator/uaa-cli)
18-
19-
```
11+
- Stark & Wayne tools:
12+
- [genesis](https://github.com/starkandwayne/genesis)
13+
- [gotcha](https://github.com/starkandwayne/gotcha)
14+
- [safe](https://github.com/starkandwayne/safe)
15+
- [shield](https://github.com/starkandwayne/shield)
16+
- Other's tools:
17+
- [spruce](https://github.com/geofffranks/spruce)
18+
- [yaml2json](https://github.com/bronze1man/go-yaml2json)
19+
- [uaa-cli](https://github.com/cloudfoundry-incubator/uaa-cli)
20+
- [govc](https://github.com/vmware/govmomi)
21+
22+
```plain
2023
$ brew install spruce
2124
$ brew install gotcha
2225
```
@@ -63,6 +66,8 @@ apt-get install concourse # also installs concourse-fly
6366
apt-get install om
6467
apt-get install pivnet-cli
6568
apt-get install pks
69+
70+
apt-get install govc
6671
```
6772

6873
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.

apt/index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ <h1>Stark &amp; Wayne APT repository</h1>
4141
apt-get install om
4242
apt-get install pivnet-cli
4343
apt-get install pks
44+
45+
apt-get install govc
4446
</pre>
4547
<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>
4648
<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>

ci/pipeline.yml

Lines changed: 90 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ groups:
7171
- direnv-debian
7272
- terraform-debian
7373
- bosh-bootloader-debian
74+
- govc-homebrew
75+
- govc-debian
7476
- name: homebrew
7577
jobs:
7678
- spruce-homebrew
@@ -83,6 +85,7 @@ groups:
8385
- bosh2-homebrew
8486
- uaa-cli-homebrew
8587
- bosh-init-homebrew
88+
- govc-homebrew
8689
- name: debian
8790
jobs:
8891
- spruce-debian
@@ -109,6 +112,7 @@ groups:
109112
- direnv-debian
110113
- terraform-debian
111114
- bosh-bootloader-debian
115+
- govc-debian
112116

113117
jobs:
114118
- name: install-debs-in-order-debian
@@ -222,7 +226,6 @@ jobs:
222226
repository: pushme/homebrew
223227
rebase: true
224228

225-
226229
- name: eden-debian
227230
public: true
228231
serial_groups: [apt]
@@ -1463,6 +1466,85 @@ jobs:
14631466
GPG_PUBLIC_KEY: (( grab meta.gpg.public_key ))
14641467
GPG_PRIVATE_KEY: (( grab meta.gpg.private_key ))
14651468

1469+
- name: govc-debian
1470+
public: true
1471+
serial_groups: [apt]
1472+
plan:
1473+
- aggregate:
1474+
- get: homebrew
1475+
resource: homebrew
1476+
- get: homebrew-public-key
1477+
trigger: true
1478+
- get: govc
1479+
resource: govc
1480+
params:
1481+
globs: [govc_linux_amd64.gz]
1482+
trigger: true
1483+
- task: create-debian
1484+
config:
1485+
platform: linux
1486+
image_resource: (( grab meta.image ))
1487+
inputs:
1488+
- name: homebrew
1489+
- name: govc
1490+
path: recipe
1491+
run:
1492+
path: "homebrew/ci/scripts/create-debian-pkg-from-binary.sh"
1493+
params:
1494+
DEBUG: 1
1495+
REPO_ROOT: homebrew
1496+
REPO_OUT: pushme
1497+
IN_BINARY_PREFIX_GZ: govc_linux_amd64
1498+
IN_BINARY_AFTER_UNPACK: govc
1499+
OUT_BINARY: govc
1500+
NAME: govc
1501+
LICENSE: Apache-2.0
1502+
DESCRIPTION: CLI to vSphere
1503+
URL: https://github.com/vmware/govmomi
1504+
MAINTAINERS: https://github.com/vmware/govmomi/graphs/contributors
1505+
VENDOR: "VMWare"
1506+
RELEASE_BUCKET: (( grab meta.debian.s3_bucket ))
1507+
AWS_ACCESS_KEY: (( grab meta.debian.aws_access_key ))
1508+
AWS_SECRET_KEY: (( grab meta.debian.aws_secret_key ))
1509+
GPG_ID: (( grab meta.gpg.id ))
1510+
GPG_PUBLIC_KEY: (( grab meta.gpg.public_key ))
1511+
GPG_PRIVATE_KEY: (( grab meta.gpg.private_key ))
1512+
1513+
- name: govc-homebrew
1514+
public: true
1515+
serial: true
1516+
plan:
1517+
- aggregate:
1518+
- get: homebrew
1519+
resource: homebrew
1520+
- get: govc
1521+
resource: govc
1522+
params:
1523+
globs: [govc_darwin_amd64.gz]
1524+
trigger: true
1525+
- task: update-homebrew
1526+
config:
1527+
platform: linux
1528+
image_resource: (( grab meta.image ))
1529+
inputs:
1530+
- name: homebrew
1531+
- name: govc
1532+
path: recipe
1533+
outputs:
1534+
- name: pushme
1535+
run:
1536+
path: "homebrew/ci/scripts/update-homebrew.sh"
1537+
args:
1538+
- govc.rb
1539+
params:
1540+
REPO_ROOT: homebrew
1541+
REPO_OUT: pushme
1542+
BINARY: "govc_darwin_amd64.gz"
1543+
- put: homebrew
1544+
params:
1545+
repository: pushme/homebrew
1546+
rebase: true
1547+
14661548
resources:
14671549
- name: homebrew
14681550
type: git
@@ -1652,6 +1734,13 @@ resources:
16521734
repository: bosh-bootloader
16531735
access_token: (( grab meta.github.access_token ))
16541736

1737+
- name: govc
1738+
type: github-release
1739+
source:
1740+
user: vmware
1741+
repository: govmomi
1742+
access_token: (( grab meta.github.access_token ))
1743+
16551744
resource_types:
16561745
- name: hashicorp-release
16571746
type: docker-image

ci/scripts/create-debian-pkg-from-binary.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ if [[ ${IN_BINARY_PREFIX_ZIP:-X} != "X" ]]; then
5151
IN_BINARY=${IN_BINARY_AFTER_UNPACK:-$OUT_BINARY}
5252
cd -
5353
fi
54+
if [[ ${IN_BINARY_PREFIX_GZ:-X} != "X" ]]; then
55+
cd recipe
56+
gunzip $IN_BINARY_PREFIX_GZ*gz
57+
IN_BINARY=${IN_BINARY_AFTER_UNPACK:-$OUT_BINARY}
58+
cd -
59+
fi
5460

5561
recipe_binaries=
5662
provides=

ci/scripts/update-homebrew.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ if [[ "$(git status -s)X" != "X" ]]; then
5050
if [[ -z $(git config --global user.name) ]]; then
5151
git config --global user.name "CI Bot"
5252
fi
53-
53+
5454
set -e
5555
echo ">> Running git operations as $(git config --global user.name) <$(git config --global user.email)>"
5656
echo ">> Getting back to master (from detached-head)"

0 commit comments

Comments
 (0)