Skip to content

Commit

Permalink
Merge pull request #253 from stakater/remove-unused-files
Browse files Browse the repository at this point in the history
[skip-ci] Remove unused files
  • Loading branch information
ahmedwaleedmalik committed Jul 30, 2021
2 parents 2aa514a + cafbcbd commit d0aa627
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 85 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/pull_request.yaml
Expand Up @@ -36,10 +36,12 @@ jobs:
run: |
make install
- name: Lint
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.26.0
golangci-lint run --timeout=10m ./...
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v2.3.0
with:
version: v1.33
only-new-issues: false
args: --timeout 10m

- name: Helm Lint
run: |
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/push.yaml
Expand Up @@ -39,11 +39,13 @@ jobs:
run: |
make install
- name: Lint
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.26.0
golangci-lint run --timeout=10m ./...
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v2.3.0
with:
version: v1.33
only-new-issues: false
args: --timeout 10m

- name: Install kubectl
run: |
curl -LO "https://storage.googleapis.com/kubernetes-release/release/v${KUBERNETES_VERSION}/bin/linux/amd64/kubectl"
Expand Down
40 changes: 8 additions & 32 deletions Makefile
@@ -1,6 +1,6 @@
# note: call scripts from /scripts

.PHONY: default build builder-image binary-image test stop clean-images clean push apply deploy release release-all manifest push clean-image
.PHONY: default build build-image test stop push apply deploy release release-all manifest push

OS ?= linux
ARCH ?= ???
Expand All @@ -9,12 +9,12 @@ ALL_ARCH ?= arm64 arm amd64
BUILDER ?= reloader-builder-${ARCH}
BINARY ?= Reloader
DOCKER_IMAGE ?= stakater/reloader
# Default value "dev"
TAG ?= v0.0.75.0
REPOSITORY_GENERIC = ${DOCKER_IMAGE}:${TAG}
REPOSITORY_ARCH = ${DOCKER_IMAGE}:${TAG}-${ARCH}

# Default value "dev"
VERSION ?= 0.0.1

REPOSITORY_GENERIC = ${DOCKER_IMAGE}:${VERSION}
REPOSITORY_ARCH = ${DOCKER_IMAGE}:v${VERSION}-${ARCH}
BUILD=

GOCMD = go
Expand All @@ -29,20 +29,13 @@ install:
build:
"$(GOCMD)" build ${GOFLAGS} ${LDFLAGS} -o "${BINARY}"

builder-image:
docker buildx build --platform ${OS}/${ARCH} --build-arg GOARCH=$(ARCH) -t "${BUILDER}" --load -f build/package/Dockerfile.build .

reloader-${ARCH}.tar:
docker buildx build --platform ${OS}/${ARCH} --build-arg GOARCH=$(ARCH) -t "${BUILDER}" --load -f build/package/Dockerfile.build .
docker run --platform ${OS}/${ARCH} --rm "${BUILDER}" > reloader-${ARCH}.tar

binary-image: builder-image
cat reloader-${ARCH}.tar | docker buildx build --platform ${OS}/${ARCH} -t "${REPOSITORY_ARCH}" --load -f Dockerfile.run -
build-image:
docker buildx build --platform ${OS}/${ARCH} --build-arg GOARCH=$(ARCH) -t "${REPOSITORY_ARCH}" --load -f Dockerfile .

push:
docker push ${REPOSITORY_ARCH}

release: binary-image push manifest
release: build-image push manifest

release-all:
-rm -rf ~/.docker/manifests/*
Expand All @@ -66,23 +59,6 @@ test:
stop:
@docker stop "${BINARY}"

clean-images: stop
-docker rmi "${BINARY}"
@for arch in $(ALL_ARCH) ; do \
echo Clean image: $$arch ; \
make clean-image ARCH=$$arch ; \
done
-docker rmi "${REPOSITORY_GENERIC}"

clean-image:
-docker rmi "${BUILDER}"
-docker rmi "${REPOSITORY_ARCH}"
-rm -rf ~/.docker/manifests/*

clean:
"$(GOCMD)" clean -i
-rm -rf reloader-*.tar

apply:
kubectl apply -f deployments/manifests/ -n temp-reloader

Expand Down
26 changes: 0 additions & 26 deletions build/package/Dockerfile.build

This file was deleted.

14 changes: 0 additions & 14 deletions build/package/Dockerfile.run

This file was deleted.

4 changes: 0 additions & 4 deletions stk.yaml

This file was deleted.

0 comments on commit d0aa627

Please sign in to comment.