Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update golang version to 1.22.3 #2957

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
cccf5c8
Add initial files to push metricsforwarder as a cf app via binary
bonzofenix Apr 30, 2024
6390d13
Adds lable 'skip-cleanup to keep the acceptance test deployment alive
bonzofenix Apr 30, 2024
8524512
Uses binary buildpack to deploy
bonzofenix May 1, 2024
ece3e04
Adds metricforwarder makefile for poc deployment
bonzofenix May 1, 2024
8ca4b9c
Remove tls from postgres
bonzofenix May 2, 2024
a6af3ed
Refactor forwarder to support metrics forwardeR
bonzofenix May 6, 2024
03e3fdc
update operations
bonzofenix May 6, 2024
af6c261
Adds sg and updates manifest
bonzofenix May 6, 2024
2ea7495
Refactors loggregator metron emitter
bonzofenix May 6, 2024
d92d179
wip: Adds syslog forwarder
bonzofenix May 6, 2024
8a4ca44
WIP: Syslog implementation for metric forwarder
bonzofenix May 21, 2024
34446f0
More refactor
bonzofenix May 7, 2024
237d8cf
Adds port for syslog server
bonzofenix May 7, 2024
515f886
fix broken test
bonzofenix May 13, 2024
b13f598
Supports syslog via tls
bonzofenix May 13, 2024
cafa396
Change MetricsForwarder references to Emitter
bonzofenix May 14, 2024
7446094
Fix autoscaler deploy
bonzofenix May 14, 2024
b379f31
Makes sed usage compatible both with bsd and unix versions
bonzofenix May 14, 2024
9c107ac
Update gosub in bosh packages
bonzofenix May 14, 2024
92e3d5d
fixes sed apprearences with unix only argument
bonzofenix May 14, 2024
db1a5d8
Revert "Update gosub in bosh packages"
bonzofenix May 21, 2024
a950d75
Revert "fixes sed apprearences with unix only argument"
bonzofenix May 21, 2024
a49f376
Reapply "Update gosub in bosh packages"
bonzofenix May 21, 2024
e053f9f
fix package subs
bonzofenix May 14, 2024
8b1fb9b
Update package specs
bonzofenix May 14, 2024
51e9c0f
pulls loggregator certs from vm
bonzofenix May 14, 2024
21816d5
Defaults to metrics forwarder syslog on bosh release
bonzofenix May 14, 2024
a77f921
Clean mod vendor before mod vendor
bonzofenix May 14, 2024
f4220f9
fix spec for metricforwarder
bonzofenix May 15, 2024
b4e0010
Fix config validation
bonzofenix May 15, 2024
7154e98
Adds missing port for syslog server
bonzofenix May 15, 2024
305eb39
Adds logs
bonzofenix May 16, 2024
1fe0683
Fix emitter selection
bonzofenix May 16, 2024
847dbc8
Adds more logging
bonzofenix May 16, 2024
1617127
Adds port to syslog emitter
bonzofenix May 16, 2024
87d35c9
Adds missing certs
bonzofenix May 21, 2024
35ce9c7
Uses bosh dns to connect to syslog
bonzofenix May 21, 2024
b231df2
Sets certs in the right path
bonzofenix May 21, 2024
833a929
Fix typo
bonzofenix May 21, 2024
a887bbe
chore(deps): update dependency gruntwork-io/terragrunt to v0.58.0
renovate[bot] May 1, 2024
933d3d9
chore(deps): update ginkgo updates to v2.17.2
bonzofenix May 21, 2024
3a6c4a5
🤖🦾🛠️ go mod tidy & make package-specs
bonzofenix May 21, 2024
760bcce
chore(deps): update dependency gruntwork-io/terragrunt to v0.58.2
renovate[bot] May 2, 2024
ad4d37c
fix(deps): update module github.com/onsi/gomega to v1.33.1
renovate[bot] May 3, 2024
0269000
🤖🦾🛠️ go mod tidy & make package-specs
renovate[bot] May 3, 2024
81e4ceb
configure app memory via make
asalan316 Apr 17, 2024
b36cd07
test with 64MB test memory
asalan316 Apr 17, 2024
d9aca93
test with 128MB test memory
asalan316 Apr 18, 2024
71a5c69
remove debug statement
asalan316 May 2, 2024
a90219c
feat! Remove `buildin` mode (#2916)
silvestre May 3, 2024
c846c62
feat(deps): Add `devbox` config (#2914)
silvestre May 3, 2024
05fefaf
feat(direnv): Check if `devbox` is installed before invoking it (#2921)
silvestre May 6, 2024
950eaaf
chore(ci): Restore `use_buildin_mode` false until the next major version
silvestre May 13, 2024
24a8d72
feat(envrc): Automatically eval bbl env
silvestre May 8, 2024
ef3d946
chore(devbox): Add useful tools to devbox
silvestre May 14, 2024
32f92f5
chore(deps): update actions/checkout action to v4.1.5
renovate[bot] May 15, 2024
1bd28f6
fix(operator): Clean up scaling cooldowns
silvestre Apr 29, 2024
fa5c76b
chore(deps): update dependency credhub-cli to v2.9.30
renovate[bot] May 15, 2024
6eced2c
Update golang version to 1.21.5 (#2931)
app-autoscaler-ci-bot May 16, 2024
a35346c
fix(deps): update module github.com/gin-contrib/zap to v1.1.3
renovate[bot] May 15, 2024
c4563b1
🤖🦾🛠️ go mod tidy & make package-specs
renovate[bot] May 15, 2024
58e2a6f
chore(config): migrate config renovate.json
renovate[bot] May 15, 2024
1a5857f
chore(deps): update actions/checkout action to v4.1.6
renovate[bot] May 17, 2024
2ae603b
chore(deps): update dependency golang to v1.22.3
renovate[bot] May 17, 2024
bc61812
chore(deps): update dependency gruntwork-io/terragrunt to v0.58.7
renovate[bot] May 18, 2024
7ad9ff8
chore(deps): update dependency terraform to v1.8.3
renovate[bot] May 18, 2024
02eea37
Fix Linting
bonzofenix May 21, 2024
bfcff62
Does not remove postgres tls from bosh deployment
bonzofenix May 21, 2024
fba9349
Delete src/autoscaler/metricsforwarder/Makefile
bonzofenix May 21, 2024
8ae0682
Delete templates/app-autoscaler.yml
bonzofenix May 21, 2024
ca8d1df
Revert "Delete templates/app-autoscaler.yml"
bonzofenix May 21, 2024
52cd240
Update app-autoscaler.yml
bonzofenix May 21, 2024
13e7fe1
Update app-autoscaler.yml
bonzofenix May 21, 2024
891f58a
Remove unused security group
bonzofenix May 21, 2024
17b8d98
Adds missing dependencies
bonzofenix May 22, 2024
5b8391a
Undo changes from rebase
bonzofenix May 22, 2024
0cab630
Update .tool-versions
bonzofenix May 22, 2024
57eeb60
Undo changes from rebase
bonzofenix May 22, 2024
a4066dd
Update go mods
bonzofenix May 22, 2024
9b055e1
Removes hardcoded hostname in syslog messages
bonzofenix May 22, 2024
33a9212
Fix spec test
bonzofenix May 22, 2024
894aaa7
Merge branch 'main' into metricforwarder-on-cf
bonzofenix May 22, 2024
97fc50c
Adds missing package files for metricforwarder
bonzofenix May 22, 2024
754f2c3
Update jobs/metricsforwarder/spec
bonzofenix May 23, 2024
6e743b1
Update src/acceptance/Makefile
bonzofenix May 23, 2024
f02ca0c
Adds credhub mapping for asdf 2 devbox
bonzofenix May 24, 2024
7617857
Refactor ops files
bonzofenix May 24, 2024
5b17d96
Adds correct credhub version
bonzofenix May 24, 2024
a6c9ed1
Remove unused ops file
bonzofenix May 24, 2024
01ef890
Remove unused task
bonzofenix May 24, 2024
8338051
Remove comment
bonzofenix May 24, 2024
8c2917e
Remove unused manifesT
bonzofenix May 24, 2024
60391b7
Merge branch 'main' into metricforwarder-on-cf
bonzofenix May 24, 2024
9320a01
Update metricsforwarder spec file
bonzofenix May 24, 2024
c9b4bdf
🤖🦾🛠️ scripts/asdf2devbox.py
bonzofenix May 24, 2024
42b5872
Update src/autoscaler/metricsforwarder/config/config_test.go
bonzofenix May 24, 2024
8739456
Update src/autoscaler/metricsforwarder/forwarder/syslog_emitter.go
bonzofenix May 24, 2024
c1efa5e
Update templates/app-autoscaler.yml
bonzofenix May 24, 2024
0cf0175
Remove gitignore
bonzofenix May 24, 2024
5652f94
Change from context to when in metricsforwarder/forwarder test
bonzofenix May 24, 2024
59a5102
Update src/autoscaler/metricsforwarder/forwarder/metron_emitter.go
bonzofenix May 24, 2024
fbba19e
Update src/autoscaler/metricsforwarder/forwarder/metric_forwarder.go
bonzofenix May 24, 2024
d43bf4c
Update ci Readme
bonzofenix May 24, 2024
9c29de4
Update src/autoscaler/metricsforwarder/config/config_test.go
bonzofenix May 27, 2024
8fc6fb2
Update src/acceptance/Makefile
bonzofenix May 27, 2024
0d44af5
Adds missing acceptance tests pipeline for logcache syslog
bonzofenix May 27, 2024
a567e4a
Adds gum version to asdf
bonzofenix May 27, 2024
05ee5a8
Merge branch 'main' into metricforwarder-on-cf
bonzofenix May 27, 2024
f89e27d
🤖🦾🛠️ scripts/asdf2devbox.py
bonzofenix May 27, 2024
e60f202
Revert file renaming to maintain backward compatibility
bonzofenix May 28, 2024
1936380
🤖🦾🛠️ scripts/asdf2devbox.py
bonzofenix May 28, 2024
dfb43f4
Fix shellcheck recomendations
bonzofenix May 28, 2024
daf7b33
Update ci readme
bonzofenix May 28, 2024
ee5455e
Adds missing phony to ci makefile
bonzofenix May 28, 2024
15416b8
Improve unpause pipeline script
bonzofenix May 28, 2024
d15b856
Update golang version to 1.22.3
app-autoscaler-ci-bot May 28, 2024
cf5a73d
🤖🦾🛠️ scripts/asdf2devbox.py
app-autoscaler-ci-bot May 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .final_builds/packages/golang-1-linux/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ builds:
version: 126fca7399cba5bc8c1b02e392441f1688daf1586d57d1b3614e314b893a6cc4
blobstore_id: bcfa9608-1490-49d9-5488-b83dc9318735
sha1: sha256:70c3918c28cd74a0a9be561b5eac8b85e8e7de4a72bc66cd321288974937e0be
15120b8865dac54af5d5a7d1d1bc4d35acd37c114c2398f9edb16323184de634:
version: 15120b8865dac54af5d5a7d1d1bc4d35acd37c114c2398f9edb16323184de634
blobstore_id: fc0da6d7-04b8-4879-7370-0429a97de826
sha1: sha256:ba5980b79910c449ce872b087411918e39d4bd55294153c449ded491141f7d72
1bcec40078343f776c33b8ab9bd319709ff1114479ed3e450fade285678a7dc3:
version: 1bcec40078343f776c33b8ab9bd319709ff1114479ed3e450fade285678a7dc3
blobstore_id: 6bd50e18-21a8-443f-67d9-5e25a66e4ed9
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/acceptance_tests_reusable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ jobs:

deployment_cleanup:
needs: [ acceptance_tests_verify ]
if: "!contains(github.event.pull_request.labels.*.name, 'skip-cleanup')"
name: Deployment cleanup
runs-on: ubuntu-latest
container:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,5 @@ keys/
# easy sharing, see:
# <https://code.visualstudio.com/docs/editor/extension-marketplace#_workspace-recommended-extensions>
!.vscode/extensions.json

.devbox
4 changes: 3 additions & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
act 0.2.62
actionlint 1.6.27
bosh 7.3.1
credhub 2.9.29
cf 8.7.10
concourse 7.10.0
direnv 2.34.0
gcloud 473.0.0
ginkgo 2.17.3
golang 1.21.5
golang 1.22.3
golangci-lint 1.57.2
java temurin-21.0.3+9.0.LTS
make 4.4
maven 3.8.6
ruby 3.3.1
shellcheck 0.10.0
yq 4.43.1
gum 0.13.0
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ clean-scheduler:
@rm -rf src/scheduler/src/test/resources/certs
clean-certs:
@echo " - cleaning test certs"
@rm -f testcerts/*
@rm -f test-certs/*
clean-bosh-release:
@echo " - cleaning bosh dev releases"
@rm -rf dev_releases
Expand Down Expand Up @@ -231,7 +231,7 @@ lint: $(addprefix lint_,$(go_modules)) rubocop
rubocop:
@echo " - ruby scripts"
@bundle install
@bundle exec rubocop ./spec ./packages
@bundle exec rubocop ${RUBOCOP_OPTS} ./spec ./packages

.PHONY: markdownlint
markdownlint: markdownlint-cli
Expand Down Expand Up @@ -305,7 +305,7 @@ mod-download:

.PHONY: acceptance.go-mod-vendor autoscaler.go-mod-vendor changelog.go-mod-vendor \
changeloglockcleander.go-mod-vendor
go-mod-vendor: acceptance.go-mod-vendor autoscaler.go-mod-vendor changelog.go-mod-vendor \
go-mod-vendor: clean-vendor acceptance.go-mod-vendor autoscaler.go-mod-vendor changelog.go-mod-vendor \
changeloglockcleander.go-mod-vendor
acceptance.go-mod-vendor:
make --directory='${go-acceptance-dir}' go-mod-vendor
Expand Down
11 changes: 11 additions & 0 deletions ci/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

.PHONY: set-autoscaler-pipeline

set-autoscaler-pipeline:
@./autoscaler/set-pipeline.sh

.PHONY: unpause-pipeline

unpause-pipeline:
@./scripts/unpause-pipeline.sh

21 changes: 15 additions & 6 deletions ci/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# app-autoscaler-ci

This repository provides all public scripts and pipeline deployments used
by the app autoscaler team. The public pipeline is hosted at: <https://bosh.ci.cloudfoundry.org/>.

By the app autoscaler team. The public pipeline is hosted at: <https://concourse.app-runtime-interfaces.ci.cloudfoundry.org>.

To reproduce this pipeline, you can use your own private configuration files for the `pipeline.yml` files as described below.

## Autoscaler

This directory contains the concourse `pipeline.yml` for the autoscaler [pipeline](https://bosh.ci.cloudfoundry.org/pipelines/app-autoscaler)
This directory contains the concourse `pipeline.yml` for the autoscaler [pipeline](https://concourse.app-runtime-interfaces.ci.cloudfoundry.org/teams/app-autoscaler/pipelines/app-autoscaler-release)
and all of the associated scripts. To use this manifest, you need to provide a private configuration file

for all of the template parameters.

NOTE: If you are recreating this pipeline, for personal use and do not have authority to update
Expand All @@ -28,10 +30,17 @@ This directory contains the terragrunt managed stacks of resouces in account app
__Setup__

```
fly --target autoscaler login --team-name app-autoscaler --concourse-url https://bosh.ci.cloudfoundry.org/
push autoscaler
./set-pipeline.sh
popd
fly --target app-autoscaler-release login --team-name app-autoscaler --concourse-url https://concourse.app-runtime-interfaces.ci.cloudfoundry.org
make set-autoscaler-pipeline
```

## Unpause all/some jobs for any set pipeline

_Unpause_
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[markdownlint] reported by reviewdog 🐶
MD036/no-emphasis-as-heading Emphasis used instead of a heading [Context: "Unpause"]


```
# You will be prompted to select the specific jobs you want to unpause.
make unpause-pipeline
```

## Prometheus
Expand Down
89 changes: 81 additions & 8 deletions ci/autoscaler/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ anchors:
operations/set-release-version.yml
operations/enable-scheduler-logging.yml

app-autoscaler-ops-files-log-cache: &app-autoscaler-ops-files-log-cache
app-autoscaler-ops-files-log-cache-metron: &app-autoscaler-ops-files-log-cache-metron
OPS_FILES: |
operations/add-releases.yml
operations/instance-identity-cert-from-cf.yml
Expand All @@ -22,6 +22,22 @@ anchors:
operations/add-extra-plan.yml
operations/set-release-version.yml
operations/configure-log-cache-and-forward-metrics-via-mtls.yml
operations/enable-metricsforwarder-via-metron-agent.yml
operations/remove-metricsserver.yml
operations/remove-metricsgateway.yml
operations/enable-scheduler-logging.yml

app-autoscaler-ops-files-log-cache-syslog: &app-autoscaler-ops-files-log-cache-syslog
OPS_FILES: |
operations/add-releases.yml
operations/instance-identity-cert-from-cf.yml
operations/add-postgres-variables.yml
operations/enable-nats-tls.yml
operations/loggregator-certs-from-cf.yml
operations/add-extra-plan.yml
operations/set-release-version.yml
operations/configure-log-cache-and-forward-metrics-via-mtls.yml
operations/enable-metricsforwarder-via-syslog-agent.yml
operations/remove-metricsserver.yml
operations/remove-metricsgateway.yml
operations/enable-scheduler-logging.yml
Expand All @@ -42,7 +58,8 @@ groups:
- name: all
jobs:
- acceptance
- acceptance-log-cache
- acceptance-log-cache-metron
- acceptance-log-cache-syslog
- cleanup-autoscaler-deployments
- fetch-latest-stemcell
- draft
Expand All @@ -57,7 +74,8 @@ groups:
- name: autoscaler-release
jobs:
- acceptance
- acceptance-log-cache
- acceptance-log-cache-metron
- acceptance-log-cache-syslog
- draft
- integration-tests
- release
Expand Down Expand Up @@ -177,7 +195,8 @@ jobs:
vars:
branch_name: ((branch_name))
acceptance_deployment_name: ((acceptance_deployment_name))
logcache_acceptance_deployment_name: ((logcache_acceptance_deployment_name))
acceptance_deployment_name_logcache_metron: ((acceptance_deployment_name_logcache_metron))
acceptance_deployment_name_logcache_syslog: ((acceptance_deployment_name_logcache_syslog))

- name: unit-tests
public: true
Expand Down Expand Up @@ -260,15 +279,68 @@ jobs:
SUITES: broker
timeout: 15m

- name: acceptance-log-cache
- name: acceptance-log-cache-metron
public: true
build_logs_to_retain: 100
serial: true
on_success:
task: cleanup
file: ci/ci/autoscaler/tasks/cleanup-autoscaler.yml
params: &acceptance-log-cache-params
DEPLOYMENT_NAME: ((acceptance_deployment_name_logcache_metron))
plan:
- in_parallel:
- get: bbl-state
- get: app-autoscaler-release
passed: [unit-tests, integration-tests]
trigger: true
- get: ci
- task: make-prerelease
file: ci/ci/autoscaler/tasks/make/make.yaml
params:
# ⚠️ Here it is used that make officially guarantees to reach the goals in the provided order.
TARGETS: generate-fakes generate-openapi-generated-clients-and-servers go-mod-tidy go-mod-vendor db scheduler
timeout: 15m
- task: deploy-autoscaler
file: ci/ci/autoscaler/tasks/deploy-autoscaler.yml
params:
<<: *acceptance-log-cache-params
<<: *app-autoscaler-ops-files-log-cache-metron
timeout: 30m
- task: register-broker
file: ci/ci/autoscaler/tasks/register-broker.yml
params:
<<: *acceptance-log-cache-params
timeout: 5m
- in_parallel:
- task: autoscaler-acceptance-api
file: ci/ci/autoscaler/tasks/run-acceptance-tests.yml
params:
<<: *acceptance-log-cache-params
SUITES: api
timeout: 15m
- task: autoscaler-acceptance-app
file: ci/ci/autoscaler/tasks/run-acceptance-tests.yml
params:
<<: *acceptance-log-cache-params
SUITES: app
timeout: 45m
- task: autoscaler-acceptance-broker
file: ci/ci/autoscaler/tasks/run-acceptance-tests.yml
params:
<<: *acceptance-log-cache-params
SUITES: broker
timeout: 15m

- name: acceptance-log-cache-syslog
public: true
build_logs_to_retain: 100
serial: true
on_success:
task: cleanup
file: ci/ci/autoscaler/tasks/cleanup-autoscaler.yml
params: &acceptance-log-cache-params
DEPLOYMENT_NAME: ((logcache_acceptance_deployment_name))
DEPLOYMENT_NAME: ((acceptance_deployment_name_logcache_syslog))
plan:
- in_parallel:
- get: bbl-state
Expand All @@ -286,7 +358,7 @@ jobs:
file: ci/ci/autoscaler/tasks/deploy-autoscaler.yml
params:
<<: *acceptance-log-cache-params
<<: *app-autoscaler-ops-files-log-cache
<<: *app-autoscaler-ops-files-log-cache-syslog
timeout: 30m
- task: register-broker
file: ci/ci/autoscaler/tasks/register-broker.yml
Expand Down Expand Up @@ -374,7 +446,8 @@ jobs:
- get: app-autoscaler-release
passed:
- acceptance
- acceptance-log-cache
- acceptance-log-cache-metron
- acceptance-log-cache-syslog
trigger: true
- get: previous-stable-release
- task: deploy-previous-stable-release
Expand Down
1 change: 1 addition & 0 deletions ci/autoscaler/scripts/deploy-autoscaler.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ ops_files=${OPS_FILES:-"${autoscaler_dir}/operations/add-releases.yml\
${autoscaler_dir}/operations/remove-metricsserver.yml\
${autoscaler_dir}/operations/remove-metricsgateway.yml\
${autoscaler_dir}/operations/enable-log-cache-via-uaa.yml\
${autoscaler_dir}/operations/enable-metricsforwarder-via-syslog-agent.yml\
${autoscaler_dir}/operations/enable-scheduler-logging.yml"}


Expand Down
8 changes: 5 additions & 3 deletions ci/autoscaler/set-pipeline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ if "$(which gh)" > /dev/null; then
echo "gh cli found"
gh --version
else
echo "no gh cli found!"
echo "no gh cli found!"
exit 1
fi

Expand All @@ -31,10 +31,12 @@ function set_pipeline(){
add_var branch_name "${CURRENT_BRANCH}"
if [[ -z $PR_NUMBER ]]; then
add_var acceptance_deployment_name "acceptance"
add_var logcache_acceptance_deployment_name "acceptance-lc"
add_var acceptance_deployment_name_logcache_metron "acceptance-lc"
add_var acceptance_deployment_name_logcache_syslog "acceptance-lc-syslog"
else
add_var acceptance_deployment_name "${PR_NUMBER}-acceptance"
add_var logcache_acceptance_deployment_name "${PR_NUMBER}-acceptance-lc"
add_var acceptance_deployment_name_logcache_metron "${PR_NUMBER}-acceptance-lc"
add_var acceptance_deployment_name_logcache_syslog "${PR_NUMBER}-acceptance-lc-sl"
fi

# shellcheck disable=SC2086
Expand Down
52 changes: 52 additions & 0 deletions ci/scripts/unpause-pipeline.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#!/usr/bin/env bash
# shellcheck disable=SC2086
#

target="app-autoscaler-release"

function unpause-job(){
pipeline="$1"
jobs=$(fly -t "$target" jobs -p "$pipeline" --json | jq ".[] | select(.paused==true) | .name" -r)
selected_job=$(gum choose --no-limit $jobs --header "Select jobs to unpause from pipeline $pipeline")


if [[ -z "$selected_job" ]]; then
echo "No job selected to unpause"
return
fi

for j in $selected_job; do
fly -t "$target" unpause-job -j "$pipeline/$j"
done
}

function unpause-pipeline(){
payload=$(fly -t "$target" pipelines --json)

pipelines=$(echo "$payload" | jq ".[] |.name" -r | sort)
# ignore shellcheck warning
pipeline=$(gum choose $pipelines "all")

if [[ "$pipeline" == "all" ]]; then
for p in $pipelines; do
fly -t "$target" unpause-pipeline -p "$p"
unpause-job "$p"
done
else
fly -t "$target" unpause-pipeline -p "$pipeline"
unpause-job "$pipeline"
fi

}

function check-login(){
if ! fly -t "$target" status; then
echo
echo "fly -t $target login"
echo
exit 1
fi
}

check-login
unpause-pipeline "${@:-}"
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module apitester

go 1.21.5
go 1.22.3
11 changes: 6 additions & 5 deletions devbox.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"path:local-flake#app-autoscaler-cli-plugin",
"path:local-flake#log-cache-cli-plugin",
"path:local-flake#uaac",
"credhub-cli@latest",
"delve@latest",
"gh@latest",
"go-tools@latest",
Expand All @@ -29,13 +28,15 @@
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"google-cloud-sdk@latest",
"temurin-bin-17@latest",
"bundix@latest",
"oha@latest"
"oha@latest",
"[email protected]",
"[email protected]",
"google-cloud-sdk@latest",
"[email protected]",
"temurin-bin-17@latest"
],
"shell": {
"init_hook": [
Expand Down
Loading
Loading