From 826eebf097a749d6b8c2df1612d6786ae03822d3 Mon Sep 17 00:00:00 2001 From: an Date: Tue, 30 Jul 2019 19:32:12 +0000 Subject: [PATCH] =?UTF-8?q?=E2=80=9E.drone.yml=E2=80=9C=20=C3=A4ndern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 60 +++++++++++++++++++----------------------------------- 1 file changed, 21 insertions(+), 39 deletions(-) diff --git a/.drone.yml b/.drone.yml index 7fef293..a23fd44 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,39 +1,21 @@ - pipeline: - prebuild: - image: golang:latest - commands: - - IMAGE=dr.dnix.de/$DRONE_REPO_NAME - - REV=$(git rev-list HEAD --count) - - BUILDDATE=$(date) - - BRANCH=$DRONE_COMMIT_BRANCH - - TAGS=.tags - - echo "Building image $IMAGE:$BRANCH-$REV" - - echo -n "$BRANCH-$REV" >$TAGS - - cat $TAGS - build_docker: - image: plugins/docker - repo: dr.dnix.de/${DRONE_REPO_NAME} - tags: - - latest - deploy: - image: ubuntu:16.04 - secrets: - - K8S_SSH_PRIVATE_KEY - - K8S_SSH_PUBLIC_KEY - commands: - - apt update - - apt -y upgrade - - apt install -y git - - IMAGE=dr.dnix.de/$DRONE_REPO_NAME - - BRANCH=$DRONE_COMMIT_BRANCH - - REV=$(git rev-list HEAD --count) - - echo "Deploying image $IMAGE:$BRANCH-$REV" - - cd ~ - - mkdir .ssh - - chmod 700 .ssh - - echo "$K8S_SSH_PRIVATE_KEY" >.ssh/id_rsa - - chmod 600 .ssh/id_rsa - - echo "$K8S_SSH_PUBLIC_KEY" >.ssh/id_rsa.pub - - chmod 600 .ssh/id_rsa.pub - - ssh -oStrictHostKeyChecking=no root@master01 "kubectl set image deployment/image-transformer image-transforめer=dr.dnix.de/image-transformer:$BRANCH-$REV -n dnix-image-transformer" - - ssh -oStrictHostKeyChecking=no root@master01 "kubectl rollout status deployment/image-transformer -n image-transformer" +kind: pipeline +name: default + +steps: + - name: prebuild + image: golang:latest + commands: + - IMAGE=dr.dnix.de/$DRONE_REPO_NAME + - REV=$(git rev-list HEAD --count) + - BUILDDATE=$(date) + - BRANCH=$DRONE_COMMIT_BRANCH + - TAGS=.tags + - echo "Building image $IMAGE:$BRANCH-$REV" + - echo -n "$BRANCH-$REV" >$TAGS + - cat $TAGS + - name: docker + image: plugins/docker + settings: + repo: dr.dnix.de/${DRONE_REPO_NAME} + tags: + - latest \ No newline at end of file