Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
teemu61 committed Feb 13, 2025
1 parent cb33718 commit 94b3959
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 139 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ on:
- main
workflow_dispatch: { }

env:
GCP_REPO: europe-north1-docker.pkg.dev/vivid-env-450617-g5/teemu-images
DOCKER_IMAGE: dataeng

jobs:
git-tag-and-push:
runs-on:
Expand All @@ -29,10 +25,8 @@ jobs:
id: versioning
run: |
git fetch --tags
# make git-tag-and-push
pip3 install --user ruamel.yaml
VERSION=$(python3 -c "import dataeng; print(dataeng.__version__)")
echo "version is: $VERSION"
git tag -a $(VERSION) -m v$(VERSION) && git push origin $(VERSION)
echo "version=$VERSION" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -63,7 +57,7 @@ jobs:
uses: 'google-github-actions/setup-gcloud@v2'

- name: Register gcloud as a Docker credential helper
run: gcloud auth configure-docker europe-docker.pkg.dev
run: gcloud auth configure-docker europe-north1-docker.pkg.dev

- name: Define image meta
id: docker_meta
Expand All @@ -85,4 +79,4 @@ jobs:
platforms: linux/amd64
tags: ${{ steps.docker_meta.outputs.tags }}
provenance: false
secret-files: gcp_secret=${{ steps.gcp_auth.outputs.credentials_file_path }}
secret-files: gcp_secret=${{ steps.gcp_auth.outputs.credentials_file_path }}
55 changes: 0 additions & 55 deletions .github/workflows/pull-request.yaml

This file was deleted.

87 changes: 11 additions & 76 deletions dataeng/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,83 +8,18 @@ TAG ?= latest
VERSION := $(shell sed -ne "/__version__/s/^.*=.'\(.*\)'$$/\1/p" $(PACKAGE)/__init__.py)

# ---- Generic rules to build containers and publish them
.PHONY: all
all: build docker
# .PHONY: all
# all: build docker

.PHONY: build
build: run-tests
# .PHONY: build
# build: run-tests

.PHONY: docker
docker: run-tests version.json
docker buildx build --secret id=gcp_secret,src=$(HOME)/.config/gcloud/application_default_credentials.json --platform linux/amd64 -t $(CONTAINER) --pull=true .
rm -rf version.json
# .PHONY: docker
# docker: run-tests version.json
# docker buildx build --secret id=gcp_secret,src=$(HOME)/.config/gcloud/application_default_credentials.json --platform linux/amd64 -t $(CONTAINER) --pull=true .
# rm -rf version.json

# version.json:
# @echo "{\"container\": \"$(CONTAINER)\", \
# \"registry\": \"$(REGISTRY)\", \
# \"repository\": \"$(shell git config remote.origin.url)\", \
# \"commit\": \"$(shell git rev-parse HEAD)\", \
# \"date\": \"$(shell date +"%Y%m%dT%H%M")\", \
# \"by\": {\
# \"name\": \"$(shell git config user.name)\", \
# \"email\": \"$(shell git config user.email)\"\
# }}" | python3 -m json.tool | tee $@
# .PHONY: git-tag-and-push
# git-tag-and-push:
# git tag -a $(VERSION) -m v$(VERSION) && git push origin $(VERSION)

# .PHONY: clean
# clean:
# git clean -Xdf -e '!*.iml'

# .PHONY: re
# re: clean all

# # project specific makefile rules
# .built:
# pipenv sync --dev
# touch .built

# .PHONY: run-tests
# run-tests: .built
# pipenv run python3 -X dev -m pytest -rs --junitxml=pytests.xml --cov-branch --cov-report=term --cov-report=xml:coverage.xml --cov-report=html --cov=$(PACKAGE) tests

# .PHONY: pycodestyle
# pycodestyle: .built
# pipenv run pycodestyle --statistics --$(shell grep 'max-line-length=' .pylintrc) $(PACKAGE)

# .PHONY: vulture
# vulture: .built
# pipenv run vulture --min-confidence=90 $(PACKAGE)

# .PHONY: pylintchecker
# pylintchecker: .built
# pipenv run pylint --rcfile=.pylintrc --fail-under=9.7 $(PACKAGE)

.PHONY: mypy
# mypy: .built
# pipenv run mypy --ignore-missing-imports -i $(PACKAGE);

# .PHONY: lint
# lint: pylintchecker vulture pycodestyle mypy

# .PHONY: deps-check
# deps-check:
# mkdir -p reports && dependency-check --cveValidForHours 24 --out reports --format ALL \
# --enableExperimental --disableAssembly --disableBundleAudit --disableNodeJS --disableOssIndex \
# --scan $(PACKAGE) --project $(PACKAGE)

# .PHONY: beautify
# beautify: .built
# pipenv run yapf --in-place --parallel -vv --recursive --style='{based_on_style: google, column_limit:120, allow_split_before_dict_value: false}' $(PACKAGE) tests

# .PHONY: git-tag-test
# git-tag-test:
# git tag $(VERSION)

.PHONY: git-tag-and-push
git-tag-and-push:
git tag -a $(VERSION) -m v$(VERSION) && git push origin $(VERSION)

# .PHONY: valkama
# valkama: docker
# @echo "Tagging '$(CONTAINER)' as '$(TAG)' and pushing into $(REGISTRY)"
# docker tag $(CONTAINER) $(REGISTRY)/$(CONTAINER):$(TAG)
# docker push $(REGISTRY)/$(CONTAINER):$(TAG) || echo "hint: use 'docker login $(REGISTRY)' to authenticate"

0 comments on commit 94b3959

Please sign in to comment.