Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Proxy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
open-source
Proxy
Commits
30db7c8f
Commit
30db7c8f
authored
5 years ago
by
Dominik Hebeler
Browse files
Options
Downloads
Patches
Plain Diff
Update .gitlab-ci.yml
parent
825149fe
No related branches found
No related tags found
1 merge request
!5
Resolve "Make Proxy Use Autodevops"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+57
-2
57 additions, 2 deletions
.gitlab-ci.yml
with
57 additions
and
2 deletions
.gitlab-ci.yml
+
57
−
2
View file @
30db7c8f
...
...
@@ -35,5 +35,60 @@ prepare_composer:
paths
:
-
vendor
include
:
-
template
:
Jobs/Build.gitlab-ci.yml
\ No newline at end of file
build
:
image
:
"
registry.gitlab.com/gitlab-org/cluster-integration/auto-build-image/master:stable"
variables
:
DOCKER_TLS_CERTDIR
:
"
"
services
:
-
docker:stable-dind
script
:
-
|
if [[ -z "$CI_COMMIT_TAG" ]]; then
export CI_APPLICATION_REPOSITORY=${CI_APPLICATION_REPOSITORY:-$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG}
export CI_APPLICATION_TAG=${CI_APPLICATION_TAG:-$CI_COMMIT_SHA}
else
export CI_APPLICATION_REPOSITORY=${CI_APPLICATION_REPOSITORY:-$CI_REGISTRY_IMAGE}
export CI_APPLICATION_TAG=${CI_APPLICATION_TAG:-$CI_COMMIT_TAG}
fi
-
|
if ! docker info &>/dev/null; then
if [ -z "$DOCKER_HOST" ] && [ "$KUBERNETES_PORT" ]; then
export DOCKER_HOST='tcp://localhost:2375'
fi
fi
-
|
if [[ -n "$CI_REGISTRY" && -n "$CI_REGISTRY_USER" ]]; then
echo "Logging to GitLab Container Registry with CI credentials..."
docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY"
fi
-
|
if [[ -f Dockerfile ]]; then
echo "Building Dockerfile-based application..."
else
echo "Building Heroku-based application using gliderlabs/herokuish docker image..."
cp /build/Dockerfile Dockerfile
fi
# shellcheck disable=SC2154 # missing variable warning for the lowercase variables
# shellcheck disable=SC2086 # double quoting for globbing warning for $AUTO_DEVOPS_BUILD_IMAGE_EXTRA_ARGS
-
docker pull $CI_APPLICATION_REPOSITORY:latest
-
|
docker build \
--cache-from $CI_REGISTRY_IMAGE:latest \
--build-arg BUILDPACK_URL="$BUILDPACK_URL" \
--build-arg HTTP_PROXY="$HTTP_PROXY" \
--build-arg http_proxy="$http_proxy" \
--build-arg HTTPS_PROXY="$HTTPS_PROXY" \
--build-arg https_proxy="$https_proxy" \
--build-arg FTP_PROXY="$FTP_PROXY" \
--build-arg ftp_proxy="$ftp_proxy" \
--build-arg NO_PROXY="$NO_PROXY" \
--build-arg no_proxy="$no_proxy" \
$AUTO_DEVOPS_BUILD_IMAGE_EXTRA_ARGS \
--tag "$CI_APPLICATION_REPOSITORY:$CI_APPLICATION_TAG" \
--tag "$CI_APPLICATION_REPOSITORY:latest".
docker push "$CI_APPLICATION_REPOSITORY:$CI_APPLICATION_TAG"
only
:
-
branches
-
tags
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment