我已经设置了Cloud触发器来为项目创建CI/CD管道,它的工作非常好。现在,我要配置SMTP通知,以便整个项目团队能够更新生成状态。
云构建将构建状态发布到Cloud /Sub主题云构建。为此,我一直在跟踪Google发布的文档。
我照文件上说的做了-
apiVersion: cloud-build-notifiers/v1
kind: SMTPNotifier
metadata:
name: master-deloyed-to-staging.
spec:
notification:
filter: build.status == Build.Status.SUCCESS
delivery:
server: smtp.gmail.com
port: '587'
sender: r@gmail.com
from: r@gmail.com
recipients:
- a@gmail.com
- b@gmail.com
- c@gmail.com
- d@gmail.com
- e@gmail.com
password:
secretRef: dropoff-gmail
secrets:
- name: dropoff-gmail
value: projects/project-id/secrets/secret-name/versions/latest
gcloud run deploy dropoff-deployment-notifier \
--image=us-east1-docker.pkg.dev/gcb-release/cloud-build-notifiers/smtp:latest \
--update-env-vars=CONFIG_PATH=gs://dropoff-assets/cloud_run/smtp-notifier.yaml
会给我一个错误-
ERROR: (gcloud.run.deploy) Cloud Run error: Container failed to start. Failed to start and then listen on the port defined by the PORT environment variable. Logs for this revision might contain more information.
正如错误地指出的,端口有问题,但不知道如何修复它。
发布于 2021-05-14 17:29:31
https://serverfault.com/questions/1025268
复制相似问题