stages:          
  - build
build-job:       
  stage: build
  script:
    - echo "Compiling the code..."
    - echo "Compile complete."
    - chmod +x ./run.sh
    - ./run.sh
script 腳本:
在script塊中,定義了要在build-job作業中執行的一系列指令。這些指令將按照順序運行,並且會在 CI/CD 環境中執行。
echo "run in script"
ls -al
echo "run in script again" 
將run.sh腳本設置為可執行的權限。
執行run.sh腳本。
然後,執行新添加的指令: