1. 03 Jan, 2019 3 commits
    • Thong Kuah's avatar
      Simplify bash function · 23b6a2ae
      Thong Kuah authored
      Use --from-env-file with bash process substitution
      
      We still need bash as process substition (`<()`) is not available in sh
      23b6a2ae
    • Thong Kuah's avatar
      Solve multi word CI variables not quoted properly · dddbc353
      Thong Kuah authored
      ie. fix below quoting issue:
      
      ```
      kubectl create secret -n project-with-autodevops-900057eb1ce34399-77 \
        generic production-secret \
        '--from-literal=OPTIONAL_MESSAGE=You' can see this secret \
        -o yaml --dry-run
      ```
      
      With fix, it should be generating:
      
      ```
      kubectl create secret -n project-with-autodevops-900057eb1ce34399-77 \
        generic production-secret \
        --from-literal 'OPTIONAL_MESSAGE=You can see this secret' \
        -o yaml --dry-run
      ```
      
      Call via bash -c, instead of assuming bash
      
      The shell is /bin/sh, so we cannot asssume bash. Hence we use `bash -c`
      
      bash is installed for deploy jobs in a prior step
      dddbc353
    • Thong Kuah's avatar
      Create K8S_SECRET_* CI variables as a K8s Secret · 4b92b550
      Thong Kuah authored
      Find any CI variables from `env` which has a prefix. If there are any
      such CI variables, strip prefix from variable name then create a generic
      Kubernetes secret containing all these CI variables as key-value pairs.
      
      Also, Pass in secretname to application container
      
      The secretname may be present, if nil, the chart does nothing. If
      present, the chart will load the key-value pairs from the secret into
      the application container. See
      https://gitlab.com/charts/auto-deploy-app/blob/master/README.md#configuration
      4b92b550
  2. 02 Jan, 2019 26 commits
  3. 01 Jan, 2019 11 commits