Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/publish_gcr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ on:
image-tag:
description: 'The image tag to build'
required: true
colony-scout-version:
description: 'Colony scout version'
default: "0.2.0-rc1"

jobs:
publish_to_public_gcr:
Expand Down Expand Up @@ -44,3 +47,5 @@ jobs:
context: "${{ github.event.inputs.image-folder }}"
push: true
tags: ghcr.io/${{ github.repository_owner }}/${{ github.event.inputs.image-folder }}:${{ github.event.inputs.image-tag }}
build-args: |
COLONY_SCOUT_VERSION=${{ github.event.inputs.colony-scout-version}}
21 changes: 14 additions & 7 deletions discovery/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@

FROM alpine:3.13.1 as downloader

ARG COLONY_SCOUT_VERSION=0.2.0-rc1

RUN apk add --no-cache wget

RUN wget https://objectstore.nyc1.civo.com/konstruct-assets/colony-scout/v${COLONY_SCOUT_VERSION}/colony-scout_${COLONY_SCOUT_VERSION}_Linux_x86_64.tar.gz -O ${COLONY_SCOUT_VERSION}.tar.gz && \
tar -xzvf "${COLONY_SCOUT_VERSION}.tar.gz" && \
chmod +x colony-scout

FROM alpine:3.13.1

RUN apk add --no-cache util-linux wget
RUN apk add --no-cache util-linux

ARG COLONY_SCOUT_VERSION=0.0.10-rc11
RUN wget https://objectstore.nyc1.civo.com/konstruct-assets/colony-scout/v0.0.10-rc11/colony-scout_\ 0.0.10-rc11_Linux_x86_64.tar.gz && \
tar -xzvf colony-scout_\ 0.0.10-rc11_Linux_x86_64.tar.gz && \
chmod +x colony-scout && \
mv colony-scout /usr/local/bin/
COPY --from=downloader /colony-scout /usr/local/bin

COPY . .
COPY entrypoint.sh /entrypoint.sh

ENTRYPOINT ["/bin/sh","./entrypoint.sh"]
3 changes: 2 additions & 1 deletion discovery/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ update_hardware() {
output=$(colony-scout discovery \
--token="${COLONY_API_KEY}" \
--colony-api="${COLONY_API_URL}" \
--hardware-id="${K1_COLONY_HARDWARE_ID}" 2>&1)
--hardware-id="${K1_COLONY_HARDWARE_ID}" \
--agent-id="${COLONY_AGENT_ID}" 2>&1)

exit_status=$?

Expand Down