Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
915d5162
Commit
915d5162
authored
Apr 07, 2020
by
Albert Salim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use kaniko to build qa image
Use kaniko v0.16.0
https://github.com/GoogleContainerTools/kaniko/issues/1162
parent
0eb089e4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
8 deletions
+13
-8
.gitlab/ci/global.gitlab-ci.yml
.gitlab/ci/global.gitlab-ci.yml
+8
-0
.gitlab/ci/review.gitlab-ci.yml
.gitlab/ci/review.gitlab-ci.yml
+5
-8
No files found.
.gitlab/ci/global.gitlab-ci.yml
View file @
915d5162
...
...
@@ -98,6 +98,14 @@
cache
:
key
:
"
debian-stretch-ruby-2.6.5-pg11-node-12.x"
# Pin kaniko to v0.16.0 due to https://github.com/GoogleContainerTools/kaniko/issues/1162
.use-kaniko
:
image
:
name
:
gcr.io/kaniko-project/executor:debug-v0.16.0
entrypoint
:
[
"
"
]
before_script
:
-
echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
.as-if-foss
:
variables
:
FOSS_ONLY
:
'
1'
...
...
.gitlab/ci/review.gitlab-ci.yml
View file @
915d5162
...
...
@@ -8,17 +8,14 @@
build-qa-image
:
extends
:
-
.review-docker
-
.use-kaniko
-
.default-retry
-
.review:rules:mr-and-schedule-auto
stage
:
prepare
script
:
-
'
[[
!
-d
"ee/"
]]
||
export
GITLAB_EDITION="ee"'
-
export QA_MASTER_IMAGE="${CI_REGISTRY}/${CI_PROJECT_PATH}/gitlab/gitlab-${GITLAB_EDITION}-qa:master"
-
export QA_IMAGE="${CI_REGISTRY}/${CI_PROJECT_PATH}/gitlab/gitlab-${GITLAB_EDITION}-qa:${CI_COMMIT_REF_SLUG}"
-
echo "${CI_JOB_TOKEN}" | docker login --username gitlab-ci-token --password-stdin ${CI_REGISTRY}
-
time docker pull "${QA_MASTER_IMAGE}"
-
time docker build --cache-from "${QA_MASTER_IMAGE}" --tag ${QA_IMAGE} --file ./qa/Dockerfile ./
-
time docker push ${QA_IMAGE}
-
export QA_IMAGE="${CI_REGISTRY}/${CI_PROJECT_PATH}/gitlab-${GITLAB_EDITION}-qa:${CI_COMMIT_REF_SLUG}"
-
/kaniko/executor --context=${CI_PROJECT_DIR} --dockerfile=${CI_PROJECT_DIR}/qa/Dockerfile --destination=${QA_IMAGE} --cache=true
.review-cleanup-base
:
extends
:
...
...
@@ -183,7 +180,7 @@ review-stop:
EE_LICENSE
:
"
${REVIEW_APPS_EE_LICENSE}"
before_script
:
-
'
[[
!
-d
"ee/"
]]
||
export
GITLAB_EDITION="ee"'
-
export QA_IMAGE="${CI_REGISTRY}/${CI_PROJECT_PATH}/gitlab
/gitlab
-${GITLAB_EDITION}-qa:${CI_COMMIT_REF_SLUG}"
-
export QA_IMAGE="${CI_REGISTRY}/${CI_PROJECT_PATH}/gitlab-${GITLAB_EDITION}-qa:${CI_COMMIT_REF_SLUG}"
-
export CI_ENVIRONMENT_URL="$(cat environment_url.txt)"
-
echo "${CI_ENVIRONMENT_URL}"
-
echo "${QA_IMAGE}"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment