cpl 2.0.0 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c304577e2c02b5778a463b82ec9a72792bd10b727687402d66a504d390673fae
4
- data.tar.gz: dc28bb00740914362abba26bc61cee999f7ac2d955218dca0ea6dbeef58d465e
3
+ metadata.gz: 87e32bc116e1b72a8282d38542a4ff8ba39240b4038e5cd5ad61bb7fda27a492
4
+ data.tar.gz: 496bc3b6fc6c49f6865a430c91d12e98400c6af3e9eb97cac24090b575365918
5
5
  SHA512:
6
- metadata.gz: 4812e651d14114d8d7bccf893cf50107dc9ba24b35679d633fc36d37589dfbae9d93eb8e8dc172bc66e4feb6039d6ab7c2093c0f35b1a544acab01b55c722c68
7
- data.tar.gz: 53013a61c2bcedc3ad10664f8d4a8874731013bb740abdb42fdac34dd82c3dc960b2643e9dea8227335040d2c2730eff6ed0cf47973d9344ddf5c5fc1bba7a99
6
+ metadata.gz: 6ac8eec9af37340bb5c2ac4b635daf6ab1b60c77893ecd412224879ae700c1569b0ac76675f520b245f4021d1d7476aafb95d5d067b4e5efaabedee1a8068176
7
+ data.tar.gz: 9d67284e4db41824b6492dd9a9aa6db37ea49261ac965dadc6efad5e0d4a4f9cc1aa383aac3964bd16ee5b879a76ee63dafa5f895a0e451a033bf35efce591b3
data/.gitignore CHANGED
@@ -14,4 +14,4 @@
14
14
  # rspec failure tracking
15
15
  .rspec_status
16
16
 
17
- spec.log
17
+ /spec.log
data/CHANGELOG.md CHANGED
@@ -12,190 +12,199 @@ Please follow the recommendations outlined at [keepachangelog.com](https://keepa
12
12
 
13
13
  Changes since the last non-beta release.
14
14
 
15
- _Please add entries here for your pull requests that are not yet released._
15
+ _Please add entries here for your pull requests that have not yet been released._
16
16
 
17
- ## [2.0.0.rc.1] - 2024-05-11
17
+ - Fixed issue with improper handling of job statuses. Fixed issue with interactive magic string showing and exit code. [PR 177](https://github.com/shakacode/control-plane-flow/pull/177) by [Sergey Tarasov](https://github.com/dzirtusss).
18
+
19
+ ## [2.0.1] - 2024-05-15
20
+
21
+ ### Fixed
22
+
23
+ - Fixed issue where `cleanup-stale-apps` command fails to delete apps with volumesets. [PR 175](https://github.com/shakacode/control-plane-flow/pull/175) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
24
+
25
+ ## [2.0.0] - 2024-05-14
18
26
 
19
27
  ### BREAKING CHANGES
20
28
 
21
- - Commands that finished with a failure now exit with code `64` instead of `1`. [PR 132](https://github.com/shakacode/heroku-to-control-plane/pull/132) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
22
- - Bumped minimum `cpln` version to `2.0.1` (`cpln workload cron get` is required). [PR 171](https://github.com/shakacode/heroku-to-control-plane/pull/171) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
23
- - `run:cleanup` command has been removed. [PR 151](https://github.com/shakacode/heroku-to-control-plane/pull/151) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
24
- - `deploy-image` command now runs the release script in the context of the `run` command. [PR 151](https://github.com/shakacode/heroku-to-control-plane/pull/151) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
29
+ - Commands that finished with a failure now exit with code `64` instead of `1`. [PR 132](https://github.com/shakacode/control-plane-flow/pull/132) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
30
+ - Bumped minimum `cpln` version to `2.0.1` (`cpln workload cron get` is required). [PR 171](https://github.com/shakacode/control-plane-flow/pull/171) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
31
+ - `run:cleanup` command has been removed. [PR 151](https://github.com/shakacode/control-plane-flow/pull/151) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
32
+ - `deploy-image` command now runs the release script in the context of the `run` command. [PR 151](https://github.com/shakacode/control-plane-flow/pull/151) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
25
33
 
26
34
  ### Fixed
27
35
 
28
- - Fixed race conditions when using latest image in `run` command. [PR 163](https://github.com/shakacode/heroku-to-control-plane/pull/163) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
36
+ - Fixed race conditions when using latest image in `run` command. [PR 163](https://github.com/shakacode/control-plane-flow/pull/163) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
29
37
 
30
38
  ### Added
31
39
 
32
- - Added options to `run` command to override the workload container's `--cpu`, `--memory`, and `--entrypoint`. [PR 151](https://github.com/shakacode/heroku-to-control-plane/pull/151) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
33
- - Added `--workload` option to `delete` command to delete a specific workload. [PR 151](https://github.com/shakacode/heroku-to-control-plane/pull/151) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
34
- - Added `--replica` option to `logs` command to see logs from a specific replica. [PR 151](https://github.com/shakacode/heroku-to-control-plane/pull/151) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
35
- - Added `--replica` option to `ps:stop` command to stop a specific replica. [PR 151](https://github.com/shakacode/heroku-to-control-plane/pull/151) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
36
- - Added option to set custom names for secrets and secrets policy, using `secrets_name` and `secrets_policy_name` in `controlplane.yml`. [PR 159](https://github.com/shakacode/heroku-to-control-plane/pull/159) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
40
+ - Added options to `run` command to override the workload container's `--cpu`, `--memory`, and `--entrypoint`. [PR 151](https://github.com/shakacode/control-plane-flow/pull/151) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
41
+ - Added `--workload` option to `delete` command to delete a specific workload. [PR 151](https://github.com/shakacode/control-plane-flow/pull/151) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
42
+ - Added `--replica` option to `logs` command to see logs from a specific replica. [PR 151](https://github.com/shakacode/control-plane-flow/pull/151) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
43
+ - Added `--replica` option to `ps:stop` command to stop a specific replica. [PR 151](https://github.com/shakacode/control-plane-flow/pull/151) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
44
+ - Added option to set custom names for secrets and secrets policy, using `secrets_name` and `secrets_policy_name` in `controlplane.yml`. [PR 159](https://github.com/shakacode/control-plane-flow/pull/159) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
37
45
 
38
46
  ### Changed
39
47
 
40
- - An error is now raised if the org does not exist. [PR 167](https://github.com/shakacode/heroku-to-control-plane/pull/167) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
41
- - Common options are now shown in help. [PR 169](https://github.com/shakacode/heroku-to-control-plane/pull/169) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
42
- - `run` command now uses a single reusable cron workload and works for both interactive and non-interactive jobs. [PR 151](https://github.com/shakacode/heroku-to-control-plane/pull/151) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
43
- - `run:detached` command has been deprecated in favor of `run`. [PR 151](https://github.com/shakacode/heroku-to-control-plane/pull/151) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
44
- - `deploy-image` command now raises an error if image does not exist. [PR 153](https://github.com/shakacode/heroku-to-control-plane/pull/153) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
45
- - `delete` command now unbinds identity from policy (if bound) when deleting app. [PR 170](https://github.com/shakacode/heroku-to-control-plane/pull/170) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
48
+ - An error is now raised if the org does not exist. [PR 167](https://github.com/shakacode/control-plane-flow/pull/167) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
49
+ - Common options are now shown in help. [PR 169](https://github.com/shakacode/control-plane-flow/pull/169) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
50
+ - `run` command now uses a single reusable cron workload and works for both interactive and non-interactive jobs. [PR 151](https://github.com/shakacode/control-plane-flow/pull/151) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
51
+ - `run:detached` command has been deprecated in favor of `run`. [PR 151](https://github.com/shakacode/control-plane-flow/pull/151) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
52
+ - `deploy-image` command now raises an error if image does not exist. [PR 153](https://github.com/shakacode/control-plane-flow/pull/153) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
53
+ - `delete` command now unbinds identity from policy (if bound) when deleting app. [PR 170](https://github.com/shakacode/control-plane-flow/pull/170) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
46
54
 
47
55
  ## [1.4.0] - 2024-03-20
48
56
 
49
57
  ### Added
50
58
 
51
- - Added new template substitution variables (used by `apply-template` and `setup-app` commands): `{{APP_LOCATION_LINK}}`, `{{APP_IMAGE_LINK}}`, `{{APP_IDENTITY}}`, `{{APP_IDENTITY_LINK}}`, `{{APP_SECRETS}}` and `{{APP_SECRETS_POLICY}}`. [PR 146](https://github.com/shakacode/heroku-to-control-plane/pull/146) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
52
- - Added `--run-release-phase` option to `deploy-image` command to run release script before deploying (same step as in `promote-app-from-upstream` command). [PR 146](https://github.com/shakacode/heroku-to-control-plane/pull/146) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
59
+ - Added new template substitution variables (used by `apply-template` and `setup-app` commands): `{{APP_LOCATION_LINK}}`, `{{APP_IMAGE_LINK}}`, `{{APP_IDENTITY}}`, `{{APP_IDENTITY_LINK}}`, `{{APP_SECRETS}}` and `{{APP_SECRETS_POLICY}}`. [PR 146](https://github.com/shakacode/control-plane-flow/pull/146) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
60
+ - Added `--run-release-phase` option to `deploy-image` command to run release script before deploying (same step as in `promote-app-from-upstream` command). [PR 146](https://github.com/shakacode/control-plane-flow/pull/146) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
53
61
 
54
62
  ### Changed
55
63
 
56
- - Template substitution (used by `apply-template` and `setup-app` commands) now uses double braces (e.g., `APP_ORG` -> `{{APP_ORG}}`). This change is backwards compatible. [PR 146](https://github.com/shakacode/heroku-to-control-plane/pull/146) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
57
- - Renamed template substitution variable `APP_GVC` to `{{APP_NAME}}` (used by `apply-template` and `setup-app` commands). This change is backwards compatible. [PR 146](https://github.com/shakacode/heroku-to-control-plane/pull/146) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
58
- - `setup-app` command now automatically binds the app to the secrets policy, as long as both the identity and the policy exist. Added `--skip-secret-access-binding` option to prevent this behavior. [PR 146](https://github.com/shakacode/heroku-to-control-plane/pull/146) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
59
- - Local API token is now refreshed when it is about to expire. [PR 146](https://github.com/shakacode/heroku-to-control-plane/pull/146) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
60
- - `apply-template` command now exits with non-zero code if failed to apply any templates. [PR 146](https://github.com/shakacode/heroku-to-control-plane/pull/146) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
64
+ - Template substitution (used by `apply-template` and `setup-app` commands) now uses double braces (e.g., `APP_ORG` -> `{{APP_ORG}}`). This change is backwards compatible. [PR 146](https://github.com/shakacode/control-plane-flow/pull/146) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
65
+ - Renamed template substitution variable `APP_GVC` to `{{APP_NAME}}` (used by `apply-template` and `setup-app` commands). This change is backwards compatible. [PR 146](https://github.com/shakacode/control-plane-flow/pull/146) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
66
+ - `setup-app` command now automatically binds the app to the secrets policy, as long as both the identity and the policy exist. Added `--skip-secret-access-binding` option to prevent this behavior. [PR 146](https://github.com/shakacode/control-plane-flow/pull/146) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
67
+ - Local API token is now refreshed when it is about to expire. [PR 146](https://github.com/shakacode/control-plane-flow/pull/146) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
68
+ - `apply-template` command now exits with non-zero code if failed to apply any templates. [PR 146](https://github.com/shakacode/control-plane-flow/pull/146) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
61
69
 
62
70
  ## [1.3.0] - 2024-03-19
63
71
 
64
72
  ### Fixed
65
73
 
66
- - Fixed issue where cpln profile was not switched back to `default` if an error happened while running `copy-image-from-upstream` command. [PR 135](https://github.com/shakacode/heroku-to-control-plane/pull/135) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
67
- - Fixed issue that didn't allow using upstream with `match_if_app_name_starts_with` set to `true` in `copy-image-from-upstream` command. [PR 136](https://github.com/shakacode/heroku-to-control-plane/pull/136) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
74
+ - Fixed issue where cpln profile was not switched back to `default` if an error happened while running `copy-image-from-upstream` command. [PR 135](https://github.com/shakacode/control-plane-flow/pull/135) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
75
+ - Fixed issue that didn't allow using upstream with `match_if_app_name_starts_with` set to `true` in `copy-image-from-upstream` command. [PR 136](https://github.com/shakacode/control-plane-flow/pull/136) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
68
76
 
69
77
  ### Added
70
78
 
71
- - Added `--no-clean-on-failure` option to `run:detached` command to skip deletion of failed workload run. [PR 133](https://github.com/shakacode/heroku-to-control-plane/pull/133) by [Justin Gordon](https://github.com/justin808) and [Rafael Gomes](https://github.com/rafaelgomesxyz).
72
- - Added `--domain` option to `maintenance`, `maintenance:on` and `maintenance:off` commands. [PR 131](https://github.com/shakacode/heroku-to-control-plane/pull/131) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
73
- - Added `default_domain` config to specify domain for `maintenance`, `maintenance:on` and `maintenance:off` commands. [PR 131](https://github.com/shakacode/heroku-to-control-plane/pull/131) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
74
- - Added option to specify upstream for `copy-image-from-upstream` command through `CPLN_UPSTREAM` env var. [PR 138](https://github.com/shakacode/heroku-to-control-plane/pull/138) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
79
+ - Added `--no-clean-on-failure` option to `run:detached` command to skip deletion of failed workload run. [PR 133](https://github.com/shakacode/control-plane-flow/pull/133) by [Justin Gordon](https://github.com/justin808) and [Rafael Gomes](https://github.com/rafaelgomesxyz).
80
+ - Added `--domain` option to `maintenance`, `maintenance:on` and `maintenance:off` commands. [PR 131](https://github.com/shakacode/control-plane-flow/pull/131) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
81
+ - Added `default_domain` config to specify domain for `maintenance`, `maintenance:on` and `maintenance:off` commands. [PR 131](https://github.com/shakacode/control-plane-flow/pull/131) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
82
+ - Added option to specify upstream for `copy-image-from-upstream` command through `CPLN_UPSTREAM` env var. [PR 138](https://github.com/shakacode/control-plane-flow/pull/138) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
75
83
 
76
84
  ### Changed
77
85
 
78
- - `build-image` command now accepts extra options and passes them to `docker build`. [PR 126](https://github.com/shakacode/heroku-to-control-plane/pull/126) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
79
- - `CPLN_ORG_UPSTREAM` env var now takes precedence over config from `controlplane.yml` in `copy-image-from-upstream` command. [PR 137](https://github.com/shakacode/heroku-to-control-plane/pull/137) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
80
- - `info` command now works properly for apps with `match_if_app_name_starts_with` set to `true`.[PR 139](https://github.com/shakacode/heroku-to-control-plane/pull/139) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
81
- - `info` command now lists workloads in the same order as `controlplane.yml`. [PR 139](https://github.com/shakacode/heroku-to-control-plane/pull/139) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
82
- - Improved domain workload matching for `maintenance`, `maintenance:on` and `maintenance:off` commands (instead of matching only by workload, it now matches by org + app + workload, which is more accurate). [PR 140](https://github.com/shakacode/heroku-to-control-plane/pull/140) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
86
+ - `build-image` command now accepts extra options and passes them to `docker build`. [PR 126](https://github.com/shakacode/control-plane-flow/pull/126) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
87
+ - `CPLN_ORG_UPSTREAM` env var now takes precedence over config from `controlplane.yml` in `copy-image-from-upstream` command. [PR 137](https://github.com/shakacode/control-plane-flow/pull/137) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
88
+ - `info` command now works properly for apps with `match_if_app_name_starts_with` set to `true`.[PR 139](https://github.com/shakacode/control-plane-flow/pull/139) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
89
+ - `info` command now lists workloads in the same order as `controlplane.yml`. [PR 139](https://github.com/shakacode/control-plane-flow/pull/139) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
90
+ - Improved domain workload matching for `maintenance`, `maintenance:on` and `maintenance:off` commands (instead of matching only by workload, it now matches by org + app + workload, which is more accurate). [PR 140](https://github.com/shakacode/control-plane-flow/pull/140) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
83
91
 
84
92
  ## [1.2.0] - 2024-01-03
85
93
 
86
94
  ### Fixed
87
95
 
88
- - Fixed issue where `info` command does not respect `CPLN_ORG` env var. [PR 88](https://github.com/shakacode/heroku-to-control-plane/pull/88) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
89
- - Fixed issues with running `cpl --version` and `cpl --help` where no configuration file exists. [PR 100](https://github.com/shakacode/heroku-to-control-plane/pull/100) by [Mostafa Ahangarha](https://github.com/ahangarha).
90
- - Fixed issue where `delete` command fails to delete apps with volumesets. [PR 123](https://github.com/shakacode/heroku-to-control-plane/pull/123) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
96
+ - Fixed issue where `info` command does not respect `CPLN_ORG` env var. [PR 88](https://github.com/shakacode/control-plane-flow/pull/88) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
97
+ - Fixed issues with running `cpl --version` and `cpl --help` where no configuration file exists. [PR 100](https://github.com/shakacode/control-plane-flow/pull/100) by [Mostafa Ahangarha](https://github.com/ahangarha).
98
+ - Fixed issue where `delete` command fails to delete apps with volumesets. [PR 123](https://github.com/shakacode/control-plane-flow/pull/123) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
91
99
 
92
100
  ### Added
93
101
 
94
- - Added `--org` option to all commands. [PR 88](https://github.com/shakacode/heroku-to-control-plane/pull/88) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
95
- - Added option to set the app with a `CPLN_APP` env var. [PR 88](https://github.com/shakacode/heroku-to-control-plane/pull/88) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
96
- - Show `org` and `app` on every command excluding `info`, `version`, `maintenance`, `env`, `ps`, and `latest_image`. [PR 94](https://github.com/shakacode/heroku-to-control-plane/pull/94) by [Mostafa Ahangarha](https://github.com/ahangarha).
97
- - Added option to only use `CPLN_ORG` and `CPLN_APP` env vars if `allow_org_override_by_env` and `allow_app_override_by_env` configs are set to `true` in `controlplane.yml`. [PR 109](https://github.com/shakacode/heroku-to-control-plane/pull/109) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
98
- - Added `CPLN_LOCATION` env variable and `--location` option for `apply-template`, `ps`, `run`, `run:detached`. [PR 105](https://github.com/shakacode/heroku-to-control-plane/pull/105) by [Mostafa Ahangarha](https://github.com/ahangarha).
99
- - Added `generate` command for creating basic Control Plane configuration directory. [PR 116](https://github.com/shakacode/heroku-to-control-plane/pull/116) by [Mostafa Ahangarhga](https://github.com/ahangarha).
100
- - Added `--trace` option to all commands for more detailed logs. [PR 124](https://github.com/shakacode/heroku-to-control-plane/pull/124) by [justin808](https://github.com/justin808)
102
+ - Added `--org` option to all commands. [PR 88](https://github.com/shakacode/control-plane-flow/pull/88) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
103
+ - Added option to set the app with a `CPLN_APP` env var. [PR 88](https://github.com/shakacode/control-plane-flow/pull/88) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
104
+ - Show `org` and `app` on every command excluding `info`, `version`, `maintenance`, `env`, `ps`, and `latest_image`. [PR 94](https://github.com/shakacode/control-plane-flow/pull/94) by [Mostafa Ahangarha](https://github.com/ahangarha).
105
+ - Added option to only use `CPLN_ORG` and `CPLN_APP` env vars if `allow_org_override_by_env` and `allow_app_override_by_env` configs are set to `true` in `controlplane.yml`. [PR 109](https://github.com/shakacode/control-plane-flow/pull/109) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
106
+ - Added `CPLN_LOCATION` env variable and `--location` option for `apply-template`, `ps`, `run`, `run:detached`. [PR 105](https://github.com/shakacode/control-plane-flow/pull/105) by [Mostafa Ahangarha](https://github.com/ahangarha).
107
+ - Added `generate` command for creating basic Control Plane configuration directory. [PR 116](https://github.com/shakacode/control-plane-flow/pull/116) by [Mostafa Ahangarhga](https://github.com/ahangarha).
108
+ - Added `--trace` option to all commands for more detailed logs. [PR 124](https://github.com/shakacode/control-plane-flow/pull/124) by [justin808](https://github.com/justin808)
101
109
  - Added better error message to check the org name in case of a 403 error. [PR 124](https://github.com/justin808) by [justin808](https://github.com/justin808)
102
110
 
103
111
  ### Changed
104
112
 
105
- - `--org` option now takes precedence over `CPLN_ORG` env var, which takes precedence over `cpln_org` from `controlplane.yml`. [PR 88](https://github.com/shakacode/heroku-to-control-plane/pull/88) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
106
- - Renamed `setup` config into `setup_app_templates`. [PR 112](https://github.com/shakacode/heroku-to-control-plane/pull/112) by [Mostafa Ahangarha](https://github.com/ahangarha).
113
+ - `--org` option now takes precedence over `CPLN_ORG` env var, which takes precedence over `cpln_org` from `controlplane.yml`. [PR 88](https://github.com/shakacode/control-plane-flow/pull/88) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
114
+ - Renamed `setup` config into `setup_app_templates`. [PR 112](https://github.com/shakacode/control-plane-flow/pull/112) by [Mostafa Ahangarha](https://github.com/ahangarha).
107
115
 
108
116
  ## [1.1.2] - 2023-10-17
109
117
 
110
118
  ### Fixed
111
119
 
112
- - Fixed failed build on MacOS by adding platform flag and fixed multiple files in yaml document for template. [PR 81](https://github.com/shakacode/heroku-to-control-plane/pull/81) by [justin808](https://github.com/justin808).
120
+ - Fixed failed build on MacOS by adding platform flag and fixed multiple files in yaml document for template. [PR 81](https://github.com/shakacode/control-plane-flow/pull/81) by [justin808](https://github.com/justin808).
113
121
 
114
122
  ### Added
115
123
 
116
- - Added `open-console` command to open the app console on Control Plane. [PR 83](https://github.com/shakacode/heroku-to-control-plane/pull/83) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
117
- - Added option to set the org with a `CPLN_ORG`/`CPLN_ORG_UPSTREAM` env var. [PR 83](https://github.com/shakacode/heroku-to-control-plane/pull/83) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
118
- - Added `--verbose` option to all commands for more detailed logs. [PR 83](https://github.com/shakacode/heroku-to-control-plane/pull/83) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
124
+ - Added `open-console` command to open the app console on Control Plane. [PR 83](https://github.com/shakacode/control-plane-flow/pull/83) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
125
+ - Added option to set the org with a `CPLN_ORG`/`CPLN_ORG_UPSTREAM` env var. [PR 83](https://github.com/shakacode/control-plane-flow/pull/83) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
126
+ - Added `--verbose` option to all commands for more detailed logs. [PR 83](https://github.com/shakacode/control-plane-flow/pull/83) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
119
127
 
120
128
  ### Changed
121
129
 
122
- - Calling `cpl` with no command now shows the help menu. [PR 83](https://github.com/shakacode/heroku-to-control-plane/pull/83) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
130
+ - Calling `cpl` with no command now shows the help menu. [PR 83](https://github.com/shakacode/control-plane-flow/pull/83) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
123
131
 
124
132
  ## [1.1.1] - 2023-09-23
125
133
 
126
134
  ### Fixed
127
135
 
128
- - Fixed issue where API token is not reset when switching profile. [PR 77](https://github.com/shakacode/heroku-to-control-plane/pull/77) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
136
+ - Fixed issue where API token is not reset when switching profile. [PR 77](https://github.com/shakacode/control-plane-flow/pull/77) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
129
137
 
130
138
  ## [1.1.0] - 2023-09-20
131
139
 
132
140
  ### Fixed
133
141
 
134
- - Fixed issue where `copy-image-from-upstream` command does not copy commit. [PR 70](https://github.com/shakacode/heroku-to-control-plane/pull/70) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
135
- - Fixed issue where an error is not raised if the app is not defined. [PR 73](https://github.com/shakacode/heroku-to-control-plane/pull/73) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
136
- - Fixed issue where `CPLN_ENDPOINT` is not used if available. [PR 75](https://github.com/shakacode/heroku-to-control-plane/pull/75) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
142
+ - Fixed issue where `copy-image-from-upstream` command does not copy commit. [PR 70](https://github.com/shakacode/control-plane-flow/pull/70) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
143
+ - Fixed issue where an error is not raised if the app is not defined. [PR 73](https://github.com/shakacode/control-plane-flow/pull/73) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
144
+ - Fixed issue where `CPLN_ENDPOINT` is not used if available. [PR 75](https://github.com/shakacode/control-plane-flow/pull/75) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
137
145
 
138
146
  ### Added
139
147
 
140
- - Added `image_retention_max_qty` config to clean up images based on max quantity with `cleanup-images` command. [PR 72](https://github.com/shakacode/heroku-to-control-plane/pull/72) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
148
+ - Added `image_retention_max_qty` config to clean up images based on max quantity with `cleanup-images` command. [PR 72](https://github.com/shakacode/control-plane-flow/pull/72) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
141
149
 
142
150
  ### Changed
143
151
 
144
- - Updated docs for `run` commands regarding passing arguments at the end. [PR 71](https://github.com/shakacode/heroku-to-control-plane/pull/71) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
145
- - Renamed `cleanup-old-images` command to `cleanup-images`. [PR 72](https://github.com/shakacode/heroku-to-control-plane/pull/72) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
146
- - Renamed `old_image_retention_days` config to `image_retention_days`. [PR 72](https://github.com/shakacode/heroku-to-control-plane/pull/72) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
152
+ - Updated docs for `run` commands regarding passing arguments at the end. [PR 71](https://github.com/shakacode/control-plane-flow/pull/71) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
153
+ - Renamed `cleanup-old-images` command to `cleanup-images`. [PR 72](https://github.com/shakacode/control-plane-flow/pull/72) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
154
+ - Renamed `old_image_retention_days` config to `image_retention_days`. [PR 72](https://github.com/shakacode/control-plane-flow/pull/72) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
147
155
 
148
156
  ## [1.0.4] - 2023-07-21
149
157
 
150
158
  ### Fixed
151
159
 
152
- - Fixed issue where `run` commands fail when not providing image. [PR 68](https://github.com/shakacode/heroku-to-control-plane/pull/68) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
160
+ - Fixed issue where `run` commands fail when not providing image. [PR 68](https://github.com/shakacode/control-plane-flow/pull/68) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
153
161
 
154
162
  ## [1.0.3] - 2023-07-07
155
163
 
156
164
  ### Fixed
157
165
 
158
- - Fixed `run` commands when specifying image. [PR 62](https://github.com/shakacode/heroku-to-control-plane/pull/62) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
159
- - Fixed `run:cleanup` command for non-interactive workloads. [PR 63](https://github.com/shakacode/heroku-to-control-plane/pull/63) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
160
- - Fixed `run:cleanup` command for all apps that start with name. [PR 64](https://github.com/shakacode/heroku-to-control-plane/pull/64) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
161
- - Fixed `cleanup-old-images` command for all apps that start with name. [PR 65](https://github.com/shakacode/heroku-to-control-plane/pull/65) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
162
- - Fixed `--help` option. [PR 66](https://github.com/shakacode/heroku-to-control-plane/pull/66) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
166
+ - Fixed `run` commands when specifying image. [PR 62](https://github.com/shakacode/control-plane-flow/pull/62) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
167
+ - Fixed `run:cleanup` command for non-interactive workloads. [PR 63](https://github.com/shakacode/control-plane-flow/pull/63) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
168
+ - Fixed `run:cleanup` command for all apps that start with name. [PR 64](https://github.com/shakacode/control-plane-flow/pull/64) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
169
+ - Fixed `cleanup-old-images` command for all apps that start with name. [PR 65](https://github.com/shakacode/control-plane-flow/pull/65) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
170
+ - Fixed `--help` option. [PR 66](https://github.com/shakacode/control-plane-flow/pull/66) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
163
171
 
164
172
  ### Added
165
173
 
166
- - Added `--use-local-token` option to `run:detached` command. [PR 61](https://github.com/shakacode/heroku-to-control-plane/pull/61) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
174
+ - Added `--use-local-token` option to `run:detached` command. [PR 61](https://github.com/shakacode/control-plane-flow/pull/61) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
167
175
 
168
176
  ## [1.0.2] - 2023-07-02
169
177
 
170
178
  ### Added
171
179
 
172
- - Added steps to migrate to docs. [PR 57](https://github.com/shakacode/heroku-to-control-plane/pull/57) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
173
- - Added `ps:wait` command. [PR 58](https://github.com/shakacode/heroku-to-control-plane/pull/58) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
180
+ - Added steps to migrate to docs. [PR 57](https://github.com/shakacode/control-plane-flow/pull/57) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
181
+ - Added `ps:wait` command. [PR 58](https://github.com/shakacode/control-plane-flow/pull/58) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
174
182
 
175
183
  ## [1.0.1] - 2023-06-28
176
184
 
177
185
  ### Fixed
178
186
 
179
- - Fixed `cleanup-stale-apps` command when app does not have image. [PR 55](https://github.com/shakacode/heroku-to-control-plane/pull/55) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
187
+ - Fixed `cleanup-stale-apps` command when app does not have image. [PR 55](https://github.com/shakacode/control-plane-flow/pull/55) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
180
188
 
181
189
  ### Changed
182
190
 
183
- - Improved docs. [PR 50](https://github.com/shakacode/heroku-to-control-plane/pull/50) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
191
+ - Improved docs. [PR 50](https://github.com/shakacode/control-plane-flow/pull/50) by [Rafael Gomes](https://github.com/rafaelgomesxyz).
184
192
 
185
193
  ## [1.0.0] - 2023-05-29
186
194
 
187
195
  - Initial release
188
196
 
189
- [Unreleased]: https://github.com/shakacode/heroku-to-control-plane/compare/v2.0.0.rc.1...HEAD
190
- [2.0.0.rc.1]: https://github.com/shakacode/heroku-to-control-plane/compare/v1.4.0...v2.0.0.rc.1
191
- [1.4.0]: https://github.com/shakacode/heroku-to-control-plane/compare/v1.3.0...v1.4.0
192
- [1.3.0]: https://github.com/shakacode/heroku-to-control-plane/compare/v1.2.0...v1.3.0
193
- [1.2.0]: https://github.com/shakacode/heroku-to-control-plane/compare/v1.1.2...v1.2.0
194
- [1.1.2]: https://github.com/shakacode/heroku-to-control-plane/compare/v1.1.1...v1.1.2
195
- [1.1.1]: https://github.com/shakacode/heroku-to-control-plane/compare/v1.1.0...v1.1.1
196
- [1.1.0]: https://github.com/shakacode/heroku-to-control-plane/compare/v1.0.4...v1.1.0
197
- [1.0.4]: https://github.com/shakacode/heroku-to-control-plane/compare/v1.0.3...v1.0.4
198
- [1.0.3]: https://github.com/shakacode/heroku-to-control-plane/compare/v1.0.2...v1.0.3
199
- [1.0.2]: https://github.com/shakacode/heroku-to-control-plane/compare/v1.0.1...v1.0.2
200
- [1.0.1]: https://github.com/shakacode/heroku-to-control-plane/compare/v1.0.0...v1.0.1
201
- [1.0.0]: https://github.com/shakacode/heroku-to-control-plane/releases/tag/v1.0.0
197
+ [Unreleased]: https://github.com/shakacode/control-plane-flow/compare/v2.0.1...HEAD
198
+ [2.0.1]: https://github.com/shakacode/control-plane-flow/compare/v2.0.0...v2.0.1
199
+ [2.0.0]: https://github.com/shakacode/control-plane-flow/compare/v1.4.0...v2.0.0
200
+ [1.4.0]: https://github.com/shakacode/control-plane-flow/compare/v1.3.0...v1.4.0
201
+ [1.3.0]: https://github.com/shakacode/control-plane-flow/compare/v1.2.0...v1.3.0
202
+ [1.2.0]: https://github.com/shakacode/control-plane-flow/compare/v1.1.2...v1.2.0
203
+ [1.1.2]: https://github.com/shakacode/control-plane-flow/compare/v1.1.1...v1.1.2
204
+ [1.1.1]: https://github.com/shakacode/control-plane-flow/compare/v1.1.0...v1.1.1
205
+ [1.1.0]: https://github.com/shakacode/control-plane-flow/compare/v1.0.4...v1.1.0
206
+ [1.0.4]: https://github.com/shakacode/control-plane-flow/compare/v1.0.3...v1.0.4
207
+ [1.0.3]: https://github.com/shakacode/control-plane-flow/compare/v1.0.2...v1.0.3
208
+ [1.0.2]: https://github.com/shakacode/control-plane-flow/compare/v1.0.1...v1.0.2
209
+ [1.0.1]: https://github.com/shakacode/control-plane-flow/compare/v1.0.0...v1.0.1
210
+ [1.0.0]: https://github.com/shakacode/control-plane-flow/releases/tag/v1.0.0
data/CONTRIBUTING.md CHANGED
@@ -6,10 +6,10 @@ Rather than installing `cpl` as a Ruby gem, install this repo locally and alias
6
6
  access, e.g.:
7
7
 
8
8
  ```sh
9
- git clone https://github.com/shakacode/heroku-to-control-plane
9
+ git clone https://github.com/shakacode/control-plane-flow
10
10
 
11
11
  # Create an alias in some local shell startup script, e.g., `.profile`, `.bashrc`, etc.
12
- alias cpl="~/projects/heroku-to-control-plane/bin/cpl"
12
+ alias cpl="~/projects/control-plane-flow/bin/cpl"
13
13
  ```
14
14
 
15
15
  ## Linting
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cpl (2.0.0)
4
+ cpl (2.0.2)
5
5
  debug (~> 1.7.1)
6
6
  dotenv (~> 2.8.1)
7
7
  jwt (~> 2.8.1)
data/README.md CHANGED
@@ -6,8 +6,8 @@
6
6
  <meta name="keywords" content="Control Plane, Heroku, Kubernetes, K8, Infrastructure">
7
7
  <meta name="google-site-verification" content="dIV4nMplcYl6YOKOaZMqgvdKXhLJ4cdYY6pS6e_YrPU" />
8
8
 
9
- [![RSpec](https://github.com/shakacode/heroku-to-control-plane/actions/workflows/rspec.yml/badge.svg)](https://github.com/shakacode/heroku-to-control-plane/actions/workflows/rspec.yml)
10
- [![Rubocop](https://github.com/shakacode/heroku-to-control-plane/actions/workflows/rubocop.yml/badge.svg)](https://github.com/shakacode/heroku-to-control-plane/actions/workflows/rubocop.yml)
9
+ [![RSpec](https://github.com/shakacode/control-plane-flow/actions/workflows/rspec.yml/badge.svg)](https://github.com/shakacode/control-plane-flow/actions/workflows/rspec.yml)
10
+ [![Rubocop](https://github.com/shakacode/control-plane-flow/actions/workflows/rubocop.yml/badge.svg)](https://github.com/shakacode/control-plane-flow/actions/workflows/rubocop.yml)
11
11
 
12
12
  [![Gem](https://badge.fury.io/rb/cpl.svg)](https://badge.fury.io/rb/cpl)
13
13
 
data/cpl.gemspec CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
 
11
11
  spec.summary = "Heroku to Control Plane"
12
12
  spec.description = "CLI for providing Heroku-like platform-as-a-service on Control Plane"
13
- spec.homepage = "https://github.com/shakacode/heroku-to-control-plane"
13
+ spec.homepage = "https://github.com/shakacode/control-plane-flow"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.required_ruby_version = ">= 2.7.0"
data/docs/commands.md CHANGED
@@ -66,7 +66,8 @@ cpl cleanup-images -a $APP_NAME
66
66
 
67
67
  ### `cleanup-stale-apps`
68
68
 
69
- - Deletes the whole app (GVC with all workloads and all images) for all stale apps
69
+ - Deletes the whole app (GVC with all workloads, all volumesets and all images) for all stale apps
70
+ - Also unbinds the app from the secrets policy, as long as both the identity and the policy exist (and are bound)
70
71
  - Stale apps are identified based on the creation date of the latest image
71
72
  - Specify the amount of days after an app should be considered stale through `stale_app_image_deployed_days` in the `.controlplane/controlplane.yml` file
72
73
  - If `match_if_app_name_starts_with` is `true` in the `.controlplane/controlplane.yml` file, it will delete all stale apps that start with the name
@@ -7,9 +7,10 @@ module Command
7
7
  app_option(required: true),
8
8
  skip_confirm_option
9
9
  ].freeze
10
- DESCRIPTION = "Deletes the whole app (GVC with all workloads and all images) for all stale apps"
10
+ DESCRIPTION = "Deletes the whole app (GVC with all workloads, all volumesets and all images) for all stale apps"
11
11
  LONG_DESCRIPTION = <<~DESC
12
- - Deletes the whole app (GVC with all workloads and all images) for all stale apps
12
+ - Deletes the whole app (GVC with all workloads, all volumesets and all images) for all stale apps
13
+ - Also unbinds the app from the secrets policy, as long as both the identity and the policy exist (and are bound)
13
14
  - Stale apps are identified based on the creation date of the latest image
14
15
  - Specify the amount of days after an app should be considered stale through `stale_app_image_deployed_days` in the `.controlplane/controlplane.yml` file
15
16
  - If `match_if_app_name_starts_with` is `true` in the `.controlplane/controlplane.yml` file, it will delete all stale apps that start with the name
@@ -28,8 +29,8 @@ module Command
28
29
 
29
30
  progress.puts
30
31
  stale_apps.each do |app|
31
- delete_gvc(app)
32
- delete_images(app)
32
+ delete_app(app[:name])
33
+ progress.puts
33
34
  end
34
35
  end
35
36
 
@@ -57,8 +58,7 @@ module Command
57
58
 
58
59
  apps.push({
59
60
  name: app_name,
60
- date: created_date,
61
- images: images.map { |current_image| current_image["name"] }
61
+ date: created_date
62
62
  })
63
63
  end
64
64
 
@@ -72,18 +72,8 @@ module Command
72
72
  Shell.confirm("\nAre you sure you want to delete these #{stale_apps.length} apps?")
73
73
  end
74
74
 
75
- def delete_gvc(app)
76
- step("Deleting app '#{app[:name]}'") do
77
- cp.gvc_delete(app[:name])
78
- end
79
- end
80
-
81
- def delete_images(app)
82
- app[:images].each do |image|
83
- step("Deleting image '#{image}'") do
84
- cp.image_delete(image)
85
- end
86
- end
75
+ def delete_app(app)
76
+ Cpl::Cli.start(["delete", "-a", app, "--yes"])
87
77
  end
88
78
  end
89
79
  end
@@ -36,7 +36,9 @@ module Command
36
36
  private
37
37
 
38
38
  def delete_single_workload(workload)
39
- return progress.puts("Workload '#{workload}' does not exist.") if cp.fetch_workload(workload).nil?
39
+ if cp.fetch_workload(workload).nil?
40
+ return progress.puts("Workload '#{workload}' does not exist in app '#{config.app}'.")
41
+ end
40
42
  return unless confirm_delete(workload)
41
43
 
42
44
  delete_workload(workload)
@@ -57,9 +59,9 @@ module Command
57
59
 
58
60
  def check_volumesets
59
61
  @volumesets = cp.fetch_volumesets["items"]
60
- return progress.puts("No volumesets to delete.") unless @volumesets.any?
62
+ return progress.puts("No volumesets to delete from app '#{config.app}'.") unless @volumesets.any?
61
63
 
62
- message = "The following volumesets will be deleted along with the app:"
64
+ message = "The following volumesets will be deleted along with the app '#{config.app}':"
63
65
  volumesets_list = @volumesets.map { |volumeset| "- #{volumeset['name']}" }.join("\n")
64
66
  progress.puts("#{Shell.color(message, :red)}\n#{volumesets_list}\n\n")
65
67
  end
@@ -67,9 +69,9 @@ module Command
67
69
  def check_images
68
70
  @images = cp.query_images["items"]
69
71
  .select { |image| image["name"].start_with?("#{config.app}:") }
70
- return progress.puts("No images to delete.") unless @images.any?
72
+ return progress.puts("No images to delete from app '#{config.app}'.") unless @images.any?
71
73
 
72
- message = "The following images will be deleted along with the app:"
74
+ message = "The following images will be deleted along with the app '#{config.app}':"
73
75
  images_list = @images.map { |image| "- #{image['name']}" }.join("\n")
74
76
  progress.puts("#{Shell.color(message, :red)}\n#{images_list}\n\n")
75
77
  end
@@ -91,14 +93,14 @@ module Command
91
93
  end
92
94
 
93
95
  def delete_workload(workload)
94
- step("Deleting workload '#{workload}'") do
96
+ step("Deleting workload '#{workload}' from app '#{config.app}'") do
95
97
  cp.delete_workload(workload)
96
98
  end
97
99
  end
98
100
 
99
101
  def delete_volumesets
100
102
  @volumesets.each do |volumeset|
101
- step("Deleting volumeset '#{volumeset['name']}'") do
103
+ step("Deleting volumeset '#{volumeset['name']}' from app '#{config.app}'") do
102
104
  # If the volumeset is attached to a workload, we need to delete the workload first
103
105
  workload = volumeset.dig("status", "usedByWorkload")&.split("/")&.last
104
106
  cp.delete_workload(workload) if workload
@@ -110,7 +112,7 @@ module Command
110
112
 
111
113
  def delete_images
112
114
  @images.each do |image|
113
- step("Deleting image '#{image['name']}'") do
115
+ step("Deleting image '#{image['name']}' from app '#{config.app}'") do
114
116
  cp.image_delete(image["name"])
115
117
  end
116
118
  end
@@ -127,7 +129,7 @@ module Command
127
129
  end
128
130
  return unless is_bound
129
131
 
130
- step("Unbinding identity from policy") do
132
+ step("Unbinding identity from policy for app '#{config.app}'") do
131
133
  cp.unbind_identity_from_policy(app_identity_link, app_secrets_policy)
132
134
  end
133
135
  end
data/lib/command/run.rb CHANGED
@@ -395,7 +395,7 @@ module Command
395
395
  script += interactive_runner_script if interactive
396
396
 
397
397
  script +=
398
- if @log_method == 1
398
+ if @log_method == 1 || @interactive
399
399
  args_join(config.args)
400
400
  else
401
401
  <<~SCRIPT
@@ -442,16 +442,22 @@ module Command
442
442
  )
443
443
  end
444
444
 
445
- def resolve_job_status
446
- result = cp.fetch_cron_workload(runner_workload, location: location)
447
- job_details = result&.dig("items")&.find { |item| item["id"] == job }
448
- status = job_details&.dig("status")
445
+ def resolve_job_status # rubocop:disable Metrics/MethodLength
446
+ loop do
447
+ result = cp.fetch_cron_workload(runner_workload, location: location)
448
+ job_details = result&.dig("items")&.find { |item| item["id"] == job }
449
+ status = job_details&.dig("status")
450
+
451
+ Shell.debug("JOB STATUS", status)
449
452
 
450
- case status
451
- when "failed"
452
- ExitCode::ERROR_DEFAULT
453
- when "successful"
454
- ExitCode::SUCCESS
453
+ case status
454
+ when "active"
455
+ sleep 1
456
+ when "successful"
457
+ break ExitCode::SUCCESS
458
+ else
459
+ break ExitCode::ERROR_DEFAULT
460
+ end
455
461
  end
456
462
  end
457
463
 
data/lib/core/shell.rb CHANGED
@@ -90,4 +90,11 @@ class Shell
90
90
 
91
91
  message.gsub(pattern, "XXXXXXX")
92
92
  end
93
+
94
+ def self.trap_interrupt
95
+ trap("SIGINT") do
96
+ puts
97
+ exit(ExitCode::INTERRUPT)
98
+ end
99
+ end
93
100
  end
data/lib/cpl/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cpl
4
- VERSION = "2.0.0"
4
+ VERSION = "2.0.2"
5
5
  MIN_CPLN_VERSION = "2.0.1"
6
6
  end
data/lib/cpl.rb CHANGED
@@ -267,8 +267,4 @@ module Cpl
267
267
  end
268
268
  end
269
269
 
270
- # nice Ctrl+C
271
- trap "INT" do
272
- puts
273
- exit(ExitCode::INTERRUPT)
274
- end
270
+ Shell.trap_interrupt unless ENV.fetch("DISABLE_INTERRUPT_TRAP", nil) == "true"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cpl
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Gordon
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-05-15 00:00:00.000000000 Z
12
+ date: 2024-05-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: debug
@@ -247,7 +247,6 @@ files:
247
247
  - docs/troubleshooting.md
248
248
  - examples/circleci.yml
249
249
  - examples/controlplane.yml
250
- - googlee2da545df05d92f9.html
251
250
  - lib/command/apply_template.rb
252
251
  - lib/command/base.rb
253
252
  - lib/command/build_image.rb
@@ -313,7 +312,7 @@ files:
313
312
  - templates/redis2.yml
314
313
  - templates/secrets.yml
315
314
  - templates/sidekiq.yml
316
- homepage: https://github.com/shakacode/heroku-to-control-plane
315
+ homepage: https://github.com/shakacode/control-plane-flow
317
316
  licenses:
318
317
  - MIT
319
318
  metadata:
@@ -333,7 +332,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
333
332
  - !ruby/object:Gem::Version
334
333
  version: '0'
335
334
  requirements: []
336
- rubygems_version: 3.4.21
335
+ rubygems_version: 3.5.10
337
336
  signing_key:
338
337
  specification_version: 4
339
338
  summary: Heroku to Control Plane
@@ -1 +0,0 @@
1
- google-site-verification: googlee2da545df05d92f9.html