GitLab CI: Extend documentation on how to use "only: - external"

Relevant documentation:

Problem | Context:

I'm attempting to drive a secondary stage in GitLab-CI after my external stage completes in the pipeline. What ends up happening is that my desired secondary stage triggers first and then my external CI stage triggers in my pipeline. The documentation is a bit lacking when it comes to using the "only: - external" key, so I'm unsure if I'm using it with the correct end behavior in mind.

Question:

  • What is the proper use of the "only: - external" key?
  • Is there a proper way to stage an external CI build be the first stage then to fire a gitlab ci stage?

.gitlab-ci.yml example:

image: node:6.10.3

stages:
  - build
  - deploy

jenkinsBuild:
  stage: build
  only:
    - external
  script:
    - echo "Running on Jenkins"

jenkinsTest:
  stage: build
  only:
    - external
  script:
    - echo "Running on Jenkins"

dockerUpload:
  stage: build
  only:
    - external
  script:
    - echo "Running on Jenkins"

ecsDeploy:
  stage: deploy
  script:
    - echo "stubbed docker deployment"
Edited by Ken F