0

이렇게 my .travis.yml 빌드가 일반적으로 행복하게 배포됩니다. 그러나 몇 달 후에 프로젝트로 돌아온 후에 나는 아래의 오류가 발생하는 것을 발견했습니다. docs은 소스 저장소 빌드를위한 다른 형식을 제안하는 것처럼 보이지만, 이것들을 시도해 보았고 동일한 오류가 발생했습니다. 도와주세요!gcloud 베타 기능이 Travis에서 오류를 배포합니다. 원본 저장소 URL이 잘못되었습니다. 예상 패턴과 일치하지 않습니다.

UI를 사용하여 수동으로 빌드를 트리거 할 수 있습니다!

Restarting command: 
    $ gcloud --quiet beta functions deploy SpaceXFulfillment --source-url https://source.developers.google.com/p/r-spacex-ai/r/r-SpaceX-AI-google-source-repo --source-path/--trigger-http 
WARNING: The --source-url flag is deprecated; use --source instead. 
WARNING: The --source-path flag is deprecated; use --source instead. 
ERROR: (gcloud.beta.functions.deploy) ResponseError: status=[400], code=[Bad Request], message=[The request has errors 
Problems: 
Source repository URL is invalid https://source.developers.google.com/p/r-spacex-ai/r/r-SpaceX-AI-google-source-repo/moveable-aliases/master// does not match the expected pattern 

다른 여러 가지 형식으로 시도했습니다.

환경
  • OS의 자세한 사항 : 우분투 14.04.5 LTS를
  • Node.js를 버전 : 6.9.1
  • NPM 버전 : 3.10.8
  • 구글 클라우드/기능 에뮬레이터 버전 @

    Google 클라우드 SDK는 BQ 2.0.27 핵심 2017년 11월 10일 4.28 인 gsutil

  • 을 180.0.0 내가 수동으로 대신 내가 같은 오류를 얻을 GUI 빌드 인터페이스에 바로 REPO 이름의 URL로 저장소 상자를 입력하면 6,
단계
  1. https://travis-ci.org/HarvsG/r-SpaceX-AI-Bot/builds/304024024
  2. 흥미롭게 재현합니다. (그냥 repo 이름을 넣으면 작동합니다). image

고마워요!

gcloud beta functions deploy myFunction --source https://source.developers.google.com/projects/$PROJECT_ID/repos/$REPOSITORY_NAME/moveable-aliases/$BRANCH/paths// --trigger-http 

$PROJECT_ID

이 구글 클라우드 프로젝트 ID를 참조합니다 : 당신이 거울 저장소가있는 경우

답변

2

다음 명령을 사용하십시오.
$REPOSITORY_NAME은 저장소 이름을 나타냅니다.
$BRANCH은 배포하려는 지점을 나타냅니다. 귀하의 경우를 들어

명령은 다음과 같습니다 결국

gcloud beta functions deploy SpaceXFulfillment --source https://source.developers.google.com/projects/r-spacex-ai/repos/r-SpaceX-AI-google-source-repo/moveable-aliases/master/paths// --trigger-http 
0

이 문제를 해결했다.

here이라는 새 명령 형식을 사용하여 고정되었지만 정규식을 이해하지 못해서이 설명서가 매우 혼란 스럽습니다. 그래서 나는 아래의 변경을했다. 지점에 대해서는 /moveable-aliases/이고 태그는 /fixed-aliases/입니다. 그래서 아래의 내용을 내 .travis.yml 파일로 변경했습니다. - - gcloud --quiet beta functions deploy SpaceXFulfillment --source-url https://source.developers.google.com/p/r-spacex-ai/r/r-SpaceX-AI-google-source-repo --source-path/--source-branch master --trigger-http + - gcloud --quiet beta functions deploy SpaceXFulfillment --source https://source.developers.google.com/projects/r-spacex-ai/repos/r-SpaceX-AI-google-source-repo/moveable-aliases/master --trigger-http

Link 원래 github 문제와 관련된 문제입니다.

관련 문제