Skip to content

Commit

Permalink
fiddle with docker, maybe release?
Browse files Browse the repository at this point in the history
  • Loading branch information
robbkidd committed Sep 30, 2024
1 parent f0e840f commit 2f044ba
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
21 changes: 18 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,24 @@ commands:
name: Right yq?
command: |
bin/yq --version
setup_remote_and_local_docker:
description: "Setup Docker and fiddle permissions when running local CI"
steps:
- setup_remote_docker
- run:
name: Maybe fiddle local Docker permissions
command: |
ls -ls /var/run/docker*.sock
if [[ ${CIRCLE_SHELL_ENV} =~ "localbuild" ]]; then
sudo chgrp circleci /var/run/docker*.sock
fi
ls -ls /var/run/docker*.sock
jobs:
test:
executor: go-executor
working_directory: ~/repo
steps:
- setup_remote_and_local_docker
- checkout
- setup_yq
- run:
Expand All @@ -39,10 +51,9 @@ jobs:
- cmd
build:
executor: go-executor
# working_directory: ~/repo
steps:
- setup_remote_and_local_docker
- checkout
- setup_remote_docker
- setup_yq
- attach_workspace:
at: .
Expand Down Expand Up @@ -89,3 +100,7 @@ workflows:
<<: *filters_always
requires:
- test
- publish_image:
<<: *filters_publish
requires:
- build
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ endif
version:
@echo "CIRCLE_TAG: $(CIRCLE_TAG)"
@echo "VERSION (build info & packaging): $(VERSION)"
@echo "TAGS (for image labeling): $(TAGS)"

# The Go platform info for the build host; cross-compile target are figured out differently
GOOS=$(shell go env GOOS)
Expand Down Expand Up @@ -112,7 +111,7 @@ KO_DOCKER_REPO ?= ko.local
image: $(GO_SOURCES) $(GORELEASER)
@echo "\n +++ Building image \n"
VERSION=$(VERSION) \
$(GORELEASER) release $(MAYBE_SNAPSHOT) --clean --skip archive,nfpm,publish --single-target
$(GORELEASER) release $(MAYBE_SNAPSHOT) --clean --skip archive,nfpm,publish

.PHONY: clean
clean:
Expand Down

0 comments on commit 2f044ba

Please sign in to comment.