Fix azure and openstack external providers
* The `{{ .RunnerUsername }}` is not replaced in any external providers' scripts.
However, we can safely assume that the username is properly created by
cloud-init before the userdata is executed.
* Correctly use the `OS_TO_GH_ARCH_MAP` bash map.
Signed-off-by: Ionut Balutoiu <ibalutoiu@cloudbasesolutions.com>
This commit is contained in:
parent
0699973abe
commit
85fd3924ee
3 changed files with 3 additions and 3 deletions
|
|
@ -59,7 +59,7 @@ sendStatus "starting service"
|
|||
./svc.sh start || fail "failed to start service"
|
||||
|
||||
set +e
|
||||
AGENT_ID=$(grep "agentId" /home/{{ .RunnerUsername }}/actions-runner/.runner | tr -d -c 0-9)
|
||||
AGENT_ID=$(grep "agentId" /home/runner/actions-runner/.runner | tr -d -c 0-9)
|
||||
if [ $? -ne 0 ];then
|
||||
fail "failed to get agent ID"
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ sendStatus "starting service"
|
|||
./svc.sh start || fail "failed to start service"
|
||||
|
||||
set +e
|
||||
AGENT_ID=$(grep "agentId" /home/{{ .RunnerUsername }}/actions-runner/.runner | tr -d -c 0-9)
|
||||
AGENT_ID=$(grep "agentId" /home/runner/actions-runner/.runner | tr -d -c 0-9)
|
||||
if [ $? -ne 0 ];then
|
||||
fail "failed to get agent ID"
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -275,7 +275,7 @@ function CreateInstance() {
|
|||
checkValNotNull "${VERSION}" "os_version" || return $?
|
||||
ARCH=$(echo "${IMAGE_DETAILS}" | jq -c -r '.properties.architecture')
|
||||
checkValNotNull "${ARCH}" "architecture" || return $?
|
||||
GH_ARCH=OS_TO_GH_ARCH_MAP[${ARCH}]
|
||||
GH_ARCH=${OS_TO_GH_ARCH_MAP[${ARCH}]}
|
||||
|
||||
if [ -z "${GH_ARCH}" ];then
|
||||
GH_ARCH=${ARCH}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue