Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gitlab merge request are broken #2763

Open
3 of 4 tasks
koushyk opened this issue Oct 17, 2024 · 2 comments
Open
3 of 4 tasks

Gitlab merge request are broken #2763

koushyk opened this issue Oct 17, 2024 · 2 comments

Comments

@koushyk
Copy link

koushyk commented Oct 17, 2024

Checklist

  • I've searched the issue queue to verify this is not a duplicate bug report.
  • I've included steps to reproduce the bug.
  • I've pasted the output of kargo version.
  • I've pasted logs, if applicable.

Description

When promoting a fright to stage which has merge request creation enabled I'm getting an error

error executing Git-based promotion mechanisms: error executing Kargo Render promotion mechanism: error preparing PR branch "https://<gitlab_url>/deploy/service.git": error checking out branch "master\n" from repo "https://<gitlab_url>//deploy/service.git": error executing cmd [/usr/bin/git checkout master --]: fatal: invalid reference: master

but for stages without merge request features promotions are working as they should.

Screenshots

Снимок экрана 2024-10-17 в 15 51 06

Steps to Reproduce

  1. Create a warehouse with helm and image in different repositories.
  2. Create stage
kind: Warehouse
spec:
  freightCreationPolicy: Automatic
  interval: 5m0s
  subscriptions:
    - git:
        branch: master
        commitSelectionStrategy: NewestFromBranch
        discoveryLimit: 20
        includePaths:
          - service
        repoURL: https://<gitlab_url>/service.git
        strictSemvers: true
    - image:
        allowTags: ^[^sha256].*$
        discoveryLimit: 20
        gitRepoURL: https://<gitlab_url>/service.git
        imageSelectionStrategy: NewestBuild
        repoURL: <registry_url>/service
        strictSemvers: true
---
apiVersion: kargo.akuity.io/v1alpha1
kind: Stage
metadata:
  name: <stage-name>
spec:
  promotionMechanisms:
    argoCDAppUpdates:
      - appName: <argocd_app_name>
    gitRepoUpdates:
      - render: {}
        repoURL: https://<gitlab_url>/service.git
        writeBranch: env/<env-name>/<service-name>
  requestedFreight:
    - origin:
        kind: Warehouse
        name: <service-name>-wh
      sources:
        direct: true
  shard: stage
---
 apiVersion: kargo.akuity.io/v1alpha1 
 kind: Stage
metadata:
  name: <stage-name>
spec:
  promotionMechanisms:
    gitRepoUpdates:
      - render: {}
        repoURL: https://<gitlab_url>/deploy/service.git
        writeBranch: env/<env>/<service-name>
        pullRequest:
          gitlab: {}
  requestedFreight:
    - origin:
        kind: Warehouse
        name: <service-name>-wh
      sources:
        stages:
          - <stage-name>
  1. Promote fright

Version

{
  "Version": "v0.9.1",
  "BuildDate": "2024-10-11T04:59:22Z",
  "GitCommit": "a1a43b7c59780e726b6438fd41cc74597dd442b6",
  "GitTreeDirty": false,
  "GoVersion": "go1.23.2",
  "Compiler": "gc",
  "Platform": "linux/amd64"
}

Logs

Paste any relevant application logs here.
@krancour
Copy link
Member

@koushyk is <gitlab_url> on gitlab.com or self-hosted GitLab?

@koushyk
Copy link
Author

koushyk commented Oct 17, 2024

@krancour self-hosted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants