Code Monkey home page Code Monkey logo

Comments (9)

hubez avatar hubez commented on May 17, 2024 4

Some formal docs on module.json would be nice. Might expose the various consistency issues too. I too was stumped by this and was just about to go down the path of ditching the use of module.json and iotedgedev.

from iotedge.

shizn avatar shizn commented on May 17, 2024 2

@adashen to share the schema of module.json

from iotedge.

dsajanice avatar dsajanice commented on May 17, 2024

@shizn Could you please take a look. Thanks!

from iotedge.

adashen avatar adashen commented on May 17, 2024

@damienpontifex , If you are using vscode-iot-edge-extension currently, you can use variables in module.json. And the values are expanded in the final deployment.json (deployment manifest). (Run command "Generate IoT Edge Deployment Manifest" or "Build Solution")

And I found you are mention CI system. We have VSTS plugin for the CI of IoT edge Project. We will double check this feature is enabled in the plugin and keep you updated.

from iotedge.

damienpontifex avatar damienpontifex commented on May 17, 2024

@adashen yes I can get that behaviour with deployment.json, but it'd be good to have the same with module.json for values specific to that module and it's docker image

And yes, I'm using the VSTS IoT Edge task off the marketplace and seeing the same behaviour working correctly in deployment.json but not module.json

Is this process just a string pattern replacement step? I could reproduce that in VSTS with other tasks to substitute build variables if that's the case.

from iotedge.

adashen avatar adashen commented on May 17, 2024

@damienpontifex currently, the env in module.json will be expanded when generating the final deployment.json.

Does your request is

  1. Expand env in module.json and out the result to another module.json file?

So can you provide more detail about your requirement in the scenario where you want the expanded module.json be used?

from iotedge.

michaeljqzq avatar michaeljqzq commented on May 17, 2024

@damienpontifex, For VSTS Edge extension, actually there's a test case here to track the variable expand in both deployment.template.json and module.json.

Here's my module.json

{
    "$schema-version": "0.0.1",
    "description": "",
    "image": {
        "repository": "michaeljqzq/multi-1${zhiqing}",
        "tag": {
            "version": "0.0.1${zhiqing}",
            "platforms": {
                "amd64": "./Dockerfile",
                "amd64.debug": "./Dockerfile.amd64.debug",
                "arm32v7": "./Dockerfile.arm32v7",
                "windows-amd64": "./Dockerfile"
            }
        }
    },
    "language": "csharp"
}

Here's variable setting in VSTS
image

Here's the final docker image to push:

docker push ***/multi-1master:0.0.1master-amd64

By the way, are you using the latest version of VSTS extension? If not, you can upgrade to latest extension to verify the env expand function.

from iotedge.

damienpontifex avatar damienpontifex commented on May 17, 2024

Thanks everyone for the support and rapid replies. Using the format ${VARIABLE} worked in both files.

from iotedge.

spygi avatar spygi commented on May 17, 2024

For those getting here late to the party: the closest I found to official docs about the module.json is in the VS code IoT Edge extension repo

from iotedge.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.