You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello and thanks for the the tutorial on "Deploy a website with Cloud Run".
I believe that step 9 for cleaning up has an issue in the section for "Delete Cloud Build artifacts from Cloud Storage":
The command for printing all available soures is:
gcloud builds list | awk 'NR > 1 {print $4}'
This returns blank lines.
If I run "gcloud builds list", the results with the available source archives only have data in two fields, one with the description of the fields ($1) and one with the information ($2).
When running for field 1, I get the following:
When running for field 2, I get the following:
I believe that the $4 in the example is wrong as there is no 4th field to populate data from as the fields seem to be read in columns.
That explains why when running with $4, I get blank lines, since there is no 4 field when the data are read columnwise.
I assume the intention was to read rows of IDs, and except for the first one (which is the last one created), pull the 4th field (SOURCE) for other entries and remove them.
However for that to happen, I assume some additional command is required to read the fields in rows for each entry?
The text was updated successfully, but these errors were encountered:
I believe that the correct syntax should be:
gcloud builds list | awk '/^SOURCE:/ {print $2}' but this prints all sources.
It somehow needs to be combined with NR>1 to exclude the top entry but
gcloud builds list | awk 'NR > 1 && /^SOURCE:/ {print $2}'
does not seem to be reading the first entry, just the 1st row (ID).
Hello and thanks for the the tutorial on "Deploy a website with Cloud Run".
![image](https://private-user-images.githubusercontent.com/94967096/240966685-8e40fb4d-bf47-405c-8659-bc2ca17ed792.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NjM0NDgsIm5iZiI6MTczODk2MzE0OCwicGF0aCI6Ii85NDk2NzA5Ni8yNDA5NjY2ODUtOGU0MGZiNGQtYmY0Ny00MDVjLTg2NTktYmMyY2ExN2VkNzkyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA3VDIxMTkwOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWZiMTQ5M2IwY2ZjZDUxYzVmOTk0M2VhYTAwYTI4MTEzMmU0ZDRlOTYzYTBkOTZiZDdlNmI3NzlhNmZkNmEyNDYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.MHUcvw0MmiiykTXc35mULrxBHK3Y_LOrWM-YqqcDBtc)
I believe that step 9 for cleaning up has an issue in the section for "Delete Cloud Build artifacts from Cloud Storage":
The command for printing all available soures is:
gcloud builds list | awk 'NR > 1 {print $4}'
This returns blank lines.
If I run "gcloud builds list", the results with the available source archives only have data in two fields, one with the description of the fields ($1) and one with the information ($2).
![image](https://private-user-images.githubusercontent.com/94967096/240967653-7425ef94-e208-477c-8069-780025f31ba2.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NjM0NDgsIm5iZiI6MTczODk2MzE0OCwicGF0aCI6Ii85NDk2NzA5Ni8yNDA5Njc2NTMtNzQyNWVmOTQtZTIwOC00NzdjLTgwNjktNzgwMDI1ZjMxYmEyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA3VDIxMTkwOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTc4MjE3ZjJhMjdmZWFiM2NmMDEzYTkzZGQ5MmY2MmU2NmI0M2UyYzQ0MGNlOTI2MDI5M2E1NzBjZWFjNDM0N2MmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.B7YIMqXn6xZ-3t001riUMvshksIuZzyB54goFb-reN4)
![image](https://private-user-images.githubusercontent.com/94967096/240966946-f6fb3355-a6d0-4b0e-b190-79bdc7e738e3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NjM0NDgsIm5iZiI6MTczODk2MzE0OCwicGF0aCI6Ii85NDk2NzA5Ni8yNDA5NjY5NDYtZjZmYjMzNTUtYTZkMC00YjBlLWIxOTAtNzliZGM3ZTczOGUzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA3VDIxMTkwOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTVhYWQyOWYwYWFmY2U2Zjc5OWVkNGJkYzNkZmJmZTFhNzI0YTczNDU0Y2E5OWY3MzMyN2Q1YzU5ZDk4OTMyYTkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.H0NJMxXJM34fFqbmf9NnC8WmhNiTqWDL8SZfTReNCpU)
![image](https://private-user-images.githubusercontent.com/94967096/240968618-276a8283-7382-425d-96b9-1ecd67ef6ae7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NjM0NDgsIm5iZiI6MTczODk2MzE0OCwicGF0aCI6Ii85NDk2NzA5Ni8yNDA5Njg2MTgtMjc2YTgyODMtNzM4Mi00MjVkLTk2YjktMWVjZDY3ZWY2YWU3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA3VDIxMTkwOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTNlMGYxMzc0Y2ZlZjI4ZjRkNDhiMGQ1ZTJlNzdhMjlkODk3NGNmZjk0YzllNTUyMTc1NGYzNmZmMGY4ZmZkY2MmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.FPmngmqi_GpW2Ea9b7bZfUqWUI5E1uX-Ws5Z8f2039g)
When running for field 1, I get the following:
When running for field 2, I get the following:
I believe that the $4 in the example is wrong as there is no 4th field to populate data from as the fields seem to be read in columns.
That explains why when running with $4, I get blank lines, since there is no 4 field when the data are read columnwise.
I assume the intention was to read rows of IDs, and except for the first one (which is the last one created), pull the 4th field (SOURCE) for other entries and remove them.
However for that to happen, I assume some additional command is required to read the fields in rows for each entry?
The text was updated successfully, but these errors were encountered: