Skip to content

Commit

Permalink
Merge pull request #12 from bbc/jamessa-noJenkins
Browse files Browse the repository at this point in the history
Regenerate static files
  • Loading branch information
j616 authored Dec 5, 2023
2 parents 21c25b7 + 3fe55b2 commit 83a2bde
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 29 deletions.
1 change: 0 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ _(tick as appropriate)_
- [ ] PR completes task/fixes bug
- [ ] Tests exercise code appropriately
- [ ] New features and API breaks are flagged in commit messages using magic strings
- [ ] Repo maintainer is notified that a release is required
- [ ] Documentation updated (README, Confluence, Docstrings, API spec, Engineering Guide, etc.)
- [ ] Downstream repos have been checked for potential breaks & fixed as needed
- [ ] APIs/UIs/CLIs updated as required
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/shared-ext-ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ on:
env:
PYTHON_VERSION: ${{ inputs.pythonVersion == '' && '3.10' || inputs.pythonVersion }}
COMMONTOOLING_BRANCH: ${{ inputs.commontoolingBranch == '' && 'main' || inputs.commontoolingBranch }}
BUILD_TAG: ${{ github.run_id }} # This is currently used by commontooling to detect CI environments
CHECKOUT_REF: ${{ inputs.checkoutRef == '' && github.ref || inputs.checkoutRef }}

jobs:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/shared-ext-release-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ on:

env:
COMMONTOOLING_BRANCH: ${{ inputs.commontoolingBranch == '' && 'main' || inputs.commontoolingBranch }}
BUILD_TAG: ${{ github.run_id }} # This is currently used by commontooling to detect CI environments

jobs:
CheckStaticFiles:
Expand Down
10 changes: 4 additions & 6 deletions static-commontooling/make/docker.mk
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,7 @@ include $(commontooling_dir)/make/include/dockerignore.mk
# Some standard patterns with some variables to turn them on and off
MS_DOCKER_ARTEFACT?=TRUE
ifeq "${MS_DOCKER_ARTEFACT}" "TRUE"
artefact: ms_docker-build
artefacts: artefact
artefacts: ms_docker-build
endif

MS_DOCKER_SOURCE?=TRUE
Expand Down Expand Up @@ -184,8 +183,7 @@ ms_docker-build-mypy: $(topdir)/.mypy.ini
endif

ms_docker-run-mypy: EXTRA_DOCKER_RUN_ARGS+=--mount type=bind,source=$(PIP_CONFIG_FILE),target=/etc/pip.conf,readonly
mypy: ms_docker-run-mypy
typecheck: mypy
typecheck: ms_docker-run-mypy
endif

$(topbuilddir)/.tmp/run_with_dir_modes.sh: $(commontooling_dir)/misc/run_with_dir_modes.sh $(topbuilddir)/.tmp
Expand Down Expand Up @@ -227,7 +225,7 @@ upload-docker:
enable_push=FALSE
ifneq "${VERSION}" "${NEXT_VERSION}"
enable_push=TRUE
else ifneq "${BUILD_TAG}" "local"
else ifeq "${GITHUB_ACTIONS}" "true"
enable_push=TRUE
endif

Expand Down Expand Up @@ -284,4 +282,4 @@ endif
echo " $(DOCKER_COMPOSE) <ARGS>"; \
fi

.PHONY: help-docker artefact upload-docker mypy typecheck artefacts
.PHONY: help-docker upload-docker typecheck artefacts
6 changes: 3 additions & 3 deletions static-commontooling/make/include/core.mk
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ CLOUDFIT_BASE_LABEL?=latest
endif

# Set python pip config location
ifeq "${BUILD_TAG}" "local"
PIP_CONFIG_FILE?=/etc/pip.conf
else
ifeq "${GITHUB_ACTIONS}" "true"
PIP_CONFIG_FILE?=$(project_root_dir)/.pip.conf
else
PIP_CONFIG_FILE?=/etc/pip.conf
endif

CLOUDFIT_BASE_NAME?=python
Expand Down
6 changes: 3 additions & 3 deletions static-commontooling/make/include/pythonic_version.mk
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ $(topdir)/.tmp/_next_version.py: $(topdir)/.tmp
@echo "git_commit = '0000000'" >> $(topdir)/.tmp/_next_version.py


ifeq "${BUILD_TAG}" "local"
$(VERSIONFILE): $(topdir)/.tmp/_next_version.py
ifeq "${GITHUB_ACTIONS}" "true"
$(VERSIONFILE): $(topdir)/.tmp/_full_version.py
cp $< $@
else
$(VERSIONFILE): $(topdir)/.tmp/_full_version.py
$(VERSIONFILE): $(topdir)/.tmp/_next_version.py
cp $< $@
endif

Expand Down
11 changes: 1 addition & 10 deletions static-commontooling/make/include/version.mk
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,9 @@ version:
next-version:
@echo $(NEXT_VERSION)

ifeq "${topdir}" "${project_root_dir}"
release:
git tag -a $(NEXT_VERSION) -m "v.$(NEXT_VERSION)"
@echo "Added tag $(NEXT_VERSION) at commit $(GITCOMMIT), to push it up use: git push origin --tags"
endif

help-version:
@echo "$(PROJECT)-$(VERSION)"
@echo "make version - Print the current version of the code in the repo, including pre-release indicators"
@echo "make next-version - Print the version the code should have if it is released as it currently is"
ifeq "${topdir}" "${project_root_dir}"
@echo "make release - Add a tag to the repo marking the current commit as a release"
endif

.PHONY: version next-version help-version release
.PHONY: version next-version help-version
6 changes: 3 additions & 3 deletions static-commontooling/make/pythonic.mk
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ CLEAN_FILES += $(topbuilddir)/dist
# Add extra dependencies to the core targets
all: help-pythonic

ifeq "${BUILD_TAG}" "local"
VERSION_IN_PYTHON=${NEXT_VERSION}
else
ifeq "${GITHUB_ACTIONS}" "true"
VERSION_IN_PYTHON=${VERSION}
else
VERSION_IN_PYTHON=${NEXT_VERSION}
endif

WHEEL_FILE?=$(topbuilddir)/dist/$(MODNAME)-$(VERSION)-py3-none-any.whl
Expand Down
1 change: 0 additions & 1 deletion static-commontooling/make/standalone.mk
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ commontooling_dir?=$(project_root_dir)/commontooling
endif

include $(commontooling_dir)/make/include/core.mk
-include $(project_root_dir)/commontooling/make/include/jenkinsfile.mk
-include $(project_root_dir)/commontooling/make/include/pull_request_template.mk
include $(commontooling_dir)/make/include/gitignore.mk

Expand Down

0 comments on commit 83a2bde

Please sign in to comment.