Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Include cmctl #146

Merged
merged 2 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Following features and tools are supported:
* 🐟 Fish Shell
* 📷 AzCopy
* 🪪 Certificates
* 📨 cmctl
* ⚙️ Direnv
* ⛵️ Helm
* 🛠 JQ
Expand Down Expand Up @@ -54,6 +55,7 @@ Following features and tools are supported:
* [Fish Shell](#_fish)
* [AzCopy](#azcopy)
* [Certificates](#certificates)
* [cmctl](#cmctl)
* [Direnv](#direnv)
* [Helm](#helm)
* [JQ](#jq)
Expand Down Expand Up @@ -395,6 +397,17 @@ Adds specified trusted certificate authorities into the container
(optional). Defaults to `/certificates`. If something different than the default is used, the volume-target needs to be adapted to
the same directory

### <a id="cmctl"></a> cmctl

Installs the cert-manager Command Line Tool

#### Configuration

* USE_cmctl: Enable this feature
* DEBUG_cmctl: Debug this feature
* Environment CMCTL_VERSION: Version of cmctl to install (optional)
Defaults to `latest`

### <a id="direnv"></a> Direnv

Installs [Direnv](https://direnv.net/)
Expand Down
6 changes: 4 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env bash

set -euo pipefail

# CloudControl build script
# Usage:
#
Expand Down Expand Up @@ -27,8 +29,8 @@ for FLAVOUR in ${FLAVOURS}
do
cat build/Dockerfile.prefix > Dockerfile
cat "flavour/${FLAVOUR}/Dockerfile.flavour" >> Dockerfile
cat build/Dockerfile.suffix.mo | docker run --rm -i -e FLAVOUR=${FLAVOUR} -e BUILD_DATE=$(date -Iseconds) metal3d/mo >> Dockerfile
docker build --pull . -t "ghcr.io/dodevops/cloudcontrol-${FLAVOUR}:${TAG}"
cat build/Dockerfile.suffix.mo | docker run --rm -i -e FLAVOUR=${FLAVOUR} -e BUILD_DATE=$(date -Iseconds) ghcr.io/tests-always-included/mo:3.0.5 >> Dockerfile
dploeger marked this conversation as resolved.
Show resolved Hide resolved
docker build --pull . --no-cache -t "ghcr.io/dodevops/cloudcontrol-${FLAVOUR}:${TAG}"
done

if [ -e Dockerfile.sav ] ; then
Expand Down
7 changes: 7 additions & 0 deletions feature/cmctl/feature.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
icon: "📨"
title: "cmctl"
description: "Installs the cert-manager Command Line Tool"
configuration:
- |
Environment CMCTL_VERSION: Version of cmctl to install (optional)
Defaults to `latest`
6 changes: 6 additions & 0 deletions feature/cmctl/goss/goss.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
command:
cmctl:
exec: "/home/cloudcontrol/bin/cmctl version --client"
stdout:
- "Client Version"
exit-status: 0
9 changes: 9 additions & 0 deletions feature/cmctl/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
. /feature-installer-utils.sh

# Prepare a workspace for installing the feature
prepare

download "https://github.com/cert-manager/cmctl/releases/${CMCTL_VERSION:-latest}/download/cmctl_linux_$(getPlatform)" cmctl
execHandle "Making cmctl executable" chmod +x cmctl
execHandle "Copying tool to ${BINPATH}" cp cmctl "${BINPATH}"
cleanup