Skip to content

Commit c4aba15

Browse files
dploegerDennis Ploeger
authored andcommitted
feat: Include cmctl
Also includes a patch to build.sh to make it more reliable. Fixes #140
1 parent 25c0841 commit c4aba15

4 files changed

Lines changed: 26 additions & 2 deletions

File tree

build.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env bash
22

3+
set -euo pipefail
4+
35
# CloudControl build script
46
# Usage:
57
#
@@ -27,8 +29,8 @@ for FLAVOUR in ${FLAVOURS}
2729
do
2830
cat build/Dockerfile.prefix > Dockerfile
2931
cat "flavour/${FLAVOUR}/Dockerfile.flavour" >> Dockerfile
30-
cat build/Dockerfile.suffix.mo | docker run --rm -i -e FLAVOUR=${FLAVOUR} -e BUILD_DATE=$(date -Iseconds) metal3d/mo >> Dockerfile
31-
docker build --pull . -t "ghcr.io/dodevops/cloudcontrol-${FLAVOUR}:${TAG}"
32+
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
33+
docker build --pull . --no-cache -t "ghcr.io/dodevops/cloudcontrol-${FLAVOUR}:${TAG}"
3234
done
3335

3436
if [ -e Dockerfile.sav ] ; then

feature/cmctl/feature.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
icon: "📨"
2+
title: "cmctl"
3+
description: "Installs the cert-manager Command Line Tool"
4+
configuration:
5+
- |
6+
Environment CMCTL_VERSION: Version of cmctl to install (optional)
7+
Defaults to `latest`

feature/cmctl/goss/goss.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
command:
2+
cmctl:
3+
exec: "/home/cloudcontrol/bin/cmctl version --client"
4+
stdout:
5+
- "Client Version"
6+
exit-status: 0

feature/cmctl/install.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
. /feature-installer-utils.sh
2+
3+
# Prepare a workspace for installing the feature
4+
prepare
5+
6+
download "https://github.com/cert-manager/cmctl/releases/${CMCTL_VERSION:-latest}/download/cmctl_linux_$(getPlatform)" cmctl
7+
execHandle "Making cmctl executable" chmod +x cmctl
8+
execHandle "Copying tool to ${BINPATH}" cp cmctl "${BINPATH}"
9+
cleanup

0 commit comments

Comments
 (0)