Repository navigation
Closed
Description
Hello there!
I'm having issues while creating new resource type for concourse ci. The resource type is to run a cli present in one docker image.
PS: I'm new to concourse :(
- My resource type image is
$ docker build -t myorg.domain.com/alpine_twistcli:latest .
Sending build context to Docker daemon 29.09MB
Step 1/5 : FROM alpine:latest
---> 3fd9065eaf02
Step 2/5 : RUN apk update && apk **add jq curl bash && rm -rf /var/cache/apk/***
---> Using cache
---> fc8ee0f722e8
Step 3/5 : COPY **twistcli /usr/bin/twistcli** **//copying cli here**
---> Using cache
---> 582eb35ef3bd
Step 4/5 : **COPY assets/ /opt/resource/** //copying resources here
---> 5c5edecd15b8
Step 5/5 : RUN chmod +x /opt/resource/out /opt/resource/in /opt/resource/check /opt/resource/twisthelp.sh
---> Running in f2b1e7654172
---> fa66b0b4b0e5
Removing intermediate container f2b1e7654172
Successfully built fa66b0b4b0e5
Successfully tagged myorg.domain.com/alpine_twistcli:latest
- Check, in and out are very basic
$ cd assets && cat check in out
/home/demo/resources/assets
#!/bin/bash
echo "[]"
#!/bin/bash
echo '{"version":{"ref":"none"}}'
#!/bin/sh
set -e
exec 3>&1
exec 1>&2
/opt/resource/twisthelp.sh
where: /opt/resource/twisthelp.sh contains #!/bin/bash twistcli --help
- Here is my pipeline
jobs:
- name: build-docker-image
public: false
serial: true
plan:
- get: git-image-repo
trigger: true
- put: docker-image
params:
build: git-image-repo
- name: scan-docker-image
public: false
serial: true
plan:
- get: docker-image
trigger: true
passed: [build-docker-image]
- task: scan images
config:
platform: linux
image_resource:
type: twist-scan
source: {repository: myorg.domain.com/alpine_twistcli}
run:
path: twistlock
args: ["--version"]
resource_types:
- name: image-scan
type: docker-image
source:
repository: myorg.domain.com/alpine_twistcli
tag: latest
resources:
- name: twist-scan
type: image-scan
source:
twist_uri: {{application-url}}
image_name: twistcliscan
- name: git-image-repo
type: git
check_every: 15s
source:
uri: {{git-repo}}
paths: [Dockerfile]
branch: integration
private_key: {{git-private-key}}
- name: docker-image
type: docker-image
source:
email: {{docker-hub-email}}
username: {{docker-hub-username}}
password: {{docker-hub-password}}
repository: {{docker-image-repo}}
The error I'm getting is on twist-scan and it is:-
invalid character h looking for the beginning of value
Metadata
Metadata
Assignees
Labels
No labels
Activity
sahotay commentedon Apr 5, 2018
@vito can you please help me
vito commentedon Apr 5, 2018
That error means that something printed an
h(probably more) to stdout, which is reserved for the JSON response value.Where are you seeing the error?
sahotay commentedon Apr 5, 2018
Something strange, as I was doing many changing and not sure which one worked to get the first error fixed :)
Here is my pipeline
Here is error

unexpected end of JSON inputvito commentedon Apr 5, 2018
That error is probably from the resource not printing a response object.
Be sure to follow Implementing a Resource carefully!
jama22 commentedon Apr 9, 2018
Closing issue, since it seems to be more support related. @rahul-github feel free to re-open if you feel like there's a genuine bug
bump etree tsa handlers mux clockwork goxmldsig genproto grpc