Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- add job to build fly cli natively - pass along built binaries to bosh-rc and bin-rc [#129925039] Signed-off-by: Chris Dutra <cdutra@pivotal.io>
- Loading branch information
1 parent
b074c8b
commit fb52b42
Showing
14 changed files
with
202 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
|
@@ -49,3 +49,6 @@ tags | ||
|
|
||
.bosh | .bosh | ||
.gitconfig | .gitconfig | ||
|
|||
#fly binaries | |||
src/fly_binaries/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,15 @@ | |||
--- | |||
platform: darwin | |||
|
|||
inputs: | |||
- name: concourse | |||
- name: final-version | |||
|
|||
params: | |||
platform: darwin | |||
|
|||
outputs: | |||
- name: darwin | |||
|
|||
run: | |||
path: concourse/ci/scripts/fly-build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,20 @@ | |||
--- | |||
platform: linux | |||
|
|||
image_resource: | |||
type: docker-image | |||
source: | |||
repository: concourse/atc-ci | |||
|
|||
inputs: | |||
- name: concourse | |||
- name: final-version | |||
|
|||
outputs: | |||
- name: linux | |||
|
|||
params: | |||
platform: linux | |||
|
|||
run: | |||
path: concourse/ci/scripts/fly-build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,15 @@ | |||
--- | |||
platform: windows | |||
|
|||
inputs: | |||
- name: concourse | |||
- name: final-version | |||
|
|||
outputs: | |||
- name: windows | |||
|
|||
params: | |||
platform: windows | |||
|
|||
run: | |||
path: concourse/ci/scripts/fly-build.bat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,18 @@ | |||
#!/bin/bash | |||
# vim: set ft=sh | |||
|
|||
set -e -x | |||
|
|||
export GOPATH=$PWD/concourse | |||
export PATH=$GOPATH/bin:/usr/local/bin:$PATH | |||
export HOME=$PWD | |||
|
|||
FINAL_VERSION="$(cat final-version/version)" | |||
|
|||
cd ${GOPATH}/src/github.com/concourse/fly | |||
|
|||
GOARCH=amd64 CGO_ENABLED=0 \ | |||
go build \ | |||
-ldflags "-X github.com/concourse/fly/version.Version=${FINAL_VERSION}" \ | |||
-o ${HOME}/${platform}/amd64/fly \ | |||
github.com/concourse/fly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,8 @@ | |||
set PATH=C:\Go\bin;%PATH | |||
|
|||
set GOPATH=%CD%\concourse | |||
set PATH=%CD%\concourse\bin;%PATH% | |||
|
|||
set /p FinalVersion=<final-version\version | |||
|
|||
go build -ldflags "-X github.com/concourse/fly/version.Version=%FinalVersion%" -o windows/amd64/fly github.com/concourse/fly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,8 @@ | |||
#!/bin/bash | |||
# vim: set ft=sh | |||
|
|||
set -e -x | |||
|
|||
VERSION="$(cat version/version)" | |||
|
|||
tar -czf fly-binaries/fly-${VERSION}.tgz ./darwin ./linux ./windows |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,23 @@ | |||
--- | |||
platform: linux | |||
|
|||
image_resource: | |||
type: docker-image | |||
source: | |||
repository: concourse/atc-ci | |||
|
|||
inputs: | |||
- name: concourse | |||
- name: version | |||
- name: linux | |||
- name: darwin | |||
- name: windows | |||
|
|||
outputs: | |||
- name: fly-binaries | |||
|
|||
params: | |||
platform: linux | |||
|
|||
run: | |||
path: concourse/ci/scripts/tarball-flies |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,26 +1,41 @@ | |||
set -e | set -e | ||
|
|
||
REPO_NAME=github.com/concourse/fly | VERSION_FILE=/var/vcap/packages/concourse_version/version | ||
|
|
||
export GOROOT=$(readlink -nf /var/vcap/packages/golang) | FLY_BINARIES_FILENAME=fly_binaries/fly-$(cat $VERSION_FILE).tgz | ||
export GOPATH=$BOSH_INSTALL_TARGET | |||
export PATH=$GOROOT/bin:$PATH | |||
|
|
||
mkdir ${BOSH_INSTALL_TARGET}/src | if [ -e "$FLY_BINARIES_FILENAME" ]; then | ||
cp -a * ${BOSH_INSTALL_TARGET}/src | echo "Using existing fly binaries" | ||
|
|||
mkdir -p ${BOSH_INSTALL_TARGET} | |||
|
|||
tar -xzf $FLY_BINARIES_FILENAME | |||
mv fly-$(cat $VERSION_FILE)/* ${BOSH_INSTALL_TARGET}/ | |||
|
|||
else | |||
echo "Building fly binaries" | |||
|
|||
REPO_NAME=github.com/concourse/fly | |||
|
|||
export GOROOT=$(readlink -nf /var/vcap/packages/golang) | |||
export GOPATH=$BOSH_INSTALL_TARGET | |||
export PATH=$GOROOT/bin:$PATH | |||
|
|||
mkdir ${BOSH_INSTALL_TARGET}/src | |||
cp -a * ${BOSH_INSTALL_TARGET}/src | |||
|
|
||
VERSION_FILE=/var/vcap/packages/concourse_version/version | |||
|
|
||
for platform in linux darwin windows; do | for platform in linux darwin windows; do | ||
mkdir -p ${BOSH_INSTALL_TARGET}/${platform}/amd64 | mkdir -p ${BOSH_INSTALL_TARGET}/${platform}/amd64 | ||
|
|
||
GOOS=${platform} GOARCH=amd64 \ | GOOS=${platform} GOARCH=amd64 \ | ||
CGO_ENABLED=0 \ | CGO_ENABLED=0 \ | ||
go build \ | go build \ | ||
-ldflags "-X github.com/concourse/fly/version.Version=$(cat $VERSION_FILE)" \ | -ldflags "-X github.com/concourse/fly/version.Version=$(cat $VERSION_FILE)" \ | ||
-o ${BOSH_INSTALL_TARGET}/${platform}/amd64/fly \ | -o ${BOSH_INSTALL_TARGET}/${platform}/amd64/fly \ | ||
${REPO_NAME} | ${REPO_NAME} | ||
done | done | ||
fi | |||
|
|
||
rm -rf ${BOSH_INSTALL_TARGET}/pkg | rm -rf ${BOSH_INSTALL_TARGET}/pkg | ||
rm -rf ${BOSH_INSTALL_TARGET}/src | rm -rf ${BOSH_INSTALL_TARGET}/src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.