Skip to content

Commit

Permalink
Add deploy step
Browse files Browse the repository at this point in the history
Signed-off-by: Sascha Grunert <sgrunert@suse.com>
  • Loading branch information
saschagrunert committed Jun 28, 2019
1 parent cde206e commit 2a17249
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
24 changes: 24 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ workflows:
jobs:
- build
- build-static
- deploy:
requires:
- image
- doc
- doc-publish:
requires:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -79,7 +79,7 @@ hlint:

.PHONY: image-build
image-build:
$(call image,build)
$(call image,performabot-build)

.PHONY: image-performabot
image-performabot:
Expand Down

0 comments on commit 2a17249

Please sign in to comment.