diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 7d4546d..34fcf6f 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -6,16 +6,9 @@ on: tags: - "*" -permissions: - contents: read - id-token: write - jobs: publish: runs-on: ubuntu-latest - environment: - name: release - url: https://pypi.org/p/mse-cli steps: - uses: actions/checkout@v3 @@ -44,3 +37,5 @@ jobs: uses: pypa/gh-action-pypi-publish@release/v1 with: print_hash: true + user: ${{ secrets.PYPI_USERNAME }} + password: ${{ secrets.PYPI_PASSWORD }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6b48ab2..078d32f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -62,46 +62,46 @@ jobs: run: | python -m pytest -m "not cloud and not home" -# tests-cloud: -# runs-on: [self-hosted, not-sgx] -# needs: check -# steps: -# # Solve perm denied issue on GA -# # see: https://github.com/actions/checkout/issues/211 -# - name: Chown user -# run: | -# echo $USER -# echo $GITHUB_WORKSPACE -# sudo chown -R $USER:$USER $GITHUB_WORKSPACE -# -# - uses: actions/checkout@v3 -# -# - name: Set up Python 3.8 -# uses: actions/setup-python@v4 -# with: -# python-version: 3.8 -# -# - name: Install dependencies -# run: | -# python -m pip install --upgrade pip -# python -m pip install '.[dev,deploy]' -# -# - name: Run integration tests -# env: -# MSE_BASE_URL: "https://ci.backend.dev.mse.cosmian.com" -# MSE_AUTH0_CLIENT_ID: "bx2WlLrS7qr35iyNqUVTs9jMo834o8mC" -# MSE_AUTH0_DOMAIN_NAME: "https://console-dev.eu.auth0.com" -# MSE_AUTH0_AUDIENCE: "https://console-dev.eu.auth0.com/api/v2/" -# REFRESH_TOKEN: ${{ secrets.DEV_ALICE_REFRESH_TOKEN }} -# MSE_TEST_DOMAIN_NAME: ${{ vars.DEV_MSE_TEST_DOMAIN_NAME }} -# MSE_TEST_PRIVATE_KEY: ${{ secrets.DEV_MSE_TEST_PRIVATE_KEY }} -# MSE_TEST_PUBLIC_KEY: ${{ vars.DEV_MSE_TEST_PUBLIC_KEY }} -# MSE_CONF_PATH: ${{ github.workspace }} -# run: | -# echo 'email = "alice@cosmian.com"' > ${MSE_CONF_PATH}/login.toml -# echo "refresh_token = \"${REFRESH_TOKEN}\"" >> ${MSE_CONF_PATH}/login.toml -# echo "Running tests using ${MSE_BASE_URL}" -# python -m pytest -m cloud + tests-cloud: + runs-on: [self-hosted, not-sgx] + needs: check + steps: + # Solve perm denied issue on GA + # see: https://github.com/actions/checkout/issues/211 + - name: Chown user + run: | + echo $USER + echo $GITHUB_WORKSPACE + sudo chown -R $USER:$USER $GITHUB_WORKSPACE + + - uses: actions/checkout@v3 + + - name: Set up Python 3.8 + uses: actions/setup-python@v4 + with: + python-version: 3.8 + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install '.[dev,deploy]' + + - name: Run integration tests + env: + MSE_BASE_URL: "https://ci.backend.dev.mse.cosmian.com" + MSE_AUTH0_CLIENT_ID: "bx2WlLrS7qr35iyNqUVTs9jMo834o8mC" + MSE_AUTH0_DOMAIN_NAME: "https://console-dev.eu.auth0.com" + MSE_AUTH0_AUDIENCE: "https://console-dev.eu.auth0.com/api/v2/" + REFRESH_TOKEN: ${{ secrets.DEV_ALICE_REFRESH_TOKEN }} + MSE_TEST_DOMAIN_NAME: ${{ vars.DEV_MSE_TEST_DOMAIN_NAME }} + MSE_TEST_PRIVATE_KEY: ${{ secrets.DEV_MSE_TEST_PRIVATE_KEY }} + MSE_TEST_PUBLIC_KEY: ${{ vars.DEV_MSE_TEST_PUBLIC_KEY }} + MSE_CONF_PATH: ${{ github.workspace }} + run: | + echo 'email = "alice@cosmian.com"' > ${MSE_CONF_PATH}/login.toml + echo "refresh_token = \"${REFRESH_TOKEN}\"" >> ${MSE_CONF_PATH}/login.toml + echo "Running tests using ${MSE_BASE_URL}" + python -m pytest -m cloud tests-home: runs-on: [self-hosted, sgx] diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 45a3dcd..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1 +0,0 @@ -recursive-include src/mse_cli/template * \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 25e7da1..52b26de 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,11 +19,11 @@ classifiers = [ "Programming Language :: Python :: Implementation :: CPython" ] dependencies = [ - "cryptography>=42.0.5,<43.0.0", - "docker>=7.1.0,<8.0.0", - "intel-sgx-ra==2.2.1", + "cryptography>=41.0.1,<42.0.0", + "docker>=6.0.1,<7.0.0", + "intel-sgx-ra>=2.0.1,<3.0", "jinja2>=3.0,<3.1", - "mse-lib-crypto>=1.4,<1.5", + "mse-lib-crypto>=1.3,<1.4", "pydantic>=1.10.2,<2.0.0", "pyjwt>=2.6.0,<2.7.0", "requests>=2.31.0,<3.0.0", diff --git a/src/mse_cli/__init__.py b/src/mse_cli/__init__.py index ec86371..daa501e 100644 --- a/src/mse_cli/__init__.py +++ b/src/mse_cli/__init__.py @@ -4,7 +4,7 @@ import sys from pathlib import Path -__version__ = "1.2.1" +__version__ = "1.2" # This directory contains the login information of the user # and the context of all its deployments diff --git a/src/mse_cli/home/command/sgx_operator/spawn.py b/src/mse_cli/home/command/sgx_operator/spawn.py index 2b42573..dac5b4b 100644 --- a/src/mse_cli/home/command/sgx_operator/spawn.py +++ b/src/mse_cli/home/command/sgx_operator/spawn.py @@ -149,7 +149,7 @@ def run(args) -> None: docker_config = SgxDockerConfig( size=args.size, - host=args.host, + host=args.san, port=args.port, subject=args.subject, subject_alternative_name=args.san, diff --git a/tests/test_conf.py b/tests/test_conf.py index dd20ca8..73954b1 100644 --- a/tests/test_conf.py +++ b/tests/test_conf.py @@ -102,7 +102,6 @@ -----END CERTIFICATE-----""" -@pytest.mark.skip(reason="temporary disabled due to certificate expiration") def test_cloud_with_optionals(): """Test `ssl` and `cloud` paragraph.""" toml = Path("tests/data/all_set.toml") @@ -163,7 +162,6 @@ def test_cloud_without_optionals(): assert conf == ref_app_conf -@pytest.mark.skip(reason="temporary disabled due to certificate expiration") def test_cloud_ssl_without_optionals(): """Test `cloud` paragraph without setting the optional params but ssl.""" toml = Path("tests/data/cloud_ssl_without_optionals.toml") @@ -211,7 +209,6 @@ def test_no_cloud(): assert conf == ref_app_conf -@pytest.mark.skip(reason="temporary disabled due to certificate expiration") def test_options(): """Test option param when loading.""" toml = Path("tests/data/all_set.toml") @@ -261,7 +258,6 @@ def test_python_variable(): conf.python_module -@pytest.mark.skip(reason="temporary disabled due to certificate expiration") def test_save(workspace): """Test `save` method.""" output = workspace / "mse.toml" @@ -298,7 +294,6 @@ def test_save(workspace): assert filecmp.cmp(toml, output) -@pytest.mark.skip(reason="temporary disabled due to certificate expiration") def test_into_payload(): """Test `into_cloud_payload` function.""" toml = Path("tests/data/all_set.toml")