Tuesday, April 12, 2022

multiple images,stages,background job

 stages:

  - build
  - test

build-websites:
  stage: build
  image: node
  script:
   - npm install
   - npm install -g gatsby-cli
   - gatsby build
  artifacts:
   paths:
    - ./public

test artifact:
 image: alpine
 stage: test
 script:
  - grep -q "Gatsby" ./public/index.html
  - grep "XXXXX" ./public/index.html

test artifact:
 image: alpine
 stage: test
 script:
  - npm install
  - npm insrall -g gatsby-cli
  - gatsby serve & # & is for background job
  - sleep 3
  - curl "http://localhost:9000" | tac | tac | grep -q "Gatsby"

No comments:

Post a Comment