stages: # 构建 - build - webhook build: image: maven:3.6.3-openjdk-8 stage: build only: - main - develop before_script: - echo ' '$PWD'.m2 nexus nexus_public 9SZ4KXFvGt9N7kRU ' > $HOME/.m2/settings.xml artifacts: name: india_market_java.jar expire_in: 1 day paths: - ./target/india_market_java.jar script: - echo ">>>>>>Start Building<<<<<<" - pwd - java -version - mvn -v - mvn clean install -Dmaven.test.skip=true - ls - echo ">>>>>>Finish Building<<<<<<" webhook: stage: webhook only: - develop script: - echo ">>>>>>Start Deploy<<<<<<" - ls - apt-get update - apt-get install -y curl - curl --max-time 30 http://149.88.86.7:11113/api/webhook/justpull?project=india_market_java\&setenv_file=alpha.sh\&publish_env=alpha\&shell=deploy-test.sh - echo ">>>>>>Start Deploy Finish<<<<<<"