4

I'm following Stark & Wayne tutorial and got into a problem:

Pipeline fails with

hijack: Backend error: Exit status: 500, message {"Type":"","Message": "
runc exec: exit status 1: exec failed: container_linux.go:247:
starting container process caused \"exec format error\"\n","Handle":""}

I have one git resource and one job with one task:

- task: test
  file: resource-ci/ci/test.yml

test.yml file:

platform: linux

image_resource:
  type: docker-image
  source:
    repository: busybox
    tag: latest

inputs:
- name: resource-tool

run:
  path: resource-tool/scripts/deploy.sh

deploy.sh is simple dummy file with one echo command

echo [+] Testing in the process ...

So what could it be?

Alex Bender
  • 846
  • 13
  • 26

2 Answers2

4

This error means that the shell it's trying to invoke in your script is unavailable on the container running your task.

Busybox doesn't come with bash, it only comes with /bin/sh, check the shebang in deploy.sh, making sure it looks like:

#!/bin/sh
# rest of script
materialdesigner
  • 1,492
  • 10
  • 13
0

I also ran into this error when I forgot to add a ! at the top of my pipelines shell script:

#/bin/bash
# rest of script
Alex Cohen
  • 5,596
  • 16
  • 54
  • 104