From a290e8a8db2210495f568b901aff510796f298a4 Mon Sep 17 00:00:00 2001 From: Ioannis Tsouvalas Date: Thu, 1 Aug 2024 15:47:33 +0300 Subject: [PATCH 1/4] Update Go version, fix env var & adjust packaging - Updated Go version from 1.20 to 1.22 across all relevant files - Corrected environment variable name from `workerNum` to `WORKER_NUM` in scheduler template - Modified packaging script and spec to remove version-specific filename for `ocf-scheduler` - Updated `go.mod` and `go.sum` to reflect new dependencies --- jobs/scheduler/templates/env.erb | 2 +- jobs/smoke-tests/spec | 2 +- jobs/smoke-tests/templates/run | 4 ++-- packages/golang-1.20-linux/spec.lock | 2 -- packages/golang-1.22-linux/spec.lock | 2 ++ packages/scheduler/packaging | 2 +- packages/scheduler/spec | 2 +- packages/smoke-tests/spec | 2 +- src/go.mod | 2 +- src/go.sum | 3 +++ 10 files changed, 13 insertions(+), 10 deletions(-) delete mode 100644 packages/golang-1.20-linux/spec.lock create mode 100644 packages/golang-1.22-linux/spec.lock diff --git a/jobs/scheduler/templates/env.erb b/jobs/scheduler/templates/env.erb index 5e72a88..4f35fd5 100644 --- a/jobs/scheduler/templates/env.erb +++ b/jobs/scheduler/templates/env.erb @@ -5,7 +5,7 @@ export CLIENT_ID="<%= p('scheduler.uaa.client_id') %>" export UAA_ENDPOINT="<%= p('scheduler.uaa.endpoint') %>" export DATABASE_URL="<%= p('scheduler.postgres.uri') %>" export CF_ENDPOINT="<%= p('scheduler.cf.api')%>" -export workerNum="<%= p('scheduler.workers')%>" +export WORKER_NUM ="<%= p('scheduler.workers')%>" export LOG_LEVEL="<%= p('scheduler.log_level')%>" diff --git a/jobs/smoke-tests/spec b/jobs/smoke-tests/spec index 3714a08..16a6cc9 100644 --- a/jobs/smoke-tests/spec +++ b/jobs/smoke-tests/spec @@ -7,7 +7,7 @@ templates: packages: - smoke-tests -- golang-1.20-linux +- golang-1.22-linux - cf-cli-8-linux - scheduler-cf-plugin diff --git a/jobs/smoke-tests/templates/run b/jobs/smoke-tests/templates/run index 8fd6baf..4ffe55d 100644 --- a/jobs/smoke-tests/templates/run +++ b/jobs/smoke-tests/templates/run @@ -4,7 +4,7 @@ set -e # Prepare PATH with known bin directories. export PATH=$PATH:/var/vcap/packages/cf-cli-8-linux/bin -export PATH=$PATH:/var/vcap/packages/golang-1.20-linux/bin +export PATH=$PATH:/var/vcap/packages/golang-1.22-linux/bin echo "===" echo "Setting up CF CLI environment..." @@ -44,7 +44,7 @@ yes | cf install-plugin /var/vcap/packages/scheduler-cf-plugin/bin/scheduler-cf- echo "===" echo "Preparing Go runtime environment..." -source /var/vcap/packages/golang-1.20-linux/bosh/runtime.env +source /var/vcap/packages/golang-1.22-linux/bosh/runtime.env export CGO_ENABLED=0 echo "===" diff --git a/packages/golang-1.20-linux/spec.lock b/packages/golang-1.20-linux/spec.lock deleted file mode 100644 index b99fd05..0000000 --- a/packages/golang-1.20-linux/spec.lock +++ /dev/null @@ -1,2 +0,0 @@ -name: golang-1.20-linux -fingerprint: b09468ac73cd3350333a35eb09c980c6a06c5465be0e1ba430da62757dc10a04 diff --git a/packages/golang-1.22-linux/spec.lock b/packages/golang-1.22-linux/spec.lock new file mode 100644 index 0000000..7bd5cde --- /dev/null +++ b/packages/golang-1.22-linux/spec.lock @@ -0,0 +1,2 @@ +name: golang-1.22-linux +fingerprint: 65e1dbda6b56080be4108e94c744f40bb2dca4caa417ab9fb376c2c353bdff1c diff --git a/packages/scheduler/packaging b/packages/scheduler/packaging index baf36eb..6f32a60 100644 --- a/packages/scheduler/packaging +++ b/packages/scheduler/packaging @@ -5,7 +5,7 @@ set -ex mkdir -p ${BOSH_INSTALL_TARGET}/bin -cp ocf-scheduler/ocf-scheduler-*-linux-amd64 ${BOSH_INSTALL_TARGET}/bin/scheduler +cp ocf-scheduler/ocf-scheduler ${BOSH_INSTALL_TARGET}/bin/scheduler chmod +x ${BOSH_INSTALL_TARGET}/bin/scheduler diff --git a/packages/scheduler/spec b/packages/scheduler/spec index d132243..1d9a420 100644 --- a/packages/scheduler/spec +++ b/packages/scheduler/spec @@ -4,4 +4,4 @@ name: scheduler dependencies: [] files: - - ocf-scheduler/ocf-scheduler-*-linux-amd64 + - ocf-scheduler/ocf-scheduler diff --git a/packages/smoke-tests/spec b/packages/smoke-tests/spec index b18a924..9923a5b 100644 --- a/packages/smoke-tests/spec +++ b/packages/smoke-tests/spec @@ -2,7 +2,7 @@ name: smoke-tests dependencies: -- golang-1.20-linux +- golang-1.22-linux - cf-cli-8-linux - scheduler-cf-plugin diff --git a/src/go.mod b/src/go.mod index 4a70e57..533cc96 100644 --- a/src/go.mod +++ b/src/go.mod @@ -1,6 +1,6 @@ module github.com/starkandwayne/ocf-scheduler-boshrelease/src/acceptance-tests -go 1.18 +go 1.22 require ( github.com/cloudfoundry/cf-acceptance-tests v1.9.1-0.20220405181007-a6e4d7ae3b33 diff --git a/src/go.sum b/src/go.sum index 2b95778..77f8be5 100644 --- a/src/go.sum +++ b/src/go.sum @@ -16,6 +16,7 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= @@ -28,6 +29,7 @@ github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108 github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/ginkgo/v2 v2.1.3 h1:e/3Cwtogj0HA+25nMP1jCMDIf8RtRYbGwGGuBIFztkc= +github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw= @@ -79,6 +81,7 @@ google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miE google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= From d026cabeb049807e3a4b555a974ed11c3002060c Mon Sep 17 00:00:00 2001 From: Ioannis Tsouvalas Date: Thu, 1 Aug 2024 15:57:52 +0300 Subject: [PATCH 2/4] add final build for golang --- .final_builds/packages/golang-1.22-linux/index.yml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .final_builds/packages/golang-1.22-linux/index.yml diff --git a/.final_builds/packages/golang-1.22-linux/index.yml b/.final_builds/packages/golang-1.22-linux/index.yml new file mode 100644 index 0000000..9fa6b0d --- /dev/null +++ b/.final_builds/packages/golang-1.22-linux/index.yml @@ -0,0 +1,6 @@ +builds: + 65e1dbda6b56080be4108e94c744f40bb2dca4caa417ab9fb376c2c353bdff1c: + version: 65e1dbda6b56080be4108e94c744f40bb2dca4caa417ab9fb376c2c353bdff1c + blobstore_id: e93541b8-7d7b-4537-4bb0-54665b244ba2 + sha1: sha256:7b20eaca465629e9195699e069545ab655584778c7b573f3f710e0f4915a3bf5 +format-version: "2" From 8c109e8ec7525d9c9316cf1d4091fb9743c3c3f5 Mon Sep 17 00:00:00 2001 From: Ioannis Tsouvalas Date: Thu, 1 Aug 2024 16:06:40 +0300 Subject: [PATCH 3/4] release v0.1.1 --- .final_builds/jobs/scheduler/index.yml | 4 ++ .final_builds/jobs/smoke-tests/index.yml | 4 ++ .final_builds/packages/scheduler/index.yml | 4 ++ .final_builds/packages/smoke-tests/index.yml | 4 ++ releases/ocf-scheduler/index.yml | 2 + .../ocf-scheduler/ocf-scheduler-0.1.1.yml | 49 +++++++++++++++++++ 6 files changed, 67 insertions(+) create mode 100644 releases/ocf-scheduler/ocf-scheduler-0.1.1.yml diff --git a/.final_builds/jobs/scheduler/index.yml b/.final_builds/jobs/scheduler/index.yml index 889bf5a..c575cf1 100644 --- a/.final_builds/jobs/scheduler/index.yml +++ b/.final_builds/jobs/scheduler/index.yml @@ -7,4 +7,8 @@ builds: version: 715a2b86a497d7e5ac0d7c540831d0f3192559483512763cdac39ab2976290d6 blobstore_id: cc3d6072-5e7f-418f-46af-8569b59b8950 sha1: sha256:c8fb3b6f2381d3f507a1868041984fd6619bf2881218ae6db8f7463a49dc538b + d2cdeacec1366de99a221c4b1989c56e841311119981d72bbc84436c1c3e9cd3: + version: d2cdeacec1366de99a221c4b1989c56e841311119981d72bbc84436c1c3e9cd3 + blobstore_id: 2c6c1295-bfad-4e47-59cd-21eebc5a1801 + sha1: sha256:957bdad9e2e51c5c6c4186a93ea31ced39c8ae1fdac92a74911cfcae3e6fac04 format-version: "2" diff --git a/.final_builds/jobs/smoke-tests/index.yml b/.final_builds/jobs/smoke-tests/index.yml index efc0ba8..e3b125d 100644 --- a/.final_builds/jobs/smoke-tests/index.yml +++ b/.final_builds/jobs/smoke-tests/index.yml @@ -15,4 +15,8 @@ builds: version: 3e397bd6b01d0f16122aef106790f1e9eda2bd2e0702fd51106f827eac9347b4 blobstore_id: 91833fc5-61b9-4321-52dd-d324d2d42b5b sha1: sha256:f9825b4bdc12b07f5b668026d43caa92b8d48d93bd4368a868aac97b617ac623 + b403a7fc9ef4ee4bb264fd83a087fb5aaa321b8038bbc490c5aedae467828391: + version: b403a7fc9ef4ee4bb264fd83a087fb5aaa321b8038bbc490c5aedae467828391 + blobstore_id: 9e063b25-c258-4ffa-71e3-8ddc5182eba0 + sha1: sha256:e06f9970113f517cb9e9c7a7350ad883e3b0f2764539efa0534b0de73ecc0614 format-version: "2" diff --git a/.final_builds/packages/scheduler/index.yml b/.final_builds/packages/scheduler/index.yml index cb32edb..e896b57 100644 --- a/.final_builds/packages/scheduler/index.yml +++ b/.final_builds/packages/scheduler/index.yml @@ -11,6 +11,10 @@ builds: version: 4ae2b8bd0d9e51100ced77f5c6b22fb943705fefc227882e6019981544dfd003 blobstore_id: 69b46068-2cda-497e-70ef-79b272588d12 sha1: sha256:c38ed994b294c63c4db4083670352ce86148a48e5884b8968665af15aaffc371 + 74c63f118db88f185fb8ae77f725ec9decc266c3d987ac91a40d3a54fb4aeb56: + version: 74c63f118db88f185fb8ae77f725ec9decc266c3d987ac91a40d3a54fb4aeb56 + blobstore_id: 5bd62722-58f2-48e0-5595-2a5ee7710dd8 + sha1: sha256:b94737f60cef10cbb30afc1e4ad1b427b165d1f9fceca65aa55e96806bd43a03 87b0f448eb77bbb4250595a062446dedc6d8a25067d571cb64799088b31cbf64: version: 87b0f448eb77bbb4250595a062446dedc6d8a25067d571cb64799088b31cbf64 blobstore_id: f826b61b-32a1-458e-6e3a-f6f312bbdffa diff --git a/.final_builds/packages/smoke-tests/index.yml b/.final_builds/packages/smoke-tests/index.yml index 1fd58c4..d17df66 100644 --- a/.final_builds/packages/smoke-tests/index.yml +++ b/.final_builds/packages/smoke-tests/index.yml @@ -1,4 +1,8 @@ builds: + 9819c5ab50f1a84c46f0e11c1d5948e562e2cab36f4e42e8aaacfc4ff304d1eb: + version: 9819c5ab50f1a84c46f0e11c1d5948e562e2cab36f4e42e8aaacfc4ff304d1eb + blobstore_id: c4413170-5d42-4e65-54c7-cd4a6f91ddce + sha1: sha256:6f32f681bf743494299055c55ecd0df1e5c7e2ac84e72d89ca559760f68a47ea bd568015c992f4d8083f499412917df21551e880cad5896ea397cece8a6cd8c8: version: bd568015c992f4d8083f499412917df21551e880cad5896ea397cece8a6cd8c8 blobstore_id: 2af5e3ae-38bd-474d-491a-0438cb28813e diff --git a/releases/ocf-scheduler/index.yml b/releases/ocf-scheduler/index.yml index a5739f7..a12766d 100644 --- a/releases/ocf-scheduler/index.yml +++ b/releases/ocf-scheduler/index.yml @@ -13,4 +13,6 @@ builds: version: 0.0.6 bc773ac0-77f0-4ebf-479c-a0a45a3b551a: version: 0.0.8 + efbcc71b-1557-407d-6a58-473ca12db12f: + version: 0.1.1 format-version: "2" diff --git a/releases/ocf-scheduler/ocf-scheduler-0.1.1.yml b/releases/ocf-scheduler/ocf-scheduler-0.1.1.yml new file mode 100644 index 0000000..3df02de --- /dev/null +++ b/releases/ocf-scheduler/ocf-scheduler-0.1.1.yml @@ -0,0 +1,49 @@ +name: ocf-scheduler +version: 0.1.1 +commit_hash: d026cab +uncommitted_changes: true +jobs: +- name: scheduler + version: d2cdeacec1366de99a221c4b1989c56e841311119981d72bbc84436c1c3e9cd3 + fingerprint: d2cdeacec1366de99a221c4b1989c56e841311119981d72bbc84436c1c3e9cd3 + sha1: sha256:957bdad9e2e51c5c6c4186a93ea31ced39c8ae1fdac92a74911cfcae3e6fac04 + packages: + - scheduler +- name: smoke-tests + version: b403a7fc9ef4ee4bb264fd83a087fb5aaa321b8038bbc490c5aedae467828391 + fingerprint: b403a7fc9ef4ee4bb264fd83a087fb5aaa321b8038bbc490c5aedae467828391 + sha1: sha256:e06f9970113f517cb9e9c7a7350ad883e3b0f2764539efa0534b0de73ecc0614 + packages: + - smoke-tests + - golang-1.22-linux + - cf-cli-8-linux + - scheduler-cf-plugin +packages: +- name: cf-cli-8-linux + version: afd6c74232fe4a51bcca5eb3e72821718fa2173f + fingerprint: afd6c74232fe4a51bcca5eb3e72821718fa2173f + sha1: 743ab1fb9b04aa50f0d62e66dddd1f9c3a97d4d2 + dependencies: [] +- name: golang-1.22-linux + version: 65e1dbda6b56080be4108e94c744f40bb2dca4caa417ab9fb376c2c353bdff1c + fingerprint: 65e1dbda6b56080be4108e94c744f40bb2dca4caa417ab9fb376c2c353bdff1c + sha1: sha256:7b20eaca465629e9195699e069545ab655584778c7b573f3f710e0f4915a3bf5 + dependencies: [] +- name: scheduler + version: 74c63f118db88f185fb8ae77f725ec9decc266c3d987ac91a40d3a54fb4aeb56 + fingerprint: 74c63f118db88f185fb8ae77f725ec9decc266c3d987ac91a40d3a54fb4aeb56 + sha1: sha256:b94737f60cef10cbb30afc1e4ad1b427b165d1f9fceca65aa55e96806bd43a03 + dependencies: [] +- name: scheduler-cf-plugin + version: 7d6f0fa31e62f89e5b59eb94699aae485f92bb91a284fcb2c87f948a1de857b3 + fingerprint: 7d6f0fa31e62f89e5b59eb94699aae485f92bb91a284fcb2c87f948a1de857b3 + sha1: sha256:61dfc4d29505054879286ceeb5a4b096ba89205a583a28a0e32e49dc32750a61 + dependencies: [] +- name: smoke-tests + version: 9819c5ab50f1a84c46f0e11c1d5948e562e2cab36f4e42e8aaacfc4ff304d1eb + fingerprint: 9819c5ab50f1a84c46f0e11c1d5948e562e2cab36f4e42e8aaacfc4ff304d1eb + sha1: sha256:6f32f681bf743494299055c55ecd0df1e5c7e2ac84e72d89ca559760f68a47ea + dependencies: + - golang-1.22-linux + - cf-cli-8-linux + - scheduler-cf-plugin From ee425a47db966fbde55fb4fc0c8ae6dc9050ccdb Mon Sep 17 00:00:00 2001 From: Ioannis Tsouvalas Date: Fri, 2 Aug 2024 10:33:06 +0300 Subject: [PATCH 4/4] update commit hash --- releases/ocf-scheduler/index.yml | 4 ++-- releases/ocf-scheduler/ocf-scheduler-0.1.1.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/releases/ocf-scheduler/index.yml b/releases/ocf-scheduler/index.yml index a12766d..3142147 100644 --- a/releases/ocf-scheduler/index.yml +++ b/releases/ocf-scheduler/index.yml @@ -1,4 +1,6 @@ builds: + 03c8bd33-cbb0-4d6c-6fbf-e6387f464c75: + version: 0.1.1 2c510452-b8ad-4cc3-7a05-b619a688041c: version: 0.0.1 54dadcde-b1b0-4605-5f2c-20734b8817e9: @@ -13,6 +15,4 @@ builds: version: 0.0.6 bc773ac0-77f0-4ebf-479c-a0a45a3b551a: version: 0.0.8 - efbcc71b-1557-407d-6a58-473ca12db12f: - version: 0.1.1 format-version: "2" diff --git a/releases/ocf-scheduler/ocf-scheduler-0.1.1.yml b/releases/ocf-scheduler/ocf-scheduler-0.1.1.yml index 3df02de..89139ac 100644 --- a/releases/ocf-scheduler/ocf-scheduler-0.1.1.yml +++ b/releases/ocf-scheduler/ocf-scheduler-0.1.1.yml @@ -1,6 +1,6 @@ name: ocf-scheduler version: 0.1.1 -commit_hash: d026cab +commit_hash: 8c109e8 uncommitted_changes: true jobs: - name: scheduler