diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9154287..d2fd63f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -31,6 +31,8 @@ lint: - build script: - jb inspectcode ./*.sln --output=analyze_output.xml --build -f=xml + # Remove the warning of UnusedAutoPropertyAccessor + - sed -i '/UnusedAutoPropertyAccessor/d' analyze_output.xml - grep 'WARNING' analyze_output.xml && cat analyze_output.xml && exit 1 || echo "No warning found" artifacts: when: always @@ -62,15 +64,6 @@ test: coverage_format: cobertura path: ./Cobertura.xml -publish: - stage: publish - needs: - - lint - - test - script: - - dotnet build -maxcpucount:1 --configuration Release - - dotnet publish -maxcpucount:1 --configuration Release --runtime linux-x64 --no-self-contained *.sln - pack: stage: publish needs: @@ -117,10 +110,9 @@ upload_to_local_nuget: deploy_docker: stage: deploy environment: production - needs: - - publish - dependencies: - - publish + needs: + - lint + - test script: - docker build . -t hub.aiursoft.cn/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME:latest - docker push hub.aiursoft.cn/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME:latest