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

CirleCi v2 #305

Closed
gperreymond opened this issue Dec 9, 2017 · 6 comments
Closed

CirleCi v2 #305

gperreymond opened this issue Dec 9, 2017 · 6 comments

Comments

@gperreymond
Copy link

Hello,

In local it works like a charm, but when I play this in CircleCI v2 not.

#!/bin/bash -eo pipefail
curl -fsSL https://goss.rocks/install | sudo sh
dgoss run -v $PWD/test/integration/mobile.yaml:/goss/goss.yaml:ro viadeo-hapi:mobile-$ENV
Downloading https://github.com/aelsabbahy/goss/releases/download/v0.3.5/goss-linux-amd64
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

100   606    0   606    0     0   7071      0 --:--:-- --:--:-- --:--:--  7129

100 8312k  100 8312k    0     0  30.1M      0 --:--:-- --:--:-- --:--:-- 30.1M
Goss v0.3.5 has been installed to /usr/local/bin/goss
goss --version
goss version v0.3.5
Downloading https://raw.githubusercontent.com/aelsabbahy/goss/master/extras/dgoss/dgoss
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

100  3694  100  3694    0     0   336k      0 --:--:-- --:--:-- --:--:--  360k
dgoss master has been installed to /usr/local/bin/dgoss
INFO: Starting docker container
INFO: Container ID: 037d8b64
INFO: Sleeping for 0.2
INFO: Running Tests
sh: /goss/goss: not found
INFO: Deleting container
Exited with code 127
@gperreymond gperreymond changed the title Cirle Ci v2 CirleCi v2 Dec 9, 2017
@gperreymond
Copy link
Author

My bad it seems that the problem is env vars in circle v2.

@gperreymond
Copy link
Author

I made a test without any env vars and i have a new problem.
It seems because circleCI v2 use containers to run goss and dgoss.
I continue tests and I will post my solution if i found one :)

From not found to Permission denied

dgoss master has been installed to /usr/local/bin/dgoss
INFO: Starting docker container
INFO: Container ID: 4ec7c519
INFO: Sleeping for 0.2
INFO: Running Tests
sh: /goss/goss: Permission denied
INFO: Deleting container
Exited with code 126

@gperreymond
Copy link
Author

Ok it works like a charm on CircleCI version 2, but the only way to do that it's like that :

version: 2
jobs:
  tests:
    machine: true
    working_directory: ~/repo
    steps:
      - checkout

machine: true
Anything else doesn't work.
Perhaps you should add examples with travis, circle, etc ?

@gperreymond
Copy link
Author

Anyway goss and dgoss are awesome projects, thanks a lot for that.

@aelsabbahy
Copy link
Member

Try setting GOSS_FILES_STRATEGY to cp wonder if that will resolve your issue.

https://github.com/aelsabbahy/goss/blob/master/extras/dgoss/README.md#goss_files_strategy

@plispe
Copy link
Contributor

plispe commented Jan 10, 2018

@aelsabbahy is right, change GOSS_FILES_STRATEGY to cp. This will fix your issue. CircleCI 2.0 was actually the motivation for pull request #271 which adds GOSS_FILES_STRATEGY. If you still struggle with CircleCI feel free to contact me. I use DGOSS with CircleCI 2.0 in many of my projects.

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

No branches or pull requests

3 participants