Mohammed Nafees 4 лет назад
Родитель
Сommit
883315d626
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      internal/integrations/ci/gitlab/ci.go

+ 2 - 2
internal/integrations/ci/gitlab/ci.go

@@ -65,7 +65,7 @@ func (g *GitlabCI) Setup() error {
 
 	jobName := getGitlabStageJobName(g.ReleaseName)
 
-	ciFile, resp, err := client.RepositoryFiles.GetFile(g.pID, ".gitlab-ci.yml", &gitlab.GetFileOptions{
+	ciFile, resp, err := client.RepositoryFiles.GetRawFile(g.pID, ".gitlab-ci.yml", &gitlab.GetRawFileOptions{
 		Ref: gitlab.String(g.defaultGitBranch),
 	})
 
@@ -95,7 +95,7 @@ func (g *GitlabCI) Setup() error {
 	} else {
 		// update .gitlab-ci.yml if needed
 		ciFileContentsMap := make(map[string]interface{})
-		err = yaml.Unmarshal([]byte(ciFile.Content), ciFileContentsMap)
+		err = yaml.Unmarshal(ciFile, ciFileContentsMap)
 
 		if err != nil {
 			return fmt.Errorf("error unmarshalling existing .gitlab-ci.yml: %w", err)