Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
condenser
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
condenser
Merge requests
!49
Something went wrong on our end
chore: ci/cd and repository cleaning
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
chore: ci/cd and repository cleaning
ci-cd
into
develop
Overview
0
Commits
9
Pipelines
0
Changes
1
Merged
Bartłomiej Górnicki
requested to merge
ci-cd
into
develop
4 years ago
Overview
0
Commits
9
Pipelines
0
Changes
1
Expand
0
0
Merge request reports
Viewing commit
ab536abf
Prev
Next
Show latest version
1 file
+
7
−
3
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
ab536abf
chore: use internal registry for review images
· ab536abf
Bartłomiej Górnicki
authored
4 years ago
.gitlab-ci.yml
+
7
−
3
Options
@@ -64,10 +64,12 @@ build-review-app:
<<
:
*docker-job
stage
:
build
variables
:
DOCKER_TAG
:
$
DOCKER
_IMAGE:$CI_COMMIT_SHORT_SHA
DOCKER_TAG
:
$
CI_REGISTRY
_IMAGE:$CI_COMMIT_SHORT_SHA
SOURCE_COMMIT
:
$CI_COMMIT_SHA
only
:
-
merge_requests
before_script
:
-
echo $CI_JOB_TOKEN | docker login -u $CI_REGISTRY_USER $CI_REGISTRY --password-stdin
script
:
-
docker build -t $DOCKER_TAG --build-arg SOURCE_COMMIT --build-arg DOCKER_TAG .
-
docker push $DOCKER_TAG
@@ -77,14 +79,16 @@ deploy-review-app:
<<
:
*docker-remote-host-review
stage
:
deploy
variables
:
DOCKER_TAG
:
$
DOCKER
_IMAGE:$CI_COMMIT_SHORT_SHA
DOCKER_TAG
:
$
CI_REGISTRY
_IMAGE:$CI_COMMIT_SHORT_SHA
SERVICE_NAME
:
review_$CI_ENVIRONMENT_SLUG
only
:
-
merge_requests
before_script
:
-
echo $CI_JOB_TOKEN | DOCKER_CERT_PATH=$CERTS docker -H $REVIEW_HOST --tlsverify login -u $CI_REGISTRY_USER $CI_REGISTRY --password-stdin
script
:
-
DOCKER_CERT_PATH=$CERTS docker -H $REVIEW_HOST --tlsverify pull $DOCKER_TAG
-
DOCKER_CERT_PATH=$CERTS docker -H $REVIEW_HOST --tlsverify service rm $SERVICE_NAME ||
true
# try to remove previous service but not fail if it not exist
-
DOCKER_CERT_PATH=$CERTS docker -H $REVIEW_HOST --tlsverify service create --network infrastructure --name $SERVICE_NAME $DOCKER_TAG
-
DOCKER_CERT_PATH=$CERTS docker -H $REVIEW_HOST --tlsverify service create
--with-registry-auth
--network infrastructure --name $SERVICE_NAME $DOCKER_TAG
-
echo "Review app deployed"
environment
:
name
:
review/$CI_COMMIT_REF_NAME
Loading