Saucelabs Integration

Hey Folks,

first of all: I really enjoy using DroneCI. It really makes my daily life easier. So thank you for this awesome CI.

Now to an edge case: We are trying to run tests against saucelabs. Therefore we have a sauce connect service as part of our drone build available enabling us to create a tunnel. The integration tests are running on a docker container called ‘integration-tests’. We also started to execute these tests but Saucelabs seems not to be able to resolve ‘integration-tests’.

So here is my question: Is there a way to reference the docker-container with a valid url that can be resolved from Saucelabs?

Can you post your .drone.yml ? Is Saucelabs connecting from outside?

Yes Saucelabs is trying to connect from outside but it seems to be not able to reach the container. Here you go:

pipeline:
  install:
    image: node:8
    commands:
      - yarn config set proxy http://corporate-proxy:8080
      - yarn config set https-proxy http://corporate-proxy:8080
      - yarn

  integration-test:
    group: test
    image: node:8
    environment:
      HTTP_PROXY: http://corporate-proxy:8080
      SAUCE_PROXY: saucelabs
      SAUCE_TUNNEL: "tunnel"
    commands:
      - yarn integration:ci

services:

  saucelabs:
    image: ustwo/sauce-connect
    environment:
      HTTP_PROXY: http://corporate-proxy:8080
    command: -u sauceuser -k saucekey -i tunnel --no-proxy-caching --proxy-tunnel

I don’t have much experience with sauce labs, but if I understand correctly, the saucelabs container will need to connect with your code running in the integration-test container, which is accessible at http://integration-test:{port}. My guess is the sauce labs connector tries to connect with localhost by default, so you will likely need to change default configuration to connect with integration-test instead.

Actually it is requesting integration-test already:

@bradrydzewski In general how can I request a running drone environment from outside?

Hello, this topic might help us. We are currently migrating from travis to drone and we are saucelabs users.

Like @alexander-heimbuch said how saucelabs or any 3rd party can access to a drone container ?
In this scenario, how saucelabs can resolve integration-test ?

With the travis experience, it starts a “machine” which includes sauce_connect so everything is localhost.
To reproduce this on drone, the integration-test container should includes sauce_connect.
But I’m agree, it would be better to provide it as a service.

How did you dealt with it @alexander-heimbuch ?

finally we have something that works great using the name of the step as describe above.