GitLab13.8版本CI/CD部分功能更新

基于GitLabCI/CD流水线实践

 Gitlab版本升级GitLab12.9 >12.10.14 > 13.0.0 >13.8.4

https://docs.gitlab.com/omnibus/update/gitlab_13_changes.html

https://forum.gitlab.com/t/omnibus-upgrade-from-12-10-6-to-13-0-6/38737/3

https://forum.gitlab.com/t/packaged-postgresql-error-after-update-from-12-7-to-13/39451

 
 
 
 
  1. unning handlers: 
  2. Running handlers complete 
  3. Chef Infra Client finished, 441/1538 resources updated in 03 minutes 19 seconds 
  4. gitlab Reconfigured! 
  5. Checking for an omnibus managed postgresql: OK 
  6. Checking if postgresql['version'is set: OK 
  7. Checking if we already upgraded: NOT OK 
  8. Checking for a newer version of PostgreSQL to install 
  9. Upgrading PostgreSQL to 12.5 
  10. Checking if PostgreSQL bin files are symlinked to the expected location: OK 
  11. cp /opt/gitlab/embedded/service/gitlab-rails/public/deploy.html /opt/gitlab/embedded/service/gitlab-rails/public/index.html 
  12. Toggling deploy page: OK 
  13. Toggling services:ok: down: alertmanager: 1s, normally up 
  14. ok: down: gitaly: 1s, normally up 
  15. ok: down: gitlab-exporter: 0s, normally up 
  16. ok: down: gitlab-pages: 1s, normally up 
  17. ok: down: grafana: 0s, normally up 
  18. ok: down: logrotate: 0s, normally up 
  19. ok: down: postgres-exporter: 1s, normally up 
  20. ok: down: prometheus: 0s, normally up 
  21. ok: down: redis-exporter: 1s, normally up 
  22. ok: down: sidekiq: 1s, normally up 
  23. ok: down: sshd: 0s, normally up 
  24. Toggling services: OK 
  25. Running stop on postgresql:ok: down: postgresql: 0s, normally up 
  26. Running stop on postgresql: OK 
  27. Symlink correct version of binaries: OK 
  28. Creating temporary data directory: OK 
  29. Initializing the new database: OK 

13.8新特性(CI/CD)

使用退出码控制作业的状态

语句:allow_failure:exit_codes

使用allow_failure:exit_codes动态控制作业是否应该允许失败。您可以列出哪些退出代码不被视为失败。该作业因任何其他退出代码而失败。

 
 
 
 
  1. test_job_1: 
  2.   script: 
  3.     - echo "Run a script that results in exit code 1. This job fails." 
  4.     - exit 1 
  5.   allow_failure: 
  6.     exit_codes: 137 
  7.  
  8. test_job_2: 
  9.   script: 
  10.     - echo "Run a script that results in exit code 137. This job is allowed to fail." 
  11.     - exit 137 
  12.   allow_failure: 
  13.     exit_codes: 
  14.       - 137 
  15.       - 255 

THE END