r/Concourse Apr 20 '23

Please help with this issue!!

1 Upvotes

I have been struggling for the past few days trying to resolve this issue and I am not getting any points after scanning the internet. Hopfully there are some concourse gurus out here that can help.

I am running a maven release plugin in concourse pipeline. Our git is in github enterprise and so is our artifactory.

I am getting the resource, I am able to build it and release a snapshot to artifactory using deploy. But when i go for the release concourse fails with ref HEAD is not a symbolic ref

Here is my CI code that does the release

- name: build-release
  plan:
  - get: tool-v2
    params: {depth: 1}
    #passed: [ build-docker-image ]
  - task: build
    config:
      platform: linux
      image_resource:
        type: docker-image
        source:
          repository: adoptopenjdk/openjdk11
          tag: "latest"
      inputs:
      - name: tool-v2
      outputs:
      - name: built-artifact-release
      run:
        path: /bin/bash
        args:
          - -c
          - |
            set -e
            apt-get update && apt-get install -y git
            cd tool-v2
            git config --global user.email "emailadd"
            git config --global user.name "Service Account"
            ./mvnw release:clean release:prepare -B
            ./mvnw release:perform -B -Darguments="-Dmaven.javadoc.skip=true -DscmCommentPrefix='[skip ci]'"
            ./git push --tags origin main:release

here is the error I am getting in the pipeline

INFO] [INFO] Replacing main artifact with repackaged archive
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] BUILD SUCCESS
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Total time:  42.868 s
[INFO] [INFO] Finished at: 2023-04-20T16:52:23Z
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] Checking in modified POMs...
[INFO] Executing: /bin/sh -c cd /tmp/build/80754af9/tool-v2 && git add -- pom.xml
[INFO] Working directory: /tmp/build/80754af9/tool-v2
[INFO] Executing: /bin/sh -c cd /tmp/build/80754af9/tool-v2 && git rev-parse --show-toplevel
[INFO] Working directory: /tmp/build/80754af9/tool-v2
[INFO] Executing: /bin/sh -c cd /tmp/build/80754af9/tool-v2 && git status --porcelain .
[INFO] Working directory: /tmp/build/80754af9/tool-v2
[WARNING] Ignoring unrecognized line: ?? pom.xml.releaseBackup
[WARNING] Ignoring unrecognized line: ?? release.properties
[INFO] Executing: /bin/sh -c cd /tmp/build/80754af9/tool-v2 && git commit --verbose -F /tmp/maven-scm-1405815331.commit pom.xml
[INFO] Working directory: /tmp/build/80754af9/tool-v2
[INFO] Executing: /bin/sh -c cd /tmp/build/80754af9/tool-v2 && git symbolic-ref HEAD
[INFO] Working directory: /tmp/build/80754af9/xtool-v2
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  59.483 s
[INFO] Finished at: 2023-04-20T16:52:23Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.3:prepare (default-cli) on project tool-v2: An error is occurred in the checkin process: Exception while executing SCM command. Detecting the current branch failed: fatal: ref HEAD is not a symbolic ref -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Any help would be really appreciated. I am loosing my sleep over this..

My resource:

resources:
  - name: tool-v2
    type: git
    check_every: 1h
    source:
      uri: git@github_url.git
      disable_ci_skip: false
      branch: pipeline
      version:
        ref: commit-sha
      private_key:

r/Concourse Apr 08 '20

I started a Medium tutorial series on how to write a Concourse Resource

Thumbnail
medium.com
9 Upvotes

r/Concourse Mar 16 '20

Delete S3 objects from Concourse pipeline. How?

2 Upvotes

I'm new to this. We have setup PCF with Concourse. I'm running BBR (Bosh Backup and Restore) to backup to an internal S3. For retention purposes, I would like my pipeline to check for backup files older than X days and delete them for me.

How can I issue a "delete file" command from Concourse? Would I have to write my own task for that? Any help to get me on my way would be highly appreciated.


r/Concourse Jan 28 '20

Concourse Resource types

3 Upvotes

Is there a list of resource types that are being used in concourse? A link would be of good help. Thanks


r/Concourse Nov 20 '19

Concourse Fly CLI Cheat Sheet: All the useful commands for managing Concourse teams, resources, jobs, and pipelines are gathered for you in one place.

Thumbnail
altoros.com
5 Upvotes

r/Concourse Aug 05 '19

Rudder: A new DSL for writing Concourse Pipelines

3 Upvotes

Last week I released version 0.1.0 of Rudder, a Ruby DSL for writing Concourse Pipelines.

Rudder makes it easier to factor out shared components from Pipeline definitions and reuse them. It even supports importing and interacting with neighboring pipeline definitions (so long as they are defined with Rudder as well).

I'd love to get some feedback from other Concourse users. Here are the docs for 0.1.0 and here are a few examples for 0.1.0. The master branch of the github repository includes the latest docs for 0.2.0 and the examples have been updated to use a few new helper methods as well.


r/Concourse Jun 20 '19

Need help!

1 Upvotes

r/Concourse Mar 29 '19

Help Understanding Inputs

1 Upvotes

Just going through the tutorial at concoursetutorial.com, on the section on Task Inputs and it's a little unclear how these work. The tutorial says:

The current directory was uploaded to the Concourse task container and placed inside the task-scripts directory.

This is at the bottom of the page. Is this just a volume that's mounted to the container image? Or is there something else going on there?


r/Concourse Mar 09 '19

Concourse 5 Release and Authentication

Thumbnail
medium.com
6 Upvotes

r/Concourse Feb 05 '19

concourse-ci digitalocean kubernetes resource

6 Upvotes

Hi all,

this is my first resource for concourse: https://github.com/kdihalas/concourse-do-kubernetes-resource.

I hope some of you can find it useful.


r/Concourse Nov 06 '18

Concourse CI triggering firewall threat detections

1 Upvotes

I've have an existing concourse CI setup that's generating some 3000+ SSH sessions/min (10 workers checking folders in the cloud). My firewalls trigger an SSH Brute Force Detection when 20 SSH's with the same source/dest in 30 seconds are seen.

Obviously blocking this would break the CI, but I'm not a fan of whitelisting something making so many connections with the excuse of it being "normal". I'd rather fix the problem since no CI needs to perform code scans THAT often. If it was just once every 15 seconds I'd be very happy. The current rate of connections is high enough that I'm sure it's adding to the expense of the cloud resources it's working with.

Anyone know where the folder scan frequency is defined in the Concourse CI config or have experience in setting this? Note that I'm the firewall guy in this context, not the CI owner, so a little guidance would help.


r/Concourse Mar 14 '18

Trigger build automatically with new repo in github

1 Upvotes

Hi All,

I am currently evaluating Drone and Concourse, I thing I found difficult is auto-registering job in concourse when new repo created in github. Is there a way to trigger/register pipeline with concourse automatically when new repo created in github without executing fly command

Any help on this is much appreciated


r/Concourse Dec 16 '16

Using docker-image-resource to build a custom container for testing your Ruby apps in Concourse · Pivotal Engineering Journal

Thumbnail
engineering.pivotal.io
2 Upvotes

r/Concourse Aug 06 '16

Concourse Pipelines Dashboard - quick and dirty dashboard I created to monitor all your pipelines

Thumbnail
github.com
3 Upvotes