diff --git a/discovery/Dockerfile b/discovery/Dockerfile index dcfcd24..74cfa4e 100644 --- a/discovery/Dockerfile +++ b/discovery/Dockerfile @@ -5,6 +5,9 @@ RUN apt -y update && apt -y install curl iproute2 ENV COLONY_API_URL=https://colony-api-development.mgmt-20.kubefirst.com ENV COLONY_HARDWARE_ID=2de76518-16e2-45ec-b3ae-ee8db5f4de6f +ENV K1_COLONY_API_URL=$K1_COLONY_API_URL +ENV K1_COLONY_HARDWARE_ID=$K1_COLONY_HARDWARE_ID + COPY . . CMD [ "./entrypoint.sh" ] \ No newline at end of file diff --git a/discovery/entrypoint.sh b/discovery/entrypoint.sh index 74e400b..46f8d5c 100755 --- a/discovery/entrypoint.sh +++ b/discovery/entrypoint.sh @@ -1,5 +1,8 @@ #!/usr/bin/env bash +echo $K1_COLONY_API_URL +echo $K1_COLONY_HARDWARE_ID + # Function to get architecture info get_architecture_info() { architecture_info=$(lscpu | grep Architecture: | awk '{print $2}') @@ -51,13 +54,14 @@ generate_json() { EOF ) +echo "DEBUG" echo "$json_output" -# curl --request PUT \ -# --url "${COLONY_API_URL}/api/v1/mock/hardwares/${COLONY_HARDWARE_ID}" \ -# --header 'Accept: application/json' \ -# --header 'Content-Type: application/json' \ -# --data "$json_output" +curl --request PUT \ + --url "${COLONY_API_URL}/api/v1/mock/hardwares/${COLONY_HARDWARE_ID}" \ + --header 'Accept: application/json' \ + --header 'Content-Type: application/json' \ + --data "$json_output" }