Skip to content
Snippets Groups Projects
Unverified Commit daa24e7d authored by phelokazi_dube's avatar phelokazi_dube
Browse files

SAR-255 Updated gitlab global variables

parent 270851e9
No related branches found
No related tags found
No related merge requests found
FROM nexus.engageska-portugal.pt/ska-tango-images/pytango-builder:9.3.3.3 AS buildenv
FROM artefact.skao.int/ska-tango-images-pytango-builder:9.3.10 AS buildenv
RUN apt-get update && apt-get install gnupg2 -y
......@@ -22,7 +22,7 @@
"davidanson.vscode-markdownlint",
"alexkrechik.cucumberautocomplete",
],
"postCreateCommand": "python3 -m pip install -e /workspaces/ska-tango-base --extra-index-url https://nexus.engageska-portugal.pt/repository/pypi/simple",
"postCreateCommand": "python3 -m pip install -e /workspaces/ska-tango-base --extra-index-url https://artefact.skao.int/repository/pypi/simple",
"remoteUser": "tango",
"remoteEnv": {
"PATH": "/home/tango/.local/bin:${containerEnv:PATH}",
......
......@@ -21,15 +21,15 @@ endif
RELEASE_SUPPORT := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))/.make-release-support
ifeq ($(strip $(DOCKER_REGISTRY_HOST)),)
DOCKER_REGISTRY_HOST = nexus.engageska-portugal.pt
ifeq ($(strip $(CAR_OCI_REGISTRY_HOST)),)
CAR_OCI_REGISTRY_HOST = artefact.skao.int
endif
ifeq ($(strip $(DOCKER_REGISTRY_USER)),)
DOCKER_REGISTRY_USER = ska-telescope
ifeq ($(strip $(CAR_OCI_REGISTRY_USERNAME)),)
CAR_OCI_REGISTRY_USERNAME = ska-telescope
endif
IMAGE=$(DOCKER_REGISTRY_HOST)/$(DOCKER_REGISTRY_USER)/$(NAME)
IMAGE=$(CAR_OCI_REGISTRY_HOST)/$(CAR_OCI_REGISTRY_USERNAME)/$(NAME)
VERSION=$(shell . $(RELEASE_SUPPORT) ; getVersion)
TAG=$(shell . $(RELEASE_SUPPORT); getTag)
......@@ -53,7 +53,7 @@ pre-push:
post-push:
docker-build: .release
docker build $(DOCKER_BUILD_ARGS) -t $(IMAGE):$(VERSION) $(DOCKER_BUILD_CONTEXT) -f $(DOCKER_FILE_PATH) --build-arg DOCKER_REGISTRY_HOST=$(DOCKER_REGISTRY_HOST) --build-arg DOCKER_REGISTRY_USER=$(DOCKER_REGISTRY_USER) --build-arg IMAGE_VERSION=$(VERSION)
docker build $(DOCKER_BUILD_ARGS) -t $(IMAGE):$(VERSION) $(DOCKER_BUILD_CONTEXT) -f $(DOCKER_FILE_PATH) --build-arg CAR_OCI_REGISTRY_HOST=$(CAR_OCI_REGISTRY_HOST) --build-arg CAR_OCI_REGISTRY_USERNAME=$(CAR_OCI_REGISTRY_USERNAME) --build-arg IMAGE_VERSION=$(VERSION)
@DOCKER_MAJOR=$(shell docker -v | sed -e 's/.*version //' -e 's/,.*//' | cut -d\. -f1) ; \
DOCKER_MINOR=$(shell docker -v | sed -e 's/.*version //' -e 's/,.*//' | cut -d\. -f2) ; \
if [ $$DOCKER_MAJOR -eq 1 ] && [ $$DOCKER_MINOR -lt 10 ] ; then \
......
#
# Project makefile for a SKA Tango Base project. You should normally only need to modify
# DOCKER_REGISTRY_USER and PROJECT below.
# CAR_OCI_REGISTRY_USERNAME and PROJECT below.
# Use bash shell with pipefail option enabled so that the return status of a
# piped command is the value of the last (rightmost) command to exit with a
......@@ -9,15 +9,15 @@
SHELL = /bin/bash
.SHELLFLAGS = -o pipefail -c
# DOCKER_REGISTRY_HOST, DOCKER_REGISTRY_USER and PROJECT are combined to define
# CAR_OCI_REGISTRY_HOST, CAR_OCI_REGISTRY_USERNAME and PROJECT are combined to define
# the Docker tag for this project. The definition below inherits the standard
# value for DOCKER_REGISTRY_HOST (=rnexus.engageska-portugal.pt) and overwrites
# DOCKER_REGISTRY_USER and PROJECT to give a final Docker tag of
# nexus.engageska-portugal.pt/ska-telescope/ska_tango_base
# value for CAR_OCI_REGISTRY_HOST (=artefact.skao.int) and overwrites
# CAR_OCI_REGISTRY_USERNAME and PROJECT to give a final Docker tag of
# artefact.skao.int/ska-telescope/ska_tango_base
#
DOCKER_REGISTRY_USER:=ska-telescope
CAR_OCI_REGISTRY_USERNAME:=ska-telescope
PROJECT = ska_tango_base
IMAGE_FOR_DIAGRAMS = nexus.engageska-portugal.pt/ska-tango-images/pytango-builder:9.3.3.3
IMAGE_FOR_DIAGRAMS = artefact.skao.int/ska-tango-images-pytango-builder:9.3.10
# import some standard Make targets e.g. `make build` (for building
......
......@@ -41,7 +41,7 @@ The requirements for testing are:
#### Installation steps
1. Clone the repository on local machine.
2. Navigate to the root directory of the repository from terminal
3. Run 'python3 -m pip install . --extra-index-url https://nexus.engageska-portugal.pt/repository/pypi/simple'
3. Run 'python3 -m pip install . --extra-index-url https://artefact.skao.int/repository/pypi/simple'
### Testing
The project can be tested locally my invoking *make CI_JOB_ID=some_id test* command. This invokes a chain of commands from the makefile which builds the project's python package, creates a docker image with the project, instantiates separate container for each of the base class and runs unit test cases of each class. Additionally, code analysis is also done and code coverage report is prepared. After testing is done, the containers are taken down.
......@@ -61,7 +61,7 @@ class DishLeafNode(SKABaseDevice):
#### PyCharm
The Docker integration is recommended. For development, use the `nexus.engageska-portugal.pt/ska-telescope/ska_tango_base:latest` image as the Python Interpreter for the project. Note that if `make` is run with targets like `build`, `up`, or `test`, that image will be rebuilt by Docker using the local code, and tagged as `latest`.
The Docker integration is recommended. For development, use the `artefact.skao.int/ska-telescope/ska_tango_base:latest` image as the Python Interpreter for the project. Note that if `make` is run with targets like `build`, `up`, or `test`, that image will be rebuilt by Docker using the local code, and tagged as `latest`.
As this project uses a `src` [folder structure](https://blog.ionelmc.ro/2014/05/25/python-packaging/#the-structure), so under _Preferences > Project Structure_, the `src` folder needs to be marked as "Sources". That will allow the interpreter to be aware of the package from folders like `tests` that are outside of `src`. When adding Run/Debug configurations, make sure "Add content roots to PYTHONPATH" and "Add source roots to PYTHONPATH" are checked.
......
......@@ -12,7 +12,7 @@ installed from the EngageSKA Nexus repository:
.. code-block:: shell-session
me@local:~$ python3 -m pip install --extra-index-url https://nexus.engageska-portugal.pt/repository/pypi/simple ska-tango-base
me@local:~$ python3 -m pip install --extra-index-url https://artefact.skao.int/repository/pypi/simple ska-tango-base
Basic steps
-----------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment