I have two different project repositories: my application repository and the API repository. My application communicates with the API.
I want to configure the integration and E2E tests of my application. When performing these tests, the application will need to use the latest version of the API project.
API project is already configured for deployment at startup
deploy_integration_tests: stage: deploy script: - echo "deploying..." environment: name: integration_testing only: - triggers
My application has an integration testing task configured as follows:
integration_test stage: integration_test script: - echo "Building and deploying API..." - curl.exe -X POST -F token=<token> -F ref=develop <url_for_api_trigger> - echo "Now running the integration test that depends on the API deployment..."
The problem I ran into is that the trigger only terminates the API pipeline (both projects use the same runner) and continue until the API pipeline actually starts.
Is there a way to wait for the API pipeline to complete before trying to run the integration test?
I can do something like this:
integration_test_dependency stage: integration_test_dependency script: - echo "Building and deploying API..." - curl.exe -X POST -F token=<token> -F ref=develop <url_for_api_trigger> integration_test stage: integration_test script: - echo "Now running the integration test that depends on the API deployment..."
But this does not mean that the API pipeline works and ends before moving on to the integration_test stage.
Is there any way to do this?
source share