Prepare the environments for testing the fixes
- In Google Cloud Console (access to this
should have been granted during on-boarding), create a new VM instance (in the
gitlab-internalproject) from theqa-security-1cpu-3-75gb-ram-ubuntu-16-04-ltsinstance template for each version of GitLab. - Find the
.debpackage to install:- First find the pipeline for the omnibus version tag in the pipelines page.
- Then on the pipeline page, click the
Ubuntu-16.04job in thegitlab_com:packagestage, you will need the job ID later.
- Install the
.debpackage from the job artifact:- SSH into the VM via the GCP console.
- Create a
install-gitlab.shscript in your home folder:TEMP_DEB="$(mktemp)" GITLAB_PACKAGE="https://dev.gitlab.org/api/v4/projects/gitlab%2Fomnibus-gitlab/jobs/${JOB_ID}/artifacts/pkg/ubuntu-xenial/gitlab-ee_${GITLAB_VERSION}_amd64.deb" curl -H "PRIVATE-TOKEN: $DEV_TOKEN" "$GITLAB_PACKAGE" -o "$TEMP_DEB" && sudo dpkg -i "$TEMP_DEB" rm -f "$TEMP_DEB"$DEV_TOKENneeds to be set with adev.gitlab.orgpersonal access token so that the script can download the package$JOB_IDneeds to be set with theUbuntu-16.04job ID$GITLAB_VERSIONneeds to be set with the version.
- Change the script’s permission with
chmod +x install-gitlab.sh. - Run the script with
./install-gitlab.sh. - Once GitLab installed, set the
external_urlin/etc/gitlab/gitlab.rbwithsudo vim /etc/gitlab/gitlab.rb. You can find the VM’s IP in the GCP console. - Reconfigure and restart GitLab with
sudo gitlab-ctl reconfigure && sudo gitlab-ctl restart. - You may need to wait a few minutes after the above command finishes before the instance is actually accessible.
- Set the
root’s user password:- Visit http://IP_OF_THE_GCP_VM and change
root’s password. - Once the environments are ready, capture the information to add to the QA issue.
- Visit http://IP_OF_THE_GCP_VM and change
### Instructions to perform automated QA
If the QA Docker image doesn’t exist, you will need to build it manually on your machine, e.g.
# In gitlab-ee
› git fetch dev
› git checkout <version>
› cd qa
› docker build -t dev.gitlab.org:5005/gitlab/omnibus-gitlab/gitlab-ee-qa:<version> .
Make sure to export the following environment variables (you can find the token under the
GitLab QA - Access tokens1Password items)$QA_IMAGEthe URL of the QA image$QA_ENV_URLwith the URL of the environment where the package has been deployed (usually #{issue.gitlab_test_instance} for the current version, andhttp://IP_OF_THE_GCP_VMfor back-ported versions).$GITLAB_USERNAMEwithroot.$GITLAB_ADMIN_USERNAMEwith$GITLAB_USERNAME.$GITLAB_PASSWORDwith the password you’ve set for therootuser.$GITLAB_ADMIN_PASSWORDwith$GITLAB_PASSWORD.$GITHUB_ACCESS_TOKENwith a valid GitHub API token that can access the https://github.com/gitlab-qa/test-project project$DEV_USERNAMEwith yourdevusername$DEV_TOKENwith a validdevpersonal access token that has theread_registryscope
› export QA_IMAGE="dev.gitlab.org:5005/gitlab/omnibus-gitlab/gitlab-ee-qa:<version>" › export QA_ENV_URL="<QA_ENV_URL>" › export GITLAB_USERNAME="root" › export GITLAB_ADMIN_USERNAME="$GITLAB_USERNAME" › export GITLAB_PASSWORD="<GITLAB_PASSWORD>" › export GITLAB_ADMIN_PASSWORD="$GITLAB_PASSWORD" › export GITHUB_ACCESS_TOKEN="<GITHUB_ACCESS_TOKEN>" › export DEV_USERNAME="<DEV_USERNAME>" › export DEV_TOKEN="<DEV_TOKEN>"Update
gitlab-qaif needed› gem install gitlab-qaLog into the
devcontainer registry› docker login --username "$DEV_USERNAME" --password "$DEV_TOKEN" dev.gitlab.org:5005Automated QA completed. QA can be parallelized manually (for now):
# Tab 1: This should take approximately 4.5 minutes › gitlab-qa Test::Instance::Any $QA_IMAGE $QA_ENV_URL -- qa/specs/features/api/ qa/specs/features/login/ qa/specs/features/merge_request/# Tab 2: This should take approximately 6 minutes › gitlab-qa Test::Instance::Any $QA_IMAGE $QA_ENV_URL -- qa/specs/features/project/# Tab 3: This should take approximately 5 minutes › gitlab-qa Test::Instance::Any $QA_IMAGE $QA_ENV_URL -- qa/specs/features/repository/Post results as comments of this issue
Create
Automation Triage RELEASE_MAJOR_VERSION RC#issues for all the automated QA failures (with failures logs + screenshots) and link it to this issue# In gitlab-ee › git fetch dev › git checkout <version> › cd qa › docker build -t dev.gitlab.org:5005/gitlab/omnibus-gitlab/gitlab-ee-qa:<version> .Make sure to export the following environment variables (you can find the token under the
GitLab QA - Access tokens1Password items)$QA_IMAGEthe URL of the QA image$QA_ENV_URLwith the URL of the environment where the package has been deployed (usually #{issue.gitlab_test_instance} for the current version, andhttp://IP_OF_THE_GCP_VMfor back-ported versions).$GITLAB_USERNAMEwithroot.$GITLAB_ADMIN_USERNAMEwith$GITLAB_USERNAME.$GITLAB_PASSWORDwith the password you’ve set for therootuser.$GITLAB_ADMIN_PASSWORDwith$GITLAB_PASSWORD.$GITHUB_ACCESS_TOKENwith a valid GitHub API token that can access the https://github.com/gitlab-qa/test-project project$DEV_USERNAMEwith yourdevusername$DEV_TOKENwith a validdevpersonal access token that has theread_registryscope
› export QA_IMAGE="dev.gitlab.org:5005/gitlab/omnibus-gitlab/gitlab-ee-qa:<version>" › export QA_ENV_URL="<QA_ENV_URL>" › export GITLAB_USERNAME="root" › export GITLAB_ADMIN_USERNAME="$GITLAB_USERNAME" › export GITLAB_PASSWORD="<GITLAB_PASSWORD>" › export GITLAB_ADMIN_PASSWORD="$GITLAB_PASSWORD" › export GITHUB_ACCESS_TOKEN="<GITHUB_ACCESS_TOKEN>" › export DEV_USERNAME="<DEV_USERNAME>" › export DEV_TOKEN="<DEV_TOKEN>"Update
gitlab-qaif needed› gem install gitlab-qaLog into the
devcontainer registry› docker login --username "$DEV_USERNAME" --password "$DEV_TOKEN" dev.gitlab.org:5005Automated QA completed. QA can be parallelized manually (for now):
# Tab 1: This should take approximately 4.5 minutes › gitlab-qa Test::Instance::Any $QA_IMAGE $QA_ENV_URL -- qa/specs/features/api/ qa/specs/features/login/ qa/specs/features/merge_request/# Tab 2: This should take approximately 6 minutes › gitlab-qa Test::Instance::Any $QA_IMAGE $QA_ENV_URL -- qa/specs/features/project/# Tab 3: This should take approximately 5 minutes › gitlab-qa Test::Instance::Any $QA_IMAGE $QA_ENV_URL -- qa/specs/features/repository/Post results as comments of this issue
Create
Automation Triage RELEASE_MAJOR_VERSION RC#issues for all the automated QA failures (with failures logs + screenshots) and link it to this issue