GoogleCloudPlatform / GoogleCloudPlatform/pubsec-declarative-toolkit
Fix LZ V2 readme KPT instructions - URL variable per package - missing from core-landing-zone kpt package pull instructions - causing script error
- Dominant language
- Shell
- Stars
- 36
- Forks
- 26
- PR merge metrics
- No merged PRs in 30d
Description
see section 2
https://github.com/GoogleCloudPlatform/pubsec-declarative-toolkit/tree/main/docs/landing-zone-v2#folder-structure-per-environment-dev-preprod-prod
history
https://github.com/GoogleCloudPlatform/pubsec-declarative-toolkit/commit/d6694fb3428eb3c9799476bf4d35b2bc0517e5cd
```
michael@cloudshell:~/kcc-oi/kpt (kcc-oi)$ PACKAGE="solutions/gatekeeper-policies"
michael@cloudshell:~/kcc-oi/kpt (kcc-oi)$ VERSION=$(curl -s $URL | jq -r ".\"$PACKAGE\"")
curl: no URL specified!
curl: try 'curl --help' or 'curl --manual' for more information
```
add all 4 specific URLs per package
```
michael@cloudshell:~/kcc-oi/kpt (kcc-oi)$ URL=https://github.com/GoogleCloudPlatform/pubsec-declarative-toolkit/releases?q=gatekeeper&expanded=true
michael@cloudshell:~/kcc-oi/kpt (kcc-oi)$ curl -s $URL | jq -r ".\"$PACKAGE\""
parse error: Invalid numeric literal at line 8, column 10
```
or workaround - just get main for now
```
michael@cloudshell:~/kcc-oi/kpt (kcc-oi)$ VERSION=main
michael@cloudshell:~/kcc-oi/kpt (kcc-oi)$ kpt pkg get https://github.com/GoogleCloudPlatform/pubsec-declarative-toolkit.git/${PACKAGE}@${VERSION}
Package "gatekeeper-policies":
Fetching https://github.com/GoogleCloudPlatform/pubsec-declarative-toolkit@main
From https://github.com/GoogleCloudPlatform/pubsec-declarative-toolkit
* branch main -> FETCH_HEAD
* [new branch] main -> origin/main
Adding package "solutions/gatekeeper-policies".
Fetched 1 package(s).
```
adjustment
```
add URL
URL="https://github.com/GoogleCloudPlatform/pubsec-declarative-toolkit/releases?q=gatekeeper&expanded=true"
michael@cloudshell:~ (duet-ai-old)$ VERSION=$(curl -s $URL | jq -r ".\"$PACKAGE\"")
parse error: Invalid numeric literal at line 8, column 10
```
we are looking for the following format in html - getting json
```
solutions/gatekeeper-policies: v0.2.0
```
json
URL="https://api.github.com/repos/GoogleCloudPlatform/pubsec-declarative-toolkit/releases"
Contributor guide
Assessment
This issue has not been assessed yet.