Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing a site build in Pipelines

bsuttis March 30, 2021

I'm using Pipelines to install a Drupal site and run Behat tests prior to deployment to its hosting environment.

The install is successful however I cannot figure out how to access the build in order to run the tests against it. Behat configuration calls for a `base_url` to test against.

I could set `base_url` to the production instance but any test involving a user account would fail since the user account is being created in the Pipeline's build and not the production instance.

I tried using 127.0.0.1 as the `base_url` but it failed: cURL error 7: Failed to connect to 127.0.0.1 port 80: Connection refused

I also tried adding the following to my pipeline step's script and updating behat.yml's `base_url` to http://cmds.ci but it also failed (cURL error 7: Failed to connect to cmds.ci port 80: Connection refused):

step:
script:
- echo "127.0.0.1 cmds.ci" >> /etc/hosts
- ..

Is it possible to access the build?

1 answer

0 votes
Justin Thomas
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 5, 2021

@bsuttis You should be able to access your webserver at 127.0.0.1. Are you starting the webserver in the step or as a service?

bsuttis April 6, 2021

@Justin Thomas I'm using docksal/web:2.1-apache2.4 as the 'web' service and `wget http://127.0.0.1` works.

Where I'm confused is: I have a file called foo.html in my repository and attempting `wget http://127.0.0.1/foo.html` fails with a 404. I'm assuming the top directory of my repo works like docroot but it's not.

Justin Thomas
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 6, 2021

Is `docksal/web` started as a  service or do you use docksal/web as the base image for the step? 

bsuttis April 6, 2021

@Justin Thomas it's started as a service.

Justin Thomas
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 6, 2021

I might be missing something but If you start docksal/web as a service it will not have access to your source code because the source code volume is not mounted to the service.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events