Codefresh plugin for creation of self signed SSL certificates
Set required and optional environment variable and add the following step to your Codefresh pipeline:
version: '1.0'
steps:
...
GenerateSSLCertificate:
title: Generates SSL Self-signed certificate
image: paulczar/omgwtfssl
working_directory: ${{CF_VOLUME_PATH}}
commands:
- echo "SSL_SUBJECT = " $SSL_SUBJECT
- mkdir -p ${{CF_VOLUME_PATH}}/certs
- cd ${{CF_VOLUME_PATH}}/certs
- /usr/local/bin/generate-certs
environment:
- SSL_SUBJECT=${{SSL_SUBJECT}}
...
- required
SSL_SUBJECT
SSL Subject CA_KEY
CA Key file, defaultca-key.pem
[1]CA_CERT
CA Certificate file, defaultca.pem
[1]CA_SUBJECT
CA Subject, defaulttest-ca
CA_EXPIRE
CA Expiry, default60
daysSSL_CONFIG
SSL Config, defaultopenssl.cnf
[1]SSL_KEY
SSL Key file, defaultkey.pem
SSL_CSR
SSL Cert Request file, defaultkey.csr
SSL_CERT
SSL Cert file, defaultcert.pem
SSL_SIZE
SSL Cert size, default2048
bitsSSL_EXPIRE
SSL Cert expiry, default60
daysSSL_DNS
comma seperate list of alternative hostnames, no default [2]SSL_IP
comma seperate list of alternative IPs, no default [2]
[1] If file already exists will re-use.
[2] If SSL_DNS
or SSL_IP
is set will add SSL_SUBJECT
to alternative hostname list
version: '1.0'
steps:
...
UseSSLCertificate:
title: Uses the certificate created in previous step
image: alpine:latest
working_directory: ${{CF_VOLUME_PATH}}/certs
commands:
- ls
- echo "This demonstrates how to use the generated certificate in another step:"
- echo "cert.pem file:"
- cat cert.pem
- echo "key.pem file:"
- cat key.pem
- echo "key.csr file:"
- cat key.csr
...