Skip to content

During security release, push changes and tags to Security and Build

Robert Speicher requested to merge rs-security-remote-dry-runs into master

Closes gitlab-com/gl-infra/delivery#532 (closed) and https://gitlab.com/gitlab-org/release-tools/issues/327.

2cd08a74 - Specify base branch for ensure_branch_exists

Prior, we were always creating a non-existent branch off of master, which wouldn't work for the Security remotes where all branches are prefixed with security/.

e0e0287e - Refine BaseProject.remotes for security_remote

When working on a security release, we'll use Security AND Dev remotes, when security_remote is enabled.

Outside a security release, we have no need for the Security remote, and so we now exclude that entirely.


These changes stemmed from doing dry-runs of security:tag locally, with the :security_remote feature flag enabled:

release-tools master % CE=false LOG_LEVEL=trace TEST=true SECURITY=true be rake 'release:tag[12.4.1]'
2019-10-29 15:10:57.821066 I ReleaseTools -- Starting EE release
2019-10-29 15:10:57.821103 I ReleaseTools::Release::GitlabEeRelease -- Preparing repository...
2019-10-29 15:10:57.821174 W ReleaseTools::RemoteRepository -- Pushes will be ignored because of TEST env
2019-10-29 15:10:57.821195 T ReleaseTools::RemoteRepository -- cleanup -- {:path=>"/var/folders/w9/ryh6vkzj0_59qy78vjjds72h0000gn/T/gitlab"}
2019-10-29 15:10:59.915196 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git clone --quiet --depth=100 --origin security git@gitlab.com:gitlab-org/security/gitlab.git /var/folders/w9/ryh6vkzj0_59qy78vjjds72h0000gn/T/gitlab"}
jklh2019-10-29 15:11:34.257483 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git remote add dev git@dev.gitlab.org:gitlab/gitlab-ee.git"}
2019-10-29 15:11:34.270258 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git pull --quiet --depth=100 security security/master"}
2019-10-29 15:11:37.207292 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git pull --quiet --depth=100 dev security/master"}
2019-10-29 15:11:38.288325 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git fetch --quiet --depth=100 security security/12-4-stable-ee:security/12-4-stable-ee"}
2019-10-29 15:11:39.296964 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git fetch --quiet --depth=100 security security/12-4-stable-ee"}
2019-10-29 15:11:40.281802 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git checkout --quiet security/12-4-stable-ee"}
2019-10-29 15:11:40.298404 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git fetch --quiet --depth=100 security security/master:security/master"}
2019-10-29 15:11:41.316518 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git fetch --quiet --depth=100 security security/master"}
2019-10-29 15:11:44.338801 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git checkout --quiet -b security/12-4-stable-ee security/master"}
2019-10-29 15:11:44.536096 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git pull --quiet --depth=100 security security/12-4-stable-ee"}
2019-10-29 15:11:45.569194 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git pull --quiet --depth=100 dev security/12-4-stable-ee"}
2019-10-29 15:11:46.631063 I ReleaseTools::Release::GitlabEeRelease -- Compiling changelog -- {:version=>"12.4.1-ee"}
2019-10-29 15:11:50.280297 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git fetch --quiet --depth=100 security refs/tags/*:refs/tags/*"}
2019-10-29 15:13:04.364905 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git tag --list"}
2019-10-29 15:13:04.426944 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git fetch --quiet --depth=100 security security/12-4-stable-ee:security/12-4-stable-ee"}
2019-10-29 15:13:05.511100 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git fetch --quiet --depth=100 security security/12-4-stable-ee"}
2019-10-29 15:13:06.537638 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git checkout --quiet security/12-4-stable-ee"}
2019-10-29 15:13:06.626384 I ReleaseTools::Release::GitlabEeRelease -- Bumping version -- {:file_name=>"VERSION", :version=>"12.4.1-ee"}
2019-10-29 15:13:06.626993 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git add VERSION"}
2019-10-29 15:13:06.677462 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git commit --message \"Update VERSION to 12.4.1-ee\""}
2019-10-29 15:13:06.906845 I ReleaseTools::Release::GitlabEeRelease -- Pushing ref to remotes -- {:name=>"security/12-4-stable-ee", :remotes=>[:security, :dev]}
2019-10-29 15:13:06.906916 T ReleaseTools::RemoteRepository -- push -- {:remote=>:security, :ref=>"security/12-4-stable-ee"}
2019-10-29 15:13:06.906928 T ReleaseTools::RemoteRepository -- push -- {:remote=>:dev, :ref=>"security/12-4-stable-ee"}
2019-10-29 15:13:06.907002 I ReleaseTools::Release::GitlabEeRelease -- Pushing ref to remotes -- {:name=>"security/master", :remotes=>[:security, :dev]}
2019-10-29 15:13:06.907029 T ReleaseTools::RemoteRepository -- push -- {:remote=>:security, :ref=>"security/master"}
2019-10-29 15:13:06.907045 T ReleaseTools::RemoteRepository -- push -- {:remote=>:dev, :ref=>"security/master"}
2019-10-29 15:13:06.907062 I ReleaseTools::Release::GitlabEeRelease -- Creating tag -- {:name=>"v12.4.1-ee"}
2019-10-29 15:13:06.907169 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git tag -a v12.4.1-ee -m \"Version v12.4.1-ee\""}
2019-10-29 15:13:06.921782 I ReleaseTools::Release::GitlabEeRelease -- Pushing ref to remotes -- {:name=>"v12.4.1-ee", :remotes=>[:security, :dev]}
2019-10-29 15:13:06.921828 T ReleaseTools::RemoteRepository -- push -- {:remote=>:security, :ref=>"v12.4.1-ee"}
2019-10-29 15:13:06.921843 T ReleaseTools::RemoteRepository -- push -- {:remote=>:dev, :ref=>"v12.4.1-ee"}
2019-10-29 15:13:06.921978 I ReleaseTools::Release::OmnibusGitlabRelease -- Preparing repository...
2019-10-29 15:13:06.922087 W ReleaseTools::RemoteRepository -- Pushes will be ignored because of TEST env
2019-10-29 15:13:06.922512 T ReleaseTools::RemoteRepository -- cleanup -- {:path=>"/var/folders/w9/ryh6vkzj0_59qy78vjjds72h0000gn/T/omnibus-gitlab"}
2019-10-29 15:13:07.333958 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git clone --quiet --depth=100 --origin security git@gitlab.com:gitlab-org/security/omnibus-gitlab.git /var/folders/w9/ryh6vkzj0_59qy78vjjds72h0000gn/T/omnibus-gitlab"}
2019-10-29 15:13:09.568960 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git remote add dev git@dev.gitlab.org:gitlab/omnibus-gitlab.git"}
2019-10-29 15:13:09.581766 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git pull --quiet --depth=100 security security/master"}
2019-10-29 15:13:11.148297 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git pull --quiet --depth=100 dev security/master"}
2019-10-29 15:13:12.169683 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git fetch --quiet --depth=100 security security/12-4-stable:security/12-4-stable"}
2019-10-29 15:13:13.511542 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git checkout --quiet security/12-4-stable"}
2019-10-29 15:13:13.650732 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git pull --quiet --depth=100 security security/12-4-stable"}
2019-10-29 15:13:14.915434 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git pull --quiet --depth=100 dev security/12-4-stable"}
2019-10-29 15:13:15.950790 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git fetch --quiet --depth=100 security security/12-4-stable:security/12-4-stable"}
2019-10-29 15:13:17.016065 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git fetch --quiet --depth=100 security security/12-4-stable"}
2019-10-29 15:13:18.311324 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git checkout --quiet security/12-4-stable"}
2019-10-29 15:13:18.352986 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git fetch --quiet --depth=100 security refs/tags/*:refs/tags/*"}
2019-10-29 15:13:23.388912 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git tag --list"}
2019-10-29 15:13:23.464201 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git fetch --quiet --depth=100 security security/12-4-stable:security/12-4-stable"}
2019-10-29 15:13:24.569529 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git fetch --quiet --depth=100 security security/12-4-stable"}
2019-10-29 15:13:25.948574 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git checkout --quiet security/12-4-stable"}
2019-10-29 15:13:25.983134 I ReleaseTools::Release::OmnibusGitlabRelease -- Bumping version -- {:file_name=>"GITALY_SERVER_VERSION", :version=>"1.66.0"}
2019-10-29 15:13:25.983615 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git add GITALY_SERVER_VERSION"}
2019-10-29 15:13:25.999132 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git commit --message \"Update GITALY_SERVER_VERSION to 1.66.0\""}
2019-10-29 15:13:26.223217 I ReleaseTools::Release::OmnibusGitlabRelease -- Bumping version -- {:file_name=>"GITLAB_SHELL_VERSION", :version=>"10.0.0"}
2019-10-29 15:13:26.223988 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git add GITLAB_SHELL_VERSION"}
2019-10-29 15:13:26.239850 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git commit --message \"Update GITLAB_SHELL_VERSION to 10.0.0\""}
2019-10-29 15:13:26.449459 I ReleaseTools::Release::OmnibusGitlabRelease -- Bumping version -- {:file_name=>"GITLAB_WORKHORSE_VERSION", :version=>"8.12.0"}
2019-10-29 15:13:26.449871 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git add GITLAB_WORKHORSE_VERSION"}
2019-10-29 15:13:26.468122 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git commit --message \"Update GITLAB_WORKHORSE_VERSION to 8.12.0\""}
2019-10-29 15:13:26.683017 I ReleaseTools::Release::OmnibusGitlabRelease -- Bumping version -- {:file_name=>"GITLAB_ELASTICSEARCH_INDEXER_VERSION", :version=>"1.3.0"}
2019-10-29 15:13:26.683467 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git add GITLAB_ELASTICSEARCH_INDEXER_VERSION"}
2019-10-29 15:13:26.699233 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git commit --message \"Update GITLAB_ELASTICSEARCH_INDEXER_VERSION to 1.3.0\""}
2019-10-29 15:13:26.935903 I ReleaseTools::Release::OmnibusGitlabRelease -- Bumping version -- {:file_name=>"VERSION", :version=>"12.4.1-ee"}
2019-10-29 15:13:26.936481 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git add VERSION"}
2019-10-29 15:13:26.956124 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git commit --message \"Update VERSION to 12.4.1-ee\""}
2019-10-29 15:13:27.235962 I ReleaseTools::Release::OmnibusGitlabRelease -- Pushing ref to remotes -- {:name=>"security/12-4-stable", :remotes=>[:security, :dev]}
2019-10-29 15:13:27.236004 T ReleaseTools::RemoteRepository -- push -- {:remote=>:security, :ref=>"security/12-4-stable"}
2019-10-29 15:13:27.236066 T ReleaseTools::RemoteRepository -- push -- {:remote=>:dev, :ref=>"security/12-4-stable"}
2019-10-29 15:13:27.236113 I ReleaseTools::Release::OmnibusGitlabRelease -- Pushing ref to remotes -- {:name=>"security/master", :remotes=>[:security, :dev]}
2019-10-29 15:13:27.236133 T ReleaseTools::RemoteRepository -- push -- {:remote=>:security, :ref=>"security/master"}
2019-10-29 15:13:27.236146 T ReleaseTools::RemoteRepository -- push -- {:remote=>:dev, :ref=>"security/master"}
2019-10-29 15:13:27.236171 I ReleaseTools::Release::OmnibusGitlabRelease -- Creating tag -- {:name=>"12.4.1+ee.0"}
2019-10-29 15:13:27.236705 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git tag -a 12.4.1+ee.0 -m \"Version 12.4.1+ee.0\""}
2019-10-29 15:13:27.256451 I ReleaseTools::Release::OmnibusGitlabRelease -- Pushing ref to remotes -- {:name=>"12.4.1+ee.0", :remotes=>[:security, :dev]}
2019-10-29 15:13:27.256514 T ReleaseTools::RemoteRepository -- push -- {:remote=>:security, :ref=>"12.4.1+ee.0"}
2019-10-29 15:13:27.256535 T ReleaseTools::RemoteRepository -- push -- {:remote=>:dev, :ref=>"12.4.1+ee.0"}
2019-10-29 15:13:27.257100 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git fetch --quiet --depth=100 security security/12-4-stable:security/12-4-stable"}
2019-10-29 15:13:28.435481 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git fetch --quiet --depth=100 security security/12-4-stable"}
2019-10-29 15:13:29.905925 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git checkout --quiet security/12-4-stable"}
2019-10-29 15:13:29.946457 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git fetch --quiet --depth=100 security security/master:security/master"}
2019-10-29 15:13:31.012958 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git fetch --quiet --depth=100 security security/master"}
2019-10-29 15:13:32.100303 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git checkout --quiet security/master"}
2019-10-29 15:13:32.172794 I ReleaseTools::Release::OmnibusGitlabRelease -- Pushing ref to remotes -- {:name=>"security/12-4-stable", :remotes=>[:security, :dev]}
2019-10-29 15:13:32.172843 T ReleaseTools::RemoteRepository -- push -- {:remote=>:security, :ref=>"security/12-4-stable"}
2019-10-29 15:13:32.172864 T ReleaseTools::RemoteRepository -- push -- {:remote=>:dev, :ref=>"security/12-4-stable"}
2019-10-29 15:13:32.172900 I ReleaseTools::Release::OmnibusGitlabRelease -- Pushing ref to remotes -- {:name=>"security/master", :remotes=>[:security, :dev]}
2019-10-29 15:13:32.172918 T ReleaseTools::RemoteRepository -- push -- {:remote=>:security, :ref=>"security/master"}
2019-10-29 15:13:32.172932 T ReleaseTools::RemoteRepository -- push -- {:remote=>:dev, :ref=>"security/master"}
2019-10-29 15:13:32.173065 T ReleaseTools::RemoteRepository -- cleanup -- {:path=>"/var/folders/w9/ryh6vkzj0_59qy78vjjds72h0000gn/T/omnibus-gitlab"}
2019-10-29 15:13:32.732162 I ReleaseTools::Release::CNGImageRelease -- Preparing repository...
2019-10-29 15:13:32.732460 W ReleaseTools::RemoteRepository -- Pushes will be ignored because of TEST env
2019-10-29 15:13:32.732702 T ReleaseTools::RemoteRepository -- cleanup -- {:path=>"/var/folders/w9/ryh6vkzj0_59qy78vjjds72h0000gn/T/images"}
2019-10-29 15:13:32.773436 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git clone --quiet --depth=100 --origin dev git@dev.gitlab.org:gitlab/charts/components/images.git /var/folders/w9/ryh6vkzj0_59qy78vjjds72h0000gn/T/images"}
2019-10-29 15:13:34.052701 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git pull --quiet --depth=100 dev security/master"}
2019-10-29 15:13:34.944488 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git fetch --quiet --depth=100 dev security/12-4-stable-ee:security/12-4-stable-ee"}
2019-10-29 15:13:35.799542 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git fetch --quiet --depth=100 dev security/12-4-stable-ee"}
2019-10-29 15:13:36.648497 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git checkout --quiet security/12-4-stable-ee"}
2019-10-29 15:13:36.662533 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git fetch --quiet --depth=100 dev security/master:security/master"}
2019-10-29 15:13:37.553144 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git fetch --quiet --depth=100 dev security/master"}
2019-10-29 15:13:38.405668 T ReleaseTools::RemoteRepository -- run_git -- {:command=>"git checkout --quiet -b security/12-4-stable-ee security/master"}
2019-10-29 15:13:38.417952 F ReleaseTools::Release::GitlabEeRelease -- CNG image release failed -- {:error=>"security/12-4-stable-ee\n\n  fatal: 'security/master' is not a commit and a branch 'security/12-4-stable-ee' cannot be created from it\n  "}
2019-10-29 15:13:38.420794 T ReleaseTools::RemoteRepository -- cleanup -- {:path=>"/var/folders/w9/ryh6vkzj0_59qy78vjjds72h0000gn/T/gitlab"}
2019-10-29 15:13:41.095225 W ReleaseTools -- Skipping release for CE
Edited by 🤖 GitLab Bot 🤖

Merge request reports