From 33376dfc0fd6f49066bd27ce1ab3e2bef64f66d5 Mon Sep 17 00:00:00 2001 From: Derek Richard Date: Fri, 22 Nov 2024 09:36:47 -0500 Subject: [PATCH] Cross compile osx binaries, removing dependency on OSX workers Signed-off-by: Derek Richard --- pipelines/concourse.yml | 7 ++----- pipelines/release.yml | 2 ++ tasks/concourse-build-darwin.yml | 2 +- tasks/fly-build-darwin.yml | 5 ++++- tasks/fly-darwin.yml | 12 ------------ tasks/scripts/fly-darwin | 15 --------------- tasks/scripts/unit-baggageclaim-darwin | 16 ---------------- tasks/scripts/validate-darwin-rc | 14 -------------- tasks/unit-baggageclaim-darwin.yml | 12 ------------ tasks/validate-darwin-rc.yml | 9 --------- 10 files changed, 9 insertions(+), 85 deletions(-) delete mode 100644 tasks/fly-darwin.yml delete mode 100755 tasks/scripts/fly-darwin delete mode 100755 tasks/scripts/unit-baggageclaim-darwin delete mode 100755 tasks/scripts/validate-darwin-rc delete mode 100644 tasks/unit-baggageclaim-darwin.yml delete mode 100644 tasks/validate-darwin-rc.yml diff --git a/pipelines/concourse.yml b/pipelines/concourse.yml index 5986c3fa..67a7716a 100644 --- a/pipelines/concourse.yml +++ b/pipelines/concourse.yml @@ -203,8 +203,6 @@ jobs: image: unit-image file: ci/tasks/unit.yml input_mapping: {concourse: built-concourse} - - task: fly-darwin - file: ci/tasks/fly-darwin.yml - task: fly-windows file: ci/tasks/fly-windows.yml - task: unit-baggageclaim @@ -212,9 +210,6 @@ jobs: file: ci/tasks/unit-baggageclaim.yml privileged: true input_mapping: {concourse: built-concourse} - - task: unit-baggageclaim-darwin - file: ci/tasks/unit-baggageclaim-darwin.yml - input_mapping: {concourse: built-concourse} - task: unit-baggageclaim-windows file: ci/tasks/unit-baggageclaim-windows.yml input_mapping: {concourse: built-concourse} @@ -313,6 +308,7 @@ jobs: file: ci/tasks/fly-build-windows.yml - task: fly-darwin file: ci/tasks/fly-build-darwin.yml + image: golang-builder-image-rootfs - task: build image: oci-build-task privileged: true @@ -582,6 +578,7 @@ jobs: file: ci/tasks/fly-build-windows.yml - task: fly-darwin file: ci/tasks/fly-build-darwin.yml + image: golang-builder-image - in_parallel: fail_fast: true steps: diff --git a/pipelines/release.yml b/pipelines/release.yml index 137df9e7..224b5870 100644 --- a/pipelines/release.yml +++ b/pipelines/release.yml @@ -262,6 +262,7 @@ jobs: file: ci/tasks/fly-build-windows.yml - task: fly-darwin file: ci/tasks/fly-build-darwin.yml + image: golang-builder-image-rootfs - task: build image: builder privileged: true @@ -556,6 +557,7 @@ jobs: file: ci/tasks/fly-build-windows.yml - task: fly-darwin file: ci/tasks/fly-build-darwin.yml + image: golang-builder-image - in_parallel: fail_fast: true steps: diff --git a/tasks/concourse-build-darwin.yml b/tasks/concourse-build-darwin.yml index 7d817e8b..190691f4 100644 --- a/tasks/concourse-build-darwin.yml +++ b/tasks/concourse-build-darwin.yml @@ -1,5 +1,5 @@ --- -platform: darwin +platform: linux inputs: - name: concourse diff --git a/tasks/fly-build-darwin.yml b/tasks/fly-build-darwin.yml index e90f3c27..4fb4bd1a 100644 --- a/tasks/fly-build-darwin.yml +++ b/tasks/fly-build-darwin.yml @@ -1,5 +1,5 @@ --- -platform: darwin +platform: linux inputs: - name: concourse @@ -13,5 +13,8 @@ outputs: caches: - path: gopath +params: + GOOS: darwin + run: path: ci/tasks/scripts/fly-build diff --git a/tasks/fly-darwin.yml b/tasks/fly-darwin.yml deleted file mode 100644 index e6eb64f4..00000000 --- a/tasks/fly-darwin.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -platform: darwin - -inputs: -- name: concourse -- name: ci - -caches: -- path: gopath - -run: - path: ci/tasks/scripts/fly-darwin diff --git a/tasks/scripts/fly-darwin b/tasks/scripts/fly-darwin deleted file mode 100755 index b8abd7e5..00000000 --- a/tasks/scripts/fly-darwin +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -# vim: set ft=sh - -set -e -u - -export GOPATH=$PWD/gopath -export PATH=$GOPATH/bin:$PATH - -cd concourse/fly - -go mod download - -go install -mod=mod github.com/onsi/ginkgo/v2/ginkgo - -ginkgo -r -p -race "$@" diff --git a/tasks/scripts/unit-baggageclaim-darwin b/tasks/scripts/unit-baggageclaim-darwin deleted file mode 100755 index e26b462f..00000000 --- a/tasks/scripts/unit-baggageclaim-darwin +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -# vim: set ft=sh - -set -e -x - -export GOPATH=$PWD/gopath -export PATH=$GOPATH/bin:$PATH - -cd concourse/worker/baggageclaim - -go mod download - -go install -mod=mod github.com/onsi/ginkgo/v2/ginkgo - -ginkgo -r -race -nodes 4 --failOnPending --randomizeAllSpecs --keep-going -skip=":skip" "$@" - diff --git a/tasks/scripts/validate-darwin-rc b/tasks/scripts/validate-darwin-rc deleted file mode 100755 index 3889d458..00000000 --- a/tasks/scripts/validate-darwin-rc +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -set -e - -tar -xzf concourse-tarball/concourse-*.tgz -cd concourse - -./bin/concourse --version - -tar -xzf fly-assets/fly-darwin-amd64.tgz -./fly --version - -GODEBUG="netdns=1" ./fly -t dummy login -c http://example.com 2> fly_error || true -grep "using cgo DNS resolver" fly_error diff --git a/tasks/unit-baggageclaim-darwin.yml b/tasks/unit-baggageclaim-darwin.yml deleted file mode 100644 index 071a8ebe..00000000 --- a/tasks/unit-baggageclaim-darwin.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -platform: darwin - -inputs: -- name: ci -- name: concourse - -caches: -- path: gopath/ - -run: - path: ci/tasks/scripts/unit-baggageclaim-darwin diff --git a/tasks/validate-darwin-rc.yml b/tasks/validate-darwin-rc.yml deleted file mode 100644 index b633d92c..00000000 --- a/tasks/validate-darwin-rc.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -platform: darwin - -inputs: -- name: ci -- name: concourse-tarball - -run: - path: ci/tasks/scripts/validate-darwin-rc