Api job

🛂_test-api:
  stage: testing
  tags: [saas-linux-small-amd64]
  needs: ["🐳_docker_image"]
  rules:
    - if: $CI_COMMIT_BRANCH == "main"
    - if: $CI_MERGE_REQUEST_IID
  services: # use services to link your app container to the job
    - name: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA
      alias: webapp
  script:
    - curl http://webapp:8080/api/hello
    - curl http://webapp:8080/api/hello
    - curl http://webapp:8080/api/hello