Commit c516c801 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch '55036-add-manual-assets-compile-job-qa' into 'master'

Compile assets needed by QA tests

Closes #55036

See merge request gitlab-org/gitlab-ce!23752
parents a3049115 0f751f6f
...@@ -231,10 +231,16 @@ package-and-qa: ...@@ -231,10 +231,16 @@ package-and-qa:
<<: *single-script-job <<: *single-script-job
variables: variables:
<<: *single-script-job-variables <<: *single-script-job-variables
API_TOKEN: "${GITLAB_BOT_MULTI_PROJECT_PIPELINE_POLLING_TOKEN}"
SCRIPT_NAME: trigger-build SCRIPT_NAME: trigger-build
retry: 0 retry: 0
script: script:
- gem install gitlab --no-document - gem install gitlab --no-document
- apk add --update openssl curl jq
- wget $CI_PROJECT_URL/raw/$CI_COMMIT_SHA/scripts/review_apps/review-apps.sh
- chmod 755 review-apps.sh
- source ./review-apps.sh
- wait_for_job_to_be_done "gitlab:assets:compile"
- ./$SCRIPT_NAME omnibus - ./$SCRIPT_NAME omnibus
when: manual when: manual
only: only:
...@@ -600,7 +606,7 @@ gitlab:setup-mysql: ...@@ -600,7 +606,7 @@ gitlab:setup-mysql:
# Frontend-related jobs # Frontend-related jobs
gitlab:assets:compile: gitlab:assets:compile:
<<: *dedicated-no-docs-and-no-qa-pull-cache-job <<: *dedicated-no-docs-pull-cache-job
image: dev.gitlab.org:5005/gitlab/gitlab-build-images:ruby-2.5.3-git-2.18-chrome-69.0-node-8.x-yarn-1.12-graphicsmagick-1.3.29-docker-18.06.1 image: dev.gitlab.org:5005/gitlab/gitlab-build-images:ruby-2.5.3-git-2.18-chrome-69.0-node-8.x-yarn-1.12-graphicsmagick-1.3.29-docker-18.06.1
dependencies: [] dependencies: []
services: services:
......
...@@ -292,7 +292,7 @@ function get_job_id() { ...@@ -292,7 +292,7 @@ function get_job_id() {
local job_id=$(curl --silent --show-error --header "PRIVATE-TOKEN: ${API_TOKEN}" "${url}" | jq "map(select(.name == \"${job_name}\")) | map(.id) | last") local job_id=$(curl --silent --show-error --header "PRIVATE-TOKEN: ${API_TOKEN}" "${url}" | jq "map(select(.name == \"${job_name}\")) | map(.id) | last")
[[ "${job_id}" == "null" && "${page}" -lt "$max_page" ]] || break [[ "${job_id}" == "null" && "${page}" -lt "$max_page" ]] || break
((page++)) let "page++"
done done
if [[ "${job_id}" == "" ]]; then if [[ "${job_id}" == "" ]]; then
...@@ -334,7 +334,7 @@ function wait_for_job_to_be_done() { ...@@ -334,7 +334,7 @@ function wait_for_job_to_be_done() {
[[ "${job_status}" == "pending" || "${job_status}" == "running" ]] || break [[ "${job_status}" == "pending" || "${job_status}" == "running" ]] || break
printf "." printf "."
((elapsed_seconds+=$interval)) let "elapsed_seconds+=interval"
sleep ${interval} sleep ${interval}
done done
......
...@@ -68,7 +68,7 @@ module Trigger ...@@ -68,7 +68,7 @@ module Trigger
def base_variables def base_variables
{ {
'GITLAB_REF_SLUG' => ref_slug, 'GITLAB_REF_SLUG' => ENV['CI_COMMIT_REF_SLUG'],
'TRIGGERED_USER' => ENV['TRIGGERED_USER'] || ENV['GITLAB_USER_NAME'], 'TRIGGERED_USER' => ENV['TRIGGERED_USER'] || ENV['GITLAB_USER_NAME'],
'TRIGGER_SOURCE' => ENV['CI_JOB_URL'], 'TRIGGER_SOURCE' => ENV['CI_JOB_URL'],
'TOP_UPSTREAM_SOURCE_PROJECT' => ENV['CI_PROJECT_PATH'], 'TOP_UPSTREAM_SOURCE_PROJECT' => ENV['CI_PROJECT_PATH'],
...@@ -77,12 +77,6 @@ module Trigger ...@@ -77,12 +77,6 @@ module Trigger
} }
end end
def ref_slug
return 'master' if ENV['CI_COMMIT_REF_SLUG'] =~ %r{(\Aqa[/-]|-qa\z)}
ENV['CI_COMMIT_REF_SLUG']
end
# Read version files from all components # Read version files from all components
def version_file_variables def version_file_variables
Dir.glob("*_VERSION").each_with_object({}) do |version_file, params| Dir.glob("*_VERSION").each_with_object({}) do |version_file, params|
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment