inline

An `inline` asset is one that is specified directly in your Ship application's spec.

Assets | Config | Lifecycle

inline

An inline asset is one that is specified directly in your Ship application’s spec.

Required Parameters

  • contents - The contents of the file

  • dest - A path to which the file should be written when generating assets

Optional Parameters

  • mode - Specifies file mode of the created asset, defaults to 0644

  • when - This asset will be included when ‘when’ is omitted or true

Examples

assets:
  v1:
    - inline:
        dest: install.sh
        mode: 755
        contents: >-
          #!/bin/sh

          kubectl apply -f ./deploy.yml -n {{repl ConfigOption "k8s_namespace"
          }}
assets:
  v1:
    - inline:
        dest: deploy.yml
        contents: |+

          apiVersion: extensions/v1beta1
          kind: Deployment
          metadata:
            name: api
          spec:
            replicas: 1
            template:
              metadata:
                labels:
                  app: retraced
                  tier: api
              spec:
                volumes:
                  - name: var-run
                    hostPath:
                      path: /var/run/retraced/
                imagePullSecrets:
                  - name: quayio
                containers:
                  - name: api
                    image: quay.io/retracedhq/api:{{ tag }}
                    ports:
                      - containerPort: 3000