Last active
November 1, 2024 15:58
-
-
Save Klerith/07371087699cbcdf50b748aa398e8443 to your computer and use it in GitHub Desktop.
Google Cloud - Build steps
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
steps: | |
- name: "gcr.io/cloud-builders/docker" | |
args: | |
[ | |
"build", | |
"-t", | |
"XXXXX-docker.pkg.dev/project-name/registry/image-name", | |
"-f", | |
"dockerfile.prod", | |
"--platform=linux/amd64", | |
".", | |
] | |
- name: "gcr.io/cloud-builders/docker" | |
args: | |
[ | |
"push", | |
"XXXXX-docker.pkg.dev/project-name/registry/image-name", | |
] |
Como lo solucionaste?
Gracias @dpaul20 !
@Alejgl04 la solución es copiar esta instruccion al final del archivo, a la misma altura de "steps"
options:
logging: CLOUD_LOGGING_ONLY
El archivo deberia quedar de la siguiente manera:
steps:
- name: "gcr.io/cloud-builders/docker"
args:
[
"build",
"-t",
"XXXXX-docker.pkg.dev/project-name/registry/image-name",
"-f",
"dockerfile.prod",
"--platform=linux/amd64",
".",
]
- name: "gcr.io/cloud-builders/docker"
args:
[
"push",
"XXXXX-docker.pkg.dev/project-name/registry/image-name",
]
options:
logging: CLOUD_LOGGING_ONLY
Gracias perfecto !! funciono
Gracias @patriciobo Funciono perfecto
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No se si a alguno le ha pasado que le falla el build
Tu compilación no se pudo ejecutar: generic::invalid_argument: if 'build.service_account' is specified, the build must either (a) specify 'build.logs_bucket', (b) use the REGIONAL_USER_OWNED_BUCKET build.options.default_logs_bucket_behavior option, or (c) use either CLOUD_LOGGING_ONLY / NONE logging options
por ahora he solucionado con esto
https://stackoverflow.com/questions/68779751/error-publishing-source-code-from-cloud-build-to-a-bucket-using-triggers