diff options
Diffstat (limited to 'tasks')
-rw-r--r-- | tasks/initial-user-setup | 2 | ||||
-rw-r--r-- | tasks/jenkins (renamed from tasks/apt-update) | 11 | ||||
-rw-r--r-- | tasks/system-update (renamed from tasks/update) | 18 |
3 files changed, 21 insertions, 10 deletions
diff --git a/tasks/initial-user-setup b/tasks/initial-user-setup index de3aee9..68a0d2a 100644 --- a/tasks/initial-user-setup +++ b/tasks/initial-user-setup @@ -5,7 +5,7 @@ function task_setup() { SSH_IDENTITY_FILE=$ASSET_DIR/id_jenkins FILES+=("$ASSET_DIR/id_user.pub" "$ASSET_DIR/id_jenkins.pub") - INCLUDES+=("pkgmanager") + INCLUDES+=("$INCLUDE_DIR/pkgmanager") TASK_ISSET="yes" } diff --git a/tasks/apt-update b/tasks/jenkins index 38693b3..5598a9e 100644 --- a/tasks/apt-update +++ b/tasks/jenkins @@ -1,8 +1,9 @@ #!/bin/bash function task_exec() { - sudo apt-get -y update - sudo apt-get -y upgrade + + cat id_jenkins.pub >> /home/server/.ssh/authorized_keys + } function task_setup() { @@ -11,8 +12,10 @@ function task_setup() { # $TOOL_DIR SSH_USER=server - SSH_IDENTITY_FILE=$ASSET_DIR/id_rsa - + SSH_IDENTITY_FILE=$ASSET_DIR/id_jenkins + + FILES+=("$ASSET_DIR/id_jenkins.pub") + TASK_ISSET="yes" } diff --git a/tasks/update b/tasks/system-update index e392b76..8244ca4 100644 --- a/tasks/update +++ b/tasks/system-update @@ -1,18 +1,26 @@ #!/bin/bash function task_exec() { - pkg_update - pkg_upgrade + ret=0 + sudo pkg_update + ret=$(($ret + $?)) + + sudo pkg_upgrade + ret=$(($ret + $?)) + + exit $ret } function task_setup() { + # Available environment variables + # $ASSET_DIR + # $TOOL_DIR + INCLUDES+=("$INCLUDE_DIR/pkgmanager") SSH_USER=server - #SSH_IDENTITY_FILE=$ASSET_DIR/id_rsa + SSH_IDENTITY_FILE=$ASSET_DIR/id_jenkins - FILES+=() - TASK_ISSET="yes" } |