From 2a1724987c489219f09bbfd11095433a4de88812 Mon Sep 17 00:00:00 2001 From: Sascha Grunert Date: Fri, 28 Jun 2019 11:22:42 +0200 Subject: [PATCH] Add deploy step Signed-off-by: Sascha Grunert --- .circleci/config.yml | 24 ++++++++++++++++++++++++ Makefile | 8 ++++---- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index df9d273..a1eda2c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -15,6 +15,9 @@ workflows: jobs: - build - build-static + - deploy: + requires: + - image - doc - doc-publish: requires: @@ -75,6 +78,23 @@ jobs: paths: - result/bin + deploy: + machine: true + steps: + - attach_workspace: + at: . + - run: + name: Login to registry + command: docker login -u $DOCKER_USER -p $DOCKER_PASS + - run: + name: Load the image and tag + command: | + docker load -i build/image-performabot.tar + docker tag performabot saschagrunert/performabot + - run: + name: Push the image + command: docker push saschagrunert/performabot + doc: executor: container steps: @@ -151,6 +171,10 @@ jobs: key: v1-image-{{ checksum "nix/nixpkgs.json" }} paths: - /nix + - persist_to_workspace: + root: . + paths: + - build/image-performabot.tar - store_artifacts: path: build/image-performabot.tar destination: build/image-performabot.tar diff --git a/Makefile b/Makefile index 73bcbd0..bd837b7 100644 --- a/Makefile +++ b/Makefile @@ -20,10 +20,10 @@ define image $(call nix-shell-pure-run,\ hack/podman-config &&\ podman --config=$(BUILD_DIR)/podman.conf --storage-driver=vfs \ - build --pull --no-cache -f image-$(1) -t performabot-$(1) &&\ - rm -f $(BUILD_DIR)/image-$(1).tar &&\ + build --pull --no-cache -f image-$(1) -t $(1) &&\ + rm -f $(BUILD_DIR)/$(1).tar &&\ podman --config=$(BUILD_DIR)/podman.conf --storage-driver=vfs \ - save -o $(BUILD_DIR)/image-$(1).tar performabot-$(1)) + save -o $(BUILD_DIR)/image-$(1).tar $(1)) endef @@ -79,7 +79,7 @@ hlint: .PHONY: image-build image-build: - $(call image,build) + $(call image,performabot-build) .PHONY: image-performabot image-performabot: