From 4aa1a741c42ff429706828cfb6fdca1985268d25 Mon Sep 17 00:00:00 2001 From: Stricted Date: Mon, 5 Nov 2018 14:49:34 +0100 Subject: [PATCH] gitlab-ci: remove build stage Change-Id: I7a827f472123bd876847220e4cced80ff9709500 --- .gitlab-ci.yml | 76 -------------------------------------------------- 1 file changed, 76 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cf995fe..08fbdbb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,10 +1,4 @@ -stages: - - test - - build - - deploy - test: - stage: test image: python:3.6 tags: - docker @@ -13,73 +7,3 @@ test: script: - pip install -e . - python test.py - -build: - stage: build - image: docker:stable - services: - - docker:dind - variables: - DOCKER_HOST: tcp://docker:2375 - DOCKER_DRIVER: overlay2 - script: - - docker login $CI_REGISTRY -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD - - docker build --build-arg VERSION=$CI_COMMIT_SHA . -t $CI_REGISTRY_IMAGE:$CI_PIPELINE_IID - - docker tag $CI_REGISTRY_IMAGE:$CI_PIPELINE_IID $CI_REGISTRY_IMAGE:latest - - docker push $CI_REGISTRY_IMAGE:latest - - docker push $CI_REGISTRY_IMAGE:$CI_PIPELINE_IID -deploy: - stage: deploy - variables: - KUBECONFIG: /kubeconfig.yml - script: - - curl -sLo /usr/local/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v1.12.2/bin/linux/amd64/kubectl - - chmod +x /usr/local/bin/kubectl - - mkdir ~/.kube/ - - echo $KUBE_CONFIG | base64 -d > $KUBECONFIG - - kubectl config view - - kubectl config set-credentials gitlab --token=$KUBE_TOKEN - - kubectl -n builds set image deployment/builds builds=$CI_REGISTRY_IMAGE:$CI_PIPELINE_IID - - kubectl -n builds rollout status --timeout 60s deploy/builds || (kubectl -n builds rollout undo deploy/builds && false) - only: - refs: - - master - -# EVERYTHING BELOW HERE CAN BE IGNORED -# DO NOT TOUCH ANYTHING BELOW THIS LINE -dependency_scanning: - stage: test - image: docker:stable - variables: - DOCKER_DRIVER: overlay2 - allow_failure: true - services: - - docker:stable-dind - script: - - export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/') - - docker run - --env DEP_SCAN_DISABLE_REMOTE_CHECKS="${DEP_SCAN_DISABLE_REMOTE_CHECKS:-false}" - --volume "$PWD:/code" - --volume /var/run/docker.sock:/var/run/docker.sock - "registry.gitlab.com/gitlab-org/security-products/dependency-scanning:$SP_VERSION" /code - artifacts: - reports: - dependency_scanning: gl-dependency-scanning-report.json -sast: - stage: test - image: docker:stable - variables: - DOCKER_DRIVER: overlay2 - allow_failure: true - services: - - docker:stable-dind - script: - - export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/') - - docker run - --env SAST_CONFIDENCE_LEVEL="${SAST_CONFIDENCE_LEVEL:-3}" - --volume "$PWD:/code" - --volume /var/run/docker.sock:/var/run/docker.sock - "registry.gitlab.com/gitlab-org/security-products/sast:$SP_VERSION" /app/bin/run /code - artifacts: - reports: - sast: gl-sast-report -- 2.20.1