So, I assembled a concourse pipeline that fetches a (repo) and runs a pretty basic Spring project (maven install goal).
Whenever the task starts, it mostly immediately fails with the following error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.1.2:test (default-test) on project gs-maven:
[ERROR]
[ERROR] Please refer to /tmp/build/69a7d209/source-code/target/surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
[ERROR] The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
[ERROR] Command was /bin/sh -c cd '/tmp/build/69a7d209/source-code' && '/opt/java/openjdk/bin/java' 'org.apache.maven.surefire.booter.ForkedBooter' '/tmp/build/69a7d209/source-code/target/surefire' '2023-10-03T10-46-11_322-jvmRun1' 'surefire-20231003104612119_1tmp' 'surefire_0-20231003104612119_2tmp'
[ERROR]
[ERROR] Error while executing forked tests.Error while executing process.Cannot run program "/bin/sh" (in directory "/tmp/build/69a7d209/source-code"): error=0, Failed to exec spawn helper: pid: 5579, exit value: 1org.apache.maven.surefire.shared.utils.cli.CommandLineException: Error while executing process.
The strangest thing (to me) is that I can run the same goal locally, or in a docker container from the same maven:latest image, so it seems to be pretty much a concourse issue.
The concourse job/task details are as follow:
resources:
- name: source-code
type: git
source:
uri: https://github.com/jdecoroso/cocas.git
branch: main
jobs:
- name: systest-validation
public: true
plan:
- get: source-code
trigger: true
- task: run-system-tests
config:
# Tells Concourse which type of worker this task should run on
platform: linux
# This is one way of telling Concourse which container image to use for a
image_resource:
type: registry-image
source:
repository: maven
tag: latest
inputs:
- name: source-code
# The command Concourse will run inside the container
run:
path: /bin/bash
args:
- -c
- |
cd source-code
mvn -f pom.xml install
The actual results should have been a successful Maven build execution