From 3da30833079c7b3f4713d0754de18e8104e6811e Mon Sep 17 00:00:00 2001 From: lilleman Date: Sun, 11 Feb 2024 16:28:13 +0100 Subject: [PATCH] CI CD work --- .drone.yml | 78 ------------------------------------------------------ Dockerfile | 2 +- 2 files changed, 1 insertion(+), 79 deletions(-) delete mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index ce9c594..0000000 --- a/.drone.yml +++ /dev/null @@ -1,78 +0,0 @@ -kind: pipeline -type: docker -name: Tests - -steps: - - name: Tests - image: docker/compose:1.29.2 - volumes: - - name: docker-sock - path: /var/run/docker.sock - commands: - - docker-compose down -v --remove-orphans -t0 - - docker-compose build - - docker-compose --profile tests build - - docker-compose up -d - - docker-compose run --rm tests - - docker-compose down -v --remove-orphans -t0 - -volumes: - - name: docker-sock - host: - path: /var/run/docker.sock - -trigger: - event: - exclude: - - tag ---- -kind: pipeline -type: docker -name: Deploy - -steps: - - name: Tests - image: docker/compose:1.29.2 - volumes: - - name: docker-sock - path: /var/run/docker.sock - commands: - - docker-compose down -v --remove-orphans -t0 - - docker-compose build - - docker-compose --profile tests build - - docker-compose up -d - - docker-compose run --rm tests - - docker-compose down -v --remove-orphans -t0 - - name: Build images - image: docker/compose:1.29.2 - volumes: - - name: docker-sock - path: /var/run/docker.sock - commands: - - docker build -t lilleman/auth-api-db-migrate:$DRONE_TAG -f ./Dockerfile.migrations . - - docker build -t lilleman/auth-api:$DRONE_TAG -f ./Dockerfile . - - name: Push to Docker Hub - image: docker/compose:1.29.2 - environment: - DOCKERHUB_TOKEN: - from_secret: dockerhub - volumes: - - name: docker-sock - path: /var/run/docker.sock - commands: - - docker login -u lilleman -p $DOCKERHUB_TOKEN - - docker push lilleman/auth-api-db-migrate:$DRONE_TAG - - docker push lilleman/auth-api:$DRONE_TAG - - docker tag lilleman/auth-api-db-migrate:$DRONE_TAG lilleman/auth-api-db-migrate:latest - - docker tag lilleman/auth-api:$DRONE_TAG lilleman/auth-api:latest - - docker push lilleman/auth-api-db-migrate:latest - - docker push lilleman/auth-api:latest - -volumes: - - name: docker-sock - host: - path: /var/run/docker.sock - -trigger: - event: - - tag diff --git a/Dockerfile b/Dockerfile index 5f64c7b..9654b0b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,7 @@ ENV GO111MODULE=on \ GOARCH=amd64 # Set workdir in GOPATH -WORKDIR $GOPATH/src/gitlab.larvit.se/power-plan/auth +WORKDIR $GOPATH/src/gitea.larvit.se/power-plan/auth # Copy and download dependency using go mod COPY go.mod .