简体   繁体   中英

Runway X Serverless Framework: Using runway for CICD to deploy with environment variables from serverless dashboard

I am using the SERVERLESS_ACCESS_KEY to login while using the CICD to access the environment variables, but I can't seem to be able to place the key in the correct place:

deployments:
  - modules:
      - path: api.sls
        environments:
          dev: true
        parameters:
          namespace: sls-${env DEPLOY_ENVIRONMENT}
        options:
          extend_serverless_yml:
            custom:
              env:
                SERVERLESS_ACCESS_KEY: "AKmjWhDmsYcwmjNvek6mfsI046LoA1nlMhyaKpRvKFHLk"
    regions:
      - us-east-1

Question is: is this the correct place for the access key or should it be added in the serverless.yml file?

What you will need to do is figure out if Runway has a way for you to add an environment variable for the build container. The Serverless Framework looks for an environment variable called SERVERLESS_ACCESS_KEY to authenticate you to your Serverless account. From a quick Google it looks like this can be done using env_vars as a parameter in your config

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM