Skip to content

Instantly share code, notes, and snippets.

@gaving
Created February 28, 2017 10:26
Show Gist options
  • Save gaving/5a587ea96c95570de80f5b17da7864b9 to your computer and use it in GitHub Desktop.
Save gaving/5a587ea96c95570de80f5b17da7864b9 to your computer and use it in GitHub Desktop.
variables:
http_proxy: xxxx
https_proxy: xxxx
GIT_SSL_NO_VERIFY: "true"
stages:
- build
build:
image: docker:1.10.3
stage: build
script:
- docker login -e $GITLAB_USER_EMAIL -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
- docker build -t $CI_REGISTRY_IMAGE --build-arg http_proxy=$http_proxy --build-arg https_proxy=$https_proxy --build-arg SSH_PRIVATE_KEY="$SSH_PRIVATE_KEY" .
- docker push $CI_REGISTRY_IMAGE
tags:
- docker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment