diff --git a/deploy/deployment.yaml b/deploy/deployment.yaml index 3df9ac6..3147897 100644 --- a/deploy/deployment.yaml +++ b/deploy/deployment.yaml @@ -19,7 +19,7 @@ spec: spec: containers: - image: us.icr.io/sn-labs-rajanjha9235/accounts:1 - name: accounts + name: IMAGE_NAME_HERE resources: {} env: diff --git a/pipelinerun.txt b/pipelinerun.txt new file mode 100644 index 0000000..98ecf2a --- /dev/null +++ b/pipelinerun.txt @@ -0,0 +1,499 @@ +[init : remove] Removing all files from /workspace/source ... + +[clone : clone] + '[' false '=' true ] +[clone : clone] + '[' false '=' true ] +[clone : clone] + '[' false '=' true ] +[clone : clone] + CHECKOUT_DIR=/workspace/output/ +[clone : clone] + '[' true '=' true ] +[clone : clone] + cleandir +[clone : clone] + '[' -d /workspace/output/ ] +[clone : clone] + rm -rf '/workspace/output//*' +[clone : clone] + rm -rf '/workspace/output//.[!.]*' +[clone : clone] + rm -rf '/workspace/output//..?*' +[clone : clone] + test -z +[clone : clone] + test -z +[clone : clone] + test -z +[clone : clone] + git config --global --add safe.directory /workspace/output +[clone : clone] + /ko-app/git-init '-url=https://github.com/rajanjha9235/devops-capstone-project.git' '-revision=cd-pipeline' '-refspec=' '-path=/workspace/output/' '-sslVerify=true' '-submodules=true' '-depth=1' '-sparseCheckoutDirectories=' +[clone : clone] {"level":"info","ts":1717443880.5784338,"caller":"git/git.go:176","msg":"Successfully cloned https://github.com/rajanjha9235/devops-capstone-project.git @ c9fef6eadcfa1598b7548b380fa829ae5bb1f6c2 (grafted, HEAD, origin/cd-pipeline) in path /workspace/output/"} +[clone : clone] {"level":"info","ts":1717443880.6441178,"caller":"git/git.go:215","msg":"Successfully initialized and updated submodules in path /workspace/output/"} +[clone : clone] + cd /workspace/output/ +[clone : clone] + git rev-parse HEAD +[clone : clone] + RESULT_SHA=c9fef6eadcfa1598b7548b380fa829ae5bb1f6c2 +[clone : clone] + EXIT_CODE=0 +[clone : clone] + '[' 0 '!=' 0 ] +[clone : clone] + git log -1 '--pretty=%ct' +[clone : clone] + RESULT_COMMITTER_DATE=1717442806 +[clone : clone] + printf '%s' 1717442806 +[clone : clone] + printf '%s' c9fef6eadcfa1598b7548b380fa829ae5bb1f6c2 +[clone : clone] + printf '%s' https://github.com/rajanjha9235/devops-capstone-project.git + +[lint : flake8] Collecting Werkzeug==2.1.2 +[lint : flake8] Downloading Werkzeug-2.1.2-py3-none-any.whl (224 kB) +[lint : flake8] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 224.9/224.9 kB 6.2 MB/s eta 0:00:00 +[lint : flake8] Collecting SQLAlchemy==1.4.46 +[lint : flake8] Downloading SQLAlchemy-1.4.46-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.6 MB) +[lint : flake8] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.6/1.6 MB 44.0 MB/s eta 0:00:00 +[lint : flake8] Collecting Flask==2.1.2 +[lint : flake8] Downloading Flask-2.1.2-py3-none-any.whl (95 kB) +[lint : flake8] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 95.2/95.2 kB 44.5 MB/s eta 0:00:00 +[lint : flake8] Collecting Flask-SQLAlchemy==2.5.1 +[lint : flake8] Downloading Flask_SQLAlchemy-2.5.1-py2.py3-none-any.whl (17 kB) +[lint : flake8] Collecting psycopg2-binary==2.9.3 +[lint : flake8] Downloading psycopg2_binary-2.9.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.0 MB) +[lint : flake8] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.0/3.0 MB 38.2 MB/s eta 0:00:00 +[lint : flake8] Collecting python-dotenv==0.20.0 +[lint : flake8] Downloading python_dotenv-0.20.0-py3-none-any.whl (17 kB) +[lint : flake8] Collecting gunicorn==20.1.0 +[lint : flake8] Downloading gunicorn-20.1.0-py3-none-any.whl (79 kB) +[lint : flake8] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 79.5/79.5 kB 28.8 MB/s eta 0:00:00 +[lint : flake8] Collecting honcho==1.1.0 +[lint : flake8] Downloading honcho-1.1.0-py2.py3-none-any.whl (21 kB) +[lint : flake8] Collecting pylint==2.14.0 +[lint : flake8] Downloading pylint-2.14.0-py3-none-any.whl (485 kB) +[lint : flake8] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 485.0/485.0 kB 91.1 MB/s eta 0:00:00 +[lint : flake8] Collecting flake8==4.0.1 +[lint : flake8] Downloading flake8-4.0.1-py2.py3-none-any.whl (64 kB) +[lint : flake8] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 64.1/64.1 kB 32.8 MB/s eta 0:00:00 +[lint : flake8] Collecting black==22.3.0 +[lint : flake8] Downloading black-22.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB) +[lint : flake8] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.5/1.5 MB 103.7 MB/s eta 0:00:00 +[lint : flake8] Collecting nose==1.3.7 +[lint : flake8] Downloading nose-1.3.7-py3-none-any.whl (154 kB) +[lint : flake8] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 154.7/154.7 kB 53.5 MB/s eta 0:00:00 +[lint : flake8] Collecting pinocchio==0.4.3 +[lint : flake8] Downloading pinocchio-0.4.3-py3-none-any.whl (12 kB) +[lint : flake8] Collecting factory-boy==2.12.0 +[lint : flake8] Downloading factory_boy-2.12.0-py2.py3-none-any.whl (36 kB) +[lint : flake8] Collecting coverage==6.3.2 +[lint : flake8] Downloading coverage-6.3.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (210 kB) +[lint : flake8] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 210.7/210.7 kB 79.2 MB/s eta 0:00:00 +[lint : flake8] Collecting httpie==3.2.1 +[lint : flake8] Downloading httpie-3.2.1-py3-none-any.whl (124 kB) +[lint : flake8] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 125.0/125.0 kB 43.8 MB/s eta 0:00:00 +[lint : flake8] Collecting flask_talisman +[lint : flake8] Downloading flask_talisman-1.1.0-py2.py3-none-any.whl (18 kB) +[lint : flake8] Collecting Flask-Cors +[lint : flake8] Downloading Flask_Cors-4.0.1-py2.py3-none-any.whl (14 kB) +[lint : flake8] Collecting greenlet!=0.4.17 +[lint : flake8] Downloading greenlet-3.0.3-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (614 kB) +[lint : flake8] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 614.3/614.3 kB 99.3 MB/s eta 0:00:00 +[lint : flake8] Collecting importlib-metadata>=3.6.0 +[lint : flake8] Downloading importlib_metadata-7.1.0-py3-none-any.whl (24 kB) +[lint : flake8] Collecting itsdangerous>=2.0 +[lint : flake8] Downloading itsdangerous-2.2.0-py3-none-any.whl (16 kB) +[lint : flake8] Collecting click>=8.0 +[lint : flake8] Downloading click-8.1.7-py3-none-any.whl (97 kB) +[lint : flake8] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 97.9/97.9 kB 37.4 MB/s eta 0:00:00 +[lint : flake8] Collecting Jinja2>=3.0 +[lint : flake8] Downloading jinja2-3.1.4-py3-none-any.whl (133 kB) +[lint : flake8] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.3/133.3 kB 55.7 MB/s eta 0:00:00 +[lint : flake8] Requirement already satisfied: setuptools>=3.0 in /usr/local/lib/python3.9/site-packages (from gunicorn==20.1.0->-r requirements.txt (line 12)) (58.1.0) +[lint : flake8] Collecting astroid<=2.12.0-dev0,>=2.11.5 +[lint : flake8] Downloading astroid-2.11.7-py3-none-any.whl (251 kB) +[lint : flake8] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 251.2/251.2 kB 58.7 MB/s eta 0:00:00 +[lint : flake8] Collecting mccabe<0.8,>=0.6 +[lint : flake8] Downloading mccabe-0.7.0-py2.py3-none-any.whl (7.3 kB) +[lint : flake8] Collecting tomlkit>=0.10.1 +[lint : flake8] Downloading tomlkit-0.12.5-py3-none-any.whl (37 kB) +[lint : flake8] Collecting isort<6,>=4.2.5 +[lint : flake8] Downloading isort-5.13.2-py3-none-any.whl (92 kB) +[lint : flake8] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 92.3/92.3 kB 45.6 MB/s eta 0:00:00 +[lint : flake8] Collecting tomli>=1.1.0 +[lint : flake8] Downloading tomli-2.0.1-py3-none-any.whl (12 kB) +[lint : flake8] Collecting typing-extensions>=3.10.0 +[lint : flake8] Downloading typing_extensions-4.12.1-py3-none-any.whl (37 kB) +[lint : flake8] Collecting platformdirs>=2.2.0 +[lint : flake8] Downloading platformdirs-4.2.2-py3-none-any.whl (18 kB) +[lint : flake8] Collecting dill>=0.2 +[lint : flake8] Downloading dill-0.3.8-py3-none-any.whl (116 kB) +[lint : flake8] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 116.3/116.3 kB 39.3 MB/s eta 0:00:00 +[lint : flake8] Collecting pycodestyle<2.9.0,>=2.8.0 +[lint : flake8] Downloading pycodestyle-2.8.0-py2.py3-none-any.whl (42 kB) +[lint : flake8] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.1/42.1 kB 20.9 MB/s eta 0:00:00 +[lint : flake8] Collecting pyflakes<2.5.0,>=2.4.0 +[lint : flake8] Downloading pyflakes-2.4.0-py2.py3-none-any.whl (69 kB) +[lint : flake8] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 69.7/69.7 kB 39.9 MB/s eta 0:00:00 +[lint : flake8] Collecting mccabe<0.8,>=0.6 +[lint : flake8] Downloading mccabe-0.6.1-py2.py3-none-any.whl (8.6 kB) +[lint : flake8] Collecting mypy-extensions>=0.4.3 +[lint : flake8] Downloading mypy_extensions-1.0.0-py3-none-any.whl (4.7 kB) +[lint : flake8] Collecting pathspec>=0.9.0 +[lint : flake8] Downloading pathspec-0.12.1-py3-none-any.whl (31 kB) +[lint : flake8] Collecting colorama +[lint : flake8] Downloading colorama-0.4.6-py2.py3-none-any.whl (25 kB) +[lint : flake8] Collecting Faker>=0.7.0 +[lint : flake8] Downloading Faker-25.4.0-py3-none-any.whl (1.8 MB) +[lint : flake8] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 28.1 MB/s eta 0:00:00 +[lint : flake8] Collecting defusedxml>=0.6.0 +[lint : flake8] Downloading defusedxml-0.7.1-py2.py3-none-any.whl (25 kB) +[lint : flake8] Collecting requests-toolbelt>=0.9.1 +[lint : flake8] Downloading requests_toolbelt-1.0.0-py2.py3-none-any.whl (54 kB) +[lint : flake8] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 54.5/54.5 kB 26.3 MB/s eta 0:00:00 +[lint : flake8] Collecting rich>=9.10.0 +[lint : flake8] Downloading rich-13.7.1-py3-none-any.whl (240 kB) +[lint : flake8] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 240.7/240.7 kB 70.0 MB/s eta 0:00:00 +[lint : flake8] Collecting charset-normalizer>=2.0.0 +[lint : flake8] Downloading charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (142 kB) +[lint : flake8] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 142.3/142.3 kB 63.8 MB/s eta 0:00:00 +[lint : flake8] Collecting multidict>=4.7.0 +[lint : flake8] Downloading multidict-6.0.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (123 kB) +[lint : flake8] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 123.8/123.8 kB 53.5 MB/s eta 0:00:00 +[lint : flake8] Collecting Pygments>=2.5.2 +[lint : flake8] Downloading pygments-2.18.0-py3-none-any.whl (1.2 MB) +[lint : flake8] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 115.4 MB/s eta 0:00:00 +[lint : flake8] Requirement already satisfied: pip in /usr/local/lib/python3.9/site-packages (from httpie==3.2.1->-r requirements.txt (line 29)) (23.0.1) +[lint : flake8] Collecting requests[socks]>=2.22.0 +[lint : flake8] Downloading requests-2.32.3-py3-none-any.whl (64 kB) +[lint : flake8] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 64.9/64.9 kB 34.9 MB/s eta 0:00:00 +[lint : flake8] Collecting wrapt<2,>=1.11 +[lint : flake8] Downloading wrapt-1.16.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (80 kB) +[lint : flake8] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 80.1/80.1 kB 44.3 MB/s eta 0:00:00 +[lint : flake8] Collecting lazy-object-proxy>=1.4.0 +[lint : flake8] Downloading lazy_object_proxy-1.10.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (67 kB) +[lint : flake8] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 67.1/67.1 kB 31.2 MB/s eta 0:00:00 +[lint : flake8] Collecting python-dateutil>=2.4 +[lint : flake8] Downloading python_dateutil-2.9.0.post0-py2.py3-none-any.whl (229 kB) +[lint : flake8] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 229.9/229.9 kB 73.7 MB/s eta 0:00:00 +[lint : flake8] Collecting zipp>=0.5 +[lint : flake8] Downloading zipp-3.19.1-py3-none-any.whl (9.0 kB) +[lint : flake8] Collecting MarkupSafe>=2.0 +[lint : flake8] Downloading MarkupSafe-2.1.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25 kB) +[lint : flake8] Collecting certifi>=2017.4.17 +[lint : flake8] Downloading certifi-2024.6.2-py3-none-any.whl (164 kB) +[lint : flake8] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 164.4/164.4 kB 68.0 MB/s eta 0:00:00 +[lint : flake8] Collecting idna<4,>=2.5 +[lint : flake8] Downloading idna-3.7-py3-none-any.whl (66 kB) +[lint : flake8] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 66.8/66.8 kB 24.2 MB/s eta 0:00:00 +[lint : flake8] Collecting urllib3<3,>=1.21.1 +[lint : flake8] Downloading urllib3-2.2.1-py3-none-any.whl (121 kB) +[lint : flake8] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 121.1/121.1 kB 53.9 MB/s eta 0:00:00 +[lint : flake8] Collecting PySocks!=1.5.7,>=1.5.6 +[lint : flake8] Downloading PySocks-1.7.1-py3-none-any.whl (16 kB) +[lint : flake8] Collecting markdown-it-py>=2.2.0 +[lint : flake8] Downloading markdown_it_py-3.0.0-py3-none-any.whl (87 kB) +[lint : flake8] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 87.5/87.5 kB 35.6 MB/s eta 0:00:00 +[lint : flake8] Collecting mdurl~=0.1 +[lint : flake8] Downloading mdurl-0.1.2-py3-none-any.whl (10.0 kB) +[lint : flake8] Collecting six>=1.5 +[lint : flake8] Downloading six-1.16.0-py2.py3-none-any.whl (11 kB) +[lint : flake8] Installing collected packages: nose, mccabe, honcho, flask_talisman, zipp, wrapt, Werkzeug, urllib3, typing-extensions, tomlkit, tomli, six, python-dotenv, PySocks, Pygments, pyflakes, pycodestyle, psycopg2-binary, platformdirs, pathspec, mypy-extensions, multidict, mdurl, MarkupSafe, lazy-object-proxy, itsdangerous, isort, idna, gunicorn, greenlet, dill, defusedxml, coverage, colorama, click, charset-normalizer, certifi, SQLAlchemy, requests, python-dateutil, pinocchio, markdown-it-py, Jinja2, importlib-metadata, flake8, black, astroid, rich, requests-toolbelt, pylint, Flask, Faker, httpie, Flask-SQLAlchemy, Flask-Cors, factory-boy +[lint : flake8] Successfully installed Faker-25.4.0 Flask-2.1.2 Flask-Cors-4.0.1 Flask-SQLAlchemy-2.5.1 Jinja2-3.1.4 MarkupSafe-2.1.5 PySocks-1.7.1 Pygments-2.18.0 SQLAlchemy-1.4.46 Werkzeug-2.1.2 astroid-2.11.7 black-22.3.0 certifi-2024.6.2 charset-normalizer-3.3.2 click-8.1.7 colorama-0.4.6 coverage-6.3.2 defusedxml-0.7.1 dill-0.3.8 factory-boy-2.12.0 flake8-4.0.1 flask_talisman-1.1.0 greenlet-3.0.3 gunicorn-20.1.0 honcho-1.1.0 httpie-3.2.1 idna-3.7 importlib-metadata-7.1.0 isort-5.13.2 itsdangerous-2.2.0 lazy-object-proxy-1.10.0 markdown-it-py-3.0.0 mccabe-0.6.1 mdurl-0.1.2 multidict-6.0.5 mypy-extensions-1.0.0 nose-1.3.7 pathspec-0.12.1 pinocchio-0.4.3 platformdirs-4.2.2 psycopg2-binary-2.9.3 pycodestyle-2.8.0 pyflakes-2.4.0 pylint-2.14.0 python-dateutil-2.9.0.post0 python-dotenv-0.20.0 requests-2.32.3 requests-toolbelt-1.0.0 rich-13.7.1 six-1.16.0 tomli-2.0.1 tomlkit-0.12.5 typing-extensions-4.12.1 urllib3-2.2.1 wrapt-1.16.0 zipp-3.19.1 +[lint : flake8] WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv +[lint : flake8] +[lint : flake8] [notice] A new release of pip is available: 23.0.1 -> 24.0 +[lint : flake8] [notice] To update, run: pip install --upgrade pip +[lint : flake8] 0 + +[tests : nosetests] ***** Installing dependencies ***** +[tests : nosetests] Requirement already satisfied: pip in /usr/local/lib/python3.9/site-packages (23.0.1) +[tests : nosetests] Collecting pip +[tests : nosetests] Downloading pip-24.0-py3-none-any.whl (2.1 MB) +[tests : nosetests] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 24.0 MB/s eta 0:00:00 +[tests : nosetests] Requirement already satisfied: wheel in /usr/local/lib/python3.9/site-packages (0.43.0) +[tests : nosetests] Installing collected packages: pip +[tests : nosetests] Attempting uninstall: pip +[tests : nosetests] Found existing installation: pip 23.0.1 +[tests : nosetests] Uninstalling pip-23.0.1: +[tests : nosetests] Successfully uninstalled pip-23.0.1 +[tests : nosetests] Successfully installed pip-24.0 +[tests : nosetests] WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv +[tests : nosetests] WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv +[tests : nosetests] ***** Running nosetests with: -v --with-spec --spec-color +[tests : nosetests] nose.config: INFO: Ignoring files matching ['^\\.', '^_', '^setup\\.py$'] +[tests : nosetests] nose.plugins.cover: INFO: Coverage report will include only packages: ['service'] +[tests : nosetests] +[tests : nosetests] Test Flask CLI Commands +[tests : nosetests] - It should call the db-create command +[tests : nosetests] +[tests : nosetests] Test Cases for Account Model +[tests : nosetests] - It should Create an account and add it to the database +[tests : nosetests] - It should Create an Account and assert that it exists +[tests : nosetests] - It should Delete an account from the database +[tests : nosetests] - It should Deserialize an account +[tests : nosetests] - It should not Deserialize an account with a KeyError +[tests : nosetests] - It should not Deserialize an account with a TypeError +[tests : nosetests] - It should Find an Account by name +[tests : nosetests] - It should List all Accounts in the database +[tests : nosetests] - It should Read an account +[tests : nosetests] - It should Serialize an account +[tests : nosetests] - It should Update an account +[tests : nosetests] +[tests : nosetests] Account Service Tests +[tests : nosetests] - It should not Create an Account when sending the wrong data +[tests : nosetests] - It should return a CORS header +[tests : nosetests] - It should Create a new Account +[tests : nosetests] - It should Delete an Account +[tests : nosetests] - It should Get a list of Accounts +[tests : nosetests] - It should not read an account that is not Found +[tests : nosetests] - It should be healthy +[tests : nosetests] - It should get 200_OK from the Home Page +[tests : nosetests] - It should not allow an illegal method call +[tests : nosetests] - It should read an single account +[tests : nosetests] - It should return security headers +[tests : nosetests] - It should not Create an Account when sending the wrong media type +[tests : nosetests] - It should Update an existing Account +[tests : nosetests] +[tests : nosetests] Name Stmts Miss Cover Missing +[tests : nosetests] ---------------------------------------------------------------- +[tests : nosetests] service/__init__.py 22 3 86% 37-40 +[tests : nosetests] service/common/__init__.py 0 0 100% +[tests : nosetests] service/common/cli_commands.py 7 0 100% +[tests : nosetests] service/common/error_handlers.py 32 3 91% 76-78 +[tests : nosetests] service/common/log_handlers.py 10 1 90% 21 +[tests : nosetests] service/common/status.py 46 0 100% +[tests : nosetests] service/config.py 11 5 55% 12-16 +[tests : nosetests] service/models.py 69 3 96% 32, 98, 127 +[tests : nosetests] service/routes.py 55 1 98% 105 +[tests : nosetests] ---------------------------------------------------------------- +[tests : nosetests] TOTAL 252 16 94% +[tests : nosetests] ---------------------------------------------------------------------- +[tests : nosetests] Ran 25 tests in 2.851s +[tests : nosetests] +[tests : nosetests] OK +[tests : nosetests] + +[build : build-and-push] STEP 1/9: FROM python:3.9-slim +[build : build-and-push] Resolved "python" as an alias (/etc/containers/registries.conf.d/000-shortnames.conf) +[build : build-and-push] Trying to pull docker.io/library/python:3.9-slim... +[build : build-and-push] Getting image source signatures +[build : build-and-push] Copying blob sha256:276709cbedc1f168290ee408fca2af2aacfeb4f922ddca125e9e8047f9841479 +[build : build-and-push] Copying blob sha256:09f376ebb190216b0459f470e71bec7b5dfa611d66bf008492b40dcc5f1d8eae +[build : build-and-push] Copying blob sha256:4e7363ac3b6fb61a9310bbb00e385beaa54c712a9633c01de34cc7d8b0823dba +[build : build-and-push] Copying blob sha256:1f1e6fb6a4a52a77049d55697db79164d7d0e5a78ae115c657699f4471398fc0 +[build : build-and-push] Copying blob sha256:bf8f57a642c477da4e61c92dc0c0fd036a8d7e3d3951df39b88c3dd73bf3d5af +[build : build-and-push] Copying config sha256:4602238ffbdcf66f436adfb46e31c9521ab4a9960b51b1a051004fa5a70f3f42 +[build : build-and-push] Writing manifest to image destination +[build : build-and-push] Storing signatures +[build : build-and-push] STEP 2/9: WORKDIR /app +[build : build-and-push] STEP 3/9: COPY requirements.txt . +[build : build-and-push] STEP 4/9: RUN pip install --no-cache-dir -r requirements.txt +[build : build-and-push] Collecting Werkzeug==2.1.2 +[build : build-and-push] Downloading Werkzeug-2.1.2-py3-none-any.whl (224 kB) +[build : build-and-push] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 224.9/224.9 kB 65.3 MB/s eta 0:00:00 +[build : build-and-push] Collecting SQLAlchemy==1.4.46 +[build : build-and-push] Downloading SQLAlchemy-1.4.46-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.6 MB) +[build : build-and-push] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.6/1.6 MB 188.8 MB/s eta 0:00:00 +[build : build-and-push] Collecting Flask==2.1.2 +[build : build-and-push] Downloading Flask-2.1.2-py3-none-any.whl (95 kB) +[build : build-and-push] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 95.2/95.2 kB 170.6 MB/s eta 0:00:00 +[build : build-and-push] Collecting Flask-SQLAlchemy==2.5.1 +[build : build-and-push] Downloading Flask_SQLAlchemy-2.5.1-py2.py3-none-any.whl (17 kB) +[build : build-and-push] Collecting psycopg2-binary==2.9.3 +[build : build-and-push] Downloading psycopg2_binary-2.9.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.0 MB) +[build : build-and-push] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.0/3.0 MB 3.2 MB/s eta 0:00:00 +[build : build-and-push] Collecting python-dotenv==0.20.0 +[build : build-and-push] Downloading python_dotenv-0.20.0-py3-none-any.whl (17 kB) +[build : build-and-push] Collecting gunicorn==20.1.0 +[build : build-and-push] Downloading gunicorn-20.1.0-py3-none-any.whl (79 kB) +[build : build-and-push] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 79.5/79.5 kB 218.7 MB/s eta 0:00:00 +[build : build-and-push] Collecting honcho==1.1.0 +[build : build-and-push] Downloading honcho-1.1.0-py2.py3-none-any.whl (21 kB) +[build : build-and-push] Collecting pylint==2.14.0 +[build : build-and-push] Downloading pylint-2.14.0-py3-none-any.whl (485 kB) +[build : build-and-push] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 485.0/485.0 kB 158.8 MB/s eta 0:00:00 +[build : build-and-push] Collecting flake8==4.0.1 +[build : build-and-push] Downloading flake8-4.0.1-py2.py3-none-any.whl (64 kB) +[build : build-and-push] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 64.1/64.1 kB 167.0 MB/s eta 0:00:00 +[build : build-and-push] Collecting black==22.3.0 +[build : build-and-push] Downloading black-22.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB) +[build : build-and-push] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.5/1.5 MB 197.8 MB/s eta 0:00:00 +[build : build-and-push] Collecting nose==1.3.7 +[build : build-and-push] Downloading nose-1.3.7-py3-none-any.whl (154 kB) +[build : build-and-push] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 154.7/154.7 kB 138.2 MB/s eta 0:00:00 +[build : build-and-push] Collecting pinocchio==0.4.3 +[build : build-and-push] Downloading pinocchio-0.4.3-py3-none-any.whl (12 kB) +[build : build-and-push] Collecting factory-boy==2.12.0 +[build : build-and-push] Downloading factory_boy-2.12.0-py2.py3-none-any.whl (36 kB) +[build : build-and-push] Collecting coverage==6.3.2 +[build : build-and-push] Downloading coverage-6.3.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (210 kB) +[build : build-and-push] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 210.7/210.7 kB 201.1 MB/s eta 0:00:00 +[build : build-and-push] Collecting httpie==3.2.1 +[build : build-and-push] Downloading httpie-3.2.1-py3-none-any.whl (124 kB) +[build : build-and-push] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 125.0/125.0 kB 211.3 MB/s eta 0:00:00 +[build : build-and-push] Collecting flask_talisman +[build : build-and-push] Downloading flask_talisman-1.1.0-py2.py3-none-any.whl (18 kB) +[build : build-and-push] Collecting Flask-Cors +[build : build-and-push] Downloading Flask_Cors-4.0.1-py2.py3-none-any.whl (14 kB) +[build : build-and-push] Collecting greenlet!=0.4.17 +[build : build-and-push] Downloading greenlet-3.0.3-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (614 kB) +[build : build-and-push] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 614.3/614.3 kB 218.9 MB/s eta 0:00:00 +[build : build-and-push] Collecting click>=8.0 +[build : build-and-push] Downloading click-8.1.7-py3-none-any.whl (97 kB) +[build : build-and-push] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 97.9/97.9 kB 177.8 MB/s eta 0:00:00 +[build : build-and-push] Collecting Jinja2>=3.0 +[build : build-and-push] Downloading jinja2-3.1.4-py3-none-any.whl (133 kB) +[build : build-and-push] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.3/133.3 kB 230.4 MB/s eta 0:00:00 +[build : build-and-push] Collecting importlib-metadata>=3.6.0 +[build : build-and-push] Downloading importlib_metadata-7.1.0-py3-none-any.whl (24 kB) +[build : build-and-push] Collecting itsdangerous>=2.0 +[build : build-and-push] Downloading itsdangerous-2.2.0-py3-none-any.whl (16 kB) +[build : build-and-push] Requirement already satisfied: setuptools>=3.0 in /usr/local/lib/python3.9/site-packages (from gunicorn==20.1.0->-r requirements.txt (line 12)) (58.1.0) +[build : build-and-push] Collecting tomlkit>=0.10.1 +[build : build-and-push] Downloading tomlkit-0.12.5-py3-none-any.whl (37 kB) +[build : build-and-push] Collecting tomli>=1.1.0 +[build : build-and-push] Downloading tomli-2.0.1-py3-none-any.whl (12 kB) +[build : build-and-push] Collecting dill>=0.2 +[build : build-and-push] Downloading dill-0.3.8-py3-none-any.whl (116 kB) +[build : build-and-push] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 116.3/116.3 kB 225.7 MB/s eta 0:00:00 +[build : build-and-push] Collecting mccabe<0.8,>=0.6 +[build : build-and-push] Downloading mccabe-0.7.0-py2.py3-none-any.whl (7.3 kB) +[build : build-and-push] Collecting astroid<=2.12.0-dev0,>=2.11.5 +[build : build-and-push] Downloading astroid-2.11.7-py3-none-any.whl (251 kB) +[build : build-and-push] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 251.2/251.2 kB 241.7 MB/s eta 0:00:00 +[build : build-and-push] Collecting typing-extensions>=3.10.0 +[build : build-and-push] Downloading typing_extensions-4.12.1-py3-none-any.whl (37 kB) +[build : build-and-push] Collecting platformdirs>=2.2.0 +[build : build-and-push] Downloading platformdirs-4.2.2-py3-none-any.whl (18 kB) +[build : build-and-push] Collecting isort<6,>=4.2.5 +[build : build-and-push] Downloading isort-5.13.2-py3-none-any.whl (92 kB) +[build : build-and-push] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 92.3/92.3 kB 208.9 MB/s eta 0:00:00 +[build : build-and-push] Collecting mccabe<0.8,>=0.6 +[build : build-and-push] Downloading mccabe-0.6.1-py2.py3-none-any.whl (8.6 kB) +[build : build-and-push] Collecting pycodestyle<2.9.0,>=2.8.0 +[build : build-and-push] Downloading pycodestyle-2.8.0-py2.py3-none-any.whl (42 kB) +[build : build-and-push] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.1/42.1 kB 113.3 MB/s eta 0:00:00 +[build : build-and-push] Collecting pyflakes<2.5.0,>=2.4.0 +[build : build-and-push] Downloading pyflakes-2.4.0-py2.py3-none-any.whl (69 kB) +[build : build-and-push] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 69.7/69.7 kB 169.1 MB/s eta 0:00:00 +[build : build-and-push] Collecting mypy-extensions>=0.4.3 +[build : build-and-push] Downloading mypy_extensions-1.0.0-py3-none-any.whl (4.7 kB) +[build : build-and-push] Collecting pathspec>=0.9.0 +[build : build-and-push] Downloading pathspec-0.12.1-py3-none-any.whl (31 kB) +[build : build-and-push] Collecting colorama +[build : build-and-push] Downloading colorama-0.4.6-py2.py3-none-any.whl (25 kB) +[build : build-and-push] Collecting Faker>=0.7.0 +[build : build-and-push] Downloading Faker-25.4.0-py3-none-any.whl (1.8 MB) +[build : build-and-push] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 1.9 MB/s eta 0:00:00 +[build : build-and-push] Collecting defusedxml>=0.6.0 +[build : build-and-push] Downloading defusedxml-0.7.1-py2.py3-none-any.whl (25 kB) +[build : build-and-push] Collecting rich>=9.10.0 +[build : build-and-push] Downloading rich-13.7.1-py3-none-any.whl (240 kB) +[build : build-and-push] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 240.7/240.7 kB 199.3 MB/s eta 0:00:00 +[build : build-and-push] Collecting requests[socks]>=2.22.0 +[build : build-and-push] Downloading requests-2.32.3-py3-none-any.whl (64 kB) +[build : build-and-push] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 64.9/64.9 kB 120.2 MB/s eta 0:00:00 +[build : build-and-push] Collecting requests-toolbelt>=0.9.1 +[build : build-and-push] Downloading requests_toolbelt-1.0.0-py2.py3-none-any.whl (54 kB) +[build : build-and-push] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 54.5/54.5 kB 88.8 MB/s eta 0:00:00 +[build : build-and-push] Collecting Pygments>=2.5.2 +[build : build-and-push] Downloading pygments-2.18.0-py3-none-any.whl (1.2 MB) +[build : build-and-push] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 202.2 MB/s eta 0:00:00 +[build : build-and-push] Requirement already satisfied: pip in /usr/local/lib/python3.9/site-packages (from httpie==3.2.1->-r requirements.txt (line 29)) (23.0.1) +[build : build-and-push] Collecting charset-normalizer>=2.0.0 +[build : build-and-push] Downloading charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (142 kB) +[build : build-and-push] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 142.3/142.3 kB 143.3 MB/s eta 0:00:00 +[build : build-and-push] Collecting multidict>=4.7.0 +[build : build-and-push] Downloading multidict-6.0.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (123 kB) +[build : build-and-push] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 123.8/123.8 kB 148.2 MB/s eta 0:00:00 +[build : build-and-push] Collecting wrapt<2,>=1.11 +[build : build-and-push] Downloading wrapt-1.16.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (80 kB) +[build : build-and-push] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 80.1/80.1 kB 164.5 MB/s eta 0:00:00 +[build : build-and-push] Collecting lazy-object-proxy>=1.4.0 +[build : build-and-push] Downloading lazy_object_proxy-1.10.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (67 kB) +[build : build-and-push] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 67.1/67.1 kB 69.3 MB/s eta 0:00:00 +[build : build-and-push] Collecting python-dateutil>=2.4 +[build : build-and-push] Downloading python_dateutil-2.9.0.post0-py2.py3-none-any.whl (229 kB) +[build : build-and-push] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 229.9/229.9 kB 169.8 MB/s eta 0:00:00 +[build : build-and-push] Collecting zipp>=0.5 +[build : build-and-push] Downloading zipp-3.19.1-py3-none-any.whl (9.0 kB) +[build : build-and-push] Collecting MarkupSafe>=2.0 +[build : build-and-push] Downloading MarkupSafe-2.1.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25 kB) +[build : build-and-push] Collecting idna<4,>=2.5 +[build : build-and-push] Downloading idna-3.7-py3-none-any.whl (66 kB) +[build : build-and-push] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 66.8/66.8 kB 124.1 MB/s eta 0:00:00 +[build : build-and-push] Collecting urllib3<3,>=1.21.1 +[build : build-and-push] Downloading urllib3-2.2.1-py3-none-any.whl (121 kB) +[build : build-and-push] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 121.1/121.1 kB 191.2 MB/s eta 0:00:00 +[build : build-and-push] Collecting certifi>=2017.4.17 +[build : build-and-push] Downloading certifi-2024.6.2-py3-none-any.whl (164 kB) +[build : build-and-push] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 164.4/164.4 kB 186.6 MB/s eta 0:00:00 +[build : build-and-push] Collecting PySocks!=1.5.7,>=1.5.6 +[build : build-and-push] Downloading PySocks-1.7.1-py3-none-any.whl (16 kB) +[build : build-and-push] Collecting markdown-it-py>=2.2.0 +[build : build-and-push] Downloading markdown_it_py-3.0.0-py3-none-any.whl (87 kB) +[build : build-and-push] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 87.5/87.5 kB 127.6 MB/s eta 0:00:00 +[build : build-and-push] Collecting mdurl~=0.1 +[build : build-and-push] Downloading mdurl-0.1.2-py3-none-any.whl (10.0 kB) +[build : build-and-push] Collecting six>=1.5 +[build : build-and-push] Downloading six-1.16.0-py2.py3-none-any.whl (11 kB) +[build : build-and-push] Installing collected packages: nose, mccabe, honcho, flask_talisman, zipp, wrapt, Werkzeug, urllib3, typing-extensions, tomlkit, tomli, six, python-dotenv, PySocks, Pygments, pyflakes, pycodestyle, psycopg2-binary, platformdirs, pathspec, mypy-extensions, multidict, mdurl, MarkupSafe, lazy-object-proxy, itsdangerous, isort, idna, gunicorn, greenlet, dill, defusedxml, coverage, colorama, click, charset-normalizer, certifi, SQLAlchemy, requests, python-dateutil, pinocchio, markdown-it-py, Jinja2, importlib-metadata, flake8, black, astroid, rich, requests-toolbelt, pylint, Flask, Faker, httpie, Flask-SQLAlchemy, Flask-Cors, factory-boy +[build : build-and-push] Successfully installed Faker-25.4.0 Flask-2.1.2 Flask-Cors-4.0.1 Flask-SQLAlchemy-2.5.1 Jinja2-3.1.4 MarkupSafe-2.1.5 PySocks-1.7.1 Pygments-2.18.0 SQLAlchemy-1.4.46 Werkzeug-2.1.2 astroid-2.11.7 black-22.3.0 certifi-2024.6.2 charset-normalizer-3.3.2 click-8.1.7 colorama-0.4.6 coverage-6.3.2 defusedxml-0.7.1 dill-0.3.8 factory-boy-2.12.0 flake8-4.0.1 flask_talisman-1.1.0 greenlet-3.0.3 gunicorn-20.1.0 honcho-1.1.0 httpie-3.2.1 idna-3.7 importlib-metadata-7.1.0 isort-5.13.2 itsdangerous-2.2.0 lazy-object-proxy-1.10.0 markdown-it-py-3.0.0 mccabe-0.6.1 mdurl-0.1.2 multidict-6.0.5 mypy-extensions-1.0.0 nose-1.3.7 pathspec-0.12.1 pinocchio-0.4.3 platformdirs-4.2.2 psycopg2-binary-2.9.3 pycodestyle-2.8.0 pyflakes-2.4.0 pylint-2.14.0 python-dateutil-2.9.0.post0 python-dotenv-0.20.0 requests-2.32.3 requests-toolbelt-1.0.0 rich-13.7.1 six-1.16.0 tomli-2.0.1 tomlkit-0.12.5 typing-extensions-4.12.1 urllib3-2.2.1 wrapt-1.16.0 zipp-3.19.1 +[build : build-and-push] WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv +[build : build-and-push] +[build : build-and-push] [notice] A new release of pip is available: 23.0.1 -> 24.0 +[build : build-and-push] [notice] To update, run: pip install --upgrade pip +[build : build-and-push] STEP 5/9: COPY service/ ./service/ +[build : build-and-push] STEP 6/9: RUN useradd --uid 1000 theia && chown -R theia /app +[build : build-and-push] STEP 7/9: USER theia +[build : build-and-push] STEP 8/9: EXPOSE 8080 +[build : build-and-push] STEP 9/9: CMD ["gunicorn", "--bind=0.0.0.0:8080", "--log-level=info", "service:app"] +[build : build-and-push] COMMIT image-registry.openshift-image-registry.svc:5000/sn-labs-rajanjha9235/accounts:1 +[build : build-and-push] --> ffe544eb780 +[build : build-and-push] Successfully tagged image-registry.openshift-image-registry.svc:5000/sn-labs-rajanjha9235/accounts:1 +[build : build-and-push] ffe544eb780ec19a5221a51f40e566e664c6c39d4c94bdb994a5a42960623597 +[build : build-and-push] Getting image source signatures +[build : build-and-push] Copying blob sha256:6c673dee57689252f1e6f378a50a6158005431ab4da53fe5ab282a19bc6ad698 +[build : build-and-push] Copying blob sha256:146826fa3ca090520765c1cee50f779ead1662bfd94d413cff5b9ba519b23a7a +[build : build-and-push] Copying blob sha256:5d4427064ecc46e3c2add169e9b5eafc7ed2be7861081ec925938ab628ac0e25 +[build : build-and-push] Copying blob sha256:e555c0055a9beba9b51eb671101480971f56f5f85247ba5bdd3b6a67dd975b93 +[build : build-and-push] Copying blob sha256:ae96698df02cfd72bda046ffe6f5490860baea6bf5e441c70c734ad6a326ebec +[build : build-and-push] Copying blob sha256:205262265e502b075b8391591301c07cb9c2b29bb1a3f695c7cf6802d81e25bd +[build : build-and-push] Copying config sha256:ffe544eb780ec19a5221a51f40e566e664c6c39d4c94bdb994a5a42960623597 +[build : build-and-push] Writing manifest to image destination +[build : build-and-push] Storing signatures +[build : build-and-push] sha256:b105d84085816de082f1773aacefe8f957edfd2eb74141466a5b3444e2593e5eimage-registry.openshift-image-registry.svc:5000/sn-labs-rajanjha9235/accounts:1 + +[deploy : oc] Updating manifest... +[deploy : oc] apiVersion: apps/v1 +[deploy : oc] kind: Deployment +[deploy : oc] metadata: +[deploy : oc] creationTimestamp: null +[deploy : oc] labels: +[deploy : oc] app: accounts +[deploy : oc] name: accounts +[deploy : oc] spec: +[deploy : oc] replicas: 3 +[deploy : oc] selector: +[deploy : oc] matchLabels: +[deploy : oc] app: accounts +[deploy : oc] strategy: {} +[deploy : oc] template: +[deploy : oc] metadata: +[deploy : oc] creationTimestamp: null +[deploy : oc] labels: +[deploy : oc] app: accounts +[deploy : oc] spec: +[deploy : oc] containers: +[deploy : oc] - image: us.icr.io/sn-labs-rajanjha9235/accounts:1 +[deploy : oc] name: accounts +[deploy : oc] resources: {} +[deploy : oc] +[deploy : oc] env: +[deploy : oc] - name: DATABASE_HOST +[deploy : oc] value: postgresql +[deploy : oc] - name: DATABASE_NAME +[deploy : oc] valueFrom: +[deploy : oc] secretKeyRef: +[deploy : oc] name: postgresql +[deploy : oc] key: database-name +[deploy : oc] - name: DATABASE_PASSWORD +[deploy : oc] valueFrom: +[deploy : oc] secretKeyRef: +[deploy : oc] name: postgresql +[deploy : oc] key: database-password +[deploy : oc] - name: DATABASE_USER +[deploy : oc] valueFrom: +[deploy : oc] secretKeyRef: +[deploy : oc] name: postgresql +[deploy : oc] key: database-user +[deploy : oc] Deploying to OpenShift... +[deploy : oc] Warning: resource deployments/accounts is missing the kubectl.kubernetes.io/last-applied-configuration annotation which is required by oc apply. oc apply should only be used on resources created declaratively by either oc create --save-config or oc apply. The missing annotation will be patched automatically. +[deploy : oc] deployment.apps/accounts configured +[deploy : oc] Warning: resource services/accounts is missing the kubectl.kubernetes.io/last-applied-configuration annotation which is required by oc apply. oc apply should only be used on resources created declaratively by either oc create --save-config or oc apply. The missing annotation will be patched automatically. +[deploy : oc] service/accounts configured +[deploy : oc] NAME READY STATUS RESTARTS AGE +[deploy : oc] accounts-686b87bbd9-cm48t 1/1 Running 0 3h21m +[deploy : oc] accounts-686b87bbd9-r4j4r 1/1 Running 0 6h4m +[deploy : oc] accounts-686b87bbd9-tfsth 1/1 Running 0 6h4m + diff --git a/tekton/pipeline.yaml b/tekton/pipeline.yaml index 8d9209d..a9de80b 100644 --- a/tekton/pipeline.yaml +++ b/tekton/pipeline.yaml @@ -79,3 +79,22 @@ spec: runAfter: - tests - lint + + - name: deploy + workspaces: + - name: manifest-dir + workspace: pipeline-workspace + taskRef: + name: openshift-client + kind: ClusterTask + params: + - name: SCRIPT + value: | + echo "Updating manifest..." + sed -i "s|IMAGE_NAME_HERE|$(params.build-image)|g" deploy/deployment.yaml + cat deploy/deployment.yaml + echo "Deploying to OpenShift..." + oc apply -f deploy/ + oc get pods -l app=accounts + runAfter: + - build