Having the name of the user that can access the machine match
the name of the flavor, as is already the case for the 'test'
flavor, makes some things easier.
We can change this safely because the CentOS CI is the only
user of the 'ci' flavor, and we can easily coordinate a
configuration change to avoid breakages.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
guests/README.markdown | 9 +++++----
guests/lcitool | 12 ++++++------
guests/site.yml | 2 +-
3 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/guests/README.markdown b/guests/README.markdown
index fa1e8a5..bc780f3 100644
--- a/guests/README.markdown
+++ b/guests/README.markdown
@@ -79,11 +79,12 @@ single time you want to connect. Just add
to your `~/.ssh/config` file to achieve all of the above.
-CI use
-------
+Jenkins CI use
+--------------
-You'll need to configure `lcitool` to use the `ci` flavor for guests:
-to do so, just write `ci` in the `~/.config/lcitool/flavor` file.
+You'll need to configure `lcitool` to use the `jenkins` flavor for
+guests: to do so, just write `jenkins` in the `~/.config/lcitool/flavor`
+file.
Once a guest has been prepared, you'll be able to log in as root either
via SSH (your public key will have been authorized) or on the serial
diff --git a/guests/lcitool b/guests/lcitool
index ccd0a59..5b2efb9 100755
--- a/guests/lcitool
+++ b/guests/lcitool
@@ -67,20 +67,20 @@ load_config() {
VAULT_PASS_FILE="$CONFIG_DIR/vault-password"
ROOT_PASS_FILE="$CONFIG_DIR/root-password"
- # Two flavors are supported: test (default) and ci. Read the
+ # Two flavors are supported: test (default) and jenkins. Read the
# flavor from configuration, validate it and write it back in case
# it was not present
FLAVOR="$(cat "$FLAVOR_FILE" 2>/dev/null)"
FLAVOR=${FLAVOR:-test}
- test "$FLAVOR" = test || test "$FLAVOR" = ci || {
+ test "$FLAVOR" = test || test "$FLAVOR" = jenkins || {
die "$PROGRAM_NAME: Invalid flavor '$FLAVOR'"
}
echo "$FLAVOR" >"$FLAVOR_FILE" || {
die "$PROGRAM_NAME: $FLAVOR_FILE: Unable to save flavor"
}
- test "$FLAVOR" = ci && {
- # The vault password is only needed for the ci flavor, so only
+ test "$FLAVOR" = jenkins && {
+ # The vault password is only needed for the jenkins flavor, so only
# validate it in that case
test -f "$VAULT_PASS_FILE" && test "$(cat
"$VAULT_PASS_FILE")" || {
die "$PROGRAM_NAME: $VAULT_PASS_FILE: Missing or invalid password"
@@ -160,8 +160,8 @@ do_install()
*kickstart*|*ks*) EXTRA_ARGS="ks=file:/${INSTALL_CONFIG##*/}" ;;
esac
- # Only configure autostart for the guest for the ci flavor
- test "$FLAVOR" = ci && {
+ # Only configure autostart for the guest for the jenkins flavor
+ test "$FLAVOR" = jenkins && {
AUTOSTART="--autostart"
}
diff --git a/guests/site.yml b/guests/site.yml
index 5df18e6..cb4ec0e 100644
--- a/guests/site.yml
+++ b/guests/site.yml
@@ -30,7 +30,7 @@
# Configure the Jenkins agent
- include: tasks/jenkins.yml
when:
- - flavor == 'ci'
+ - flavor == 'jenkins'
- projects is defined
# jenkins is a pseudo-project
- ( 'jenkins' in projects )
--
2.14.3