From 06b484075eec0545fad0f5edb4a3f0bb37c815a8 Mon Sep 17 00:00:00 2001 From: Dominik Hebeler <dominik@suma-ev.de> Date: Wed, 28 Aug 2019 12:43:54 +0000 Subject: [PATCH] Update .gitlab-ci.yml --- .gitlab-ci.yml | 73 +------------------------------------------------- 1 file changed, 1 insertion(+), 72 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 891ce90..58f9fb3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,75 +22,4 @@ prepare_node: - npm install only: - branches - - tags - -build: - stage: 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 - # Build the dependencies - - docker run --dns=1.1.1.1 --rm -v "$PWD":/usr/src/app -w /usr/src/app node:10 bash -c "npm install prod --verbose && npm run prod" - - docker run --dns=1.1.1.1 --rm -v $(pwd):/app composer/composer:latest install - - docker pull $CI_APPLICATION_REPOSITORY:latest || true - - | - docker build \ - --cache-from $CI_APPLICATION_REPOSITORY: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:latest" - - docker push "$CI_APPLICATION_REPOSITORY:$CI_APPLICATION_TAG" - only: - - branches - - tags - - -review: - variables: - AUTO_DEVOPS_BUILD_IMAGE_EXTRA_ARGS: --cache-from $CI_APPLICATION_REPOSITORY:$CI_APPLICATION_TAG - HELM_UPGRADE_EXTRA_ARGS: --set service.internalPort=80 --set service.commonName= --set ingress.tls.enabled=false --set ingress.annotations.kubernetes\.io/tls-acme="false" --set ingress.annotations.nginx\.ingress\.kubernetes\.io/ssl-redirect="false" - -production: - variables: - HELM_UPGRADE_EXTRA_ARGS: --set service.internalPort=80 --set service.commonName= --set ingress.annotations.certmanager\.k8s\.io/cluster-issuer=letsencrypt-prod - environment: - url: https://proxy.metager.de + - tags \ No newline at end of file -- GitLab