Skip to content
Merged
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
3 changes: 0 additions & 3 deletions toolchain/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ ENV ARCH=${BUILDARCH}
RUN apk add --update --no-cache unzip curl jq docker-cli bash python3 py3-pip

RUN wget -q https://github.com/mikefarah/yq/releases/latest/download/yq_linux_$ARCH -O /usr/bin/yq && chmod +x /usr/bin/yq
RUN wget https://github.com/arangodb-managed/oasisctl/releases/download/v1.19.0/oasisctl.zip && unzip oasisctl.zip
RUN mv bin/linux/arm/ bin/linux/arm64
RUN cd bin/linux/$ARCH && mv oasisctl /usr/bin/oasisctl && chmod +x /usr/bin/oasisctl

RUN pip3 install pyyaml

Expand Down
15 changes: 15 additions & 0 deletions toolchain/scripts/toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,10 @@ function generate_oasisctl() {

log "[generate_oasisctl] Generate OasisCTL docs"

if [ ! -f /tmp/oasisctl.zip ]; then
log "[generate_oasisctl] /tmp/oasisctl.zip not found. Invoking download_oasisctl"
download_oasisctl
fi

mkdir -p /tmp/oasisctl
mkdir -p /tmp/preserve
Expand Down Expand Up @@ -551,6 +555,17 @@ function generate_oasisctl() {
log "[generate_oasisctl] Done"
}

function download_oasisctl() {
oasisctlVersion=$(curl -I https://github.com/arangodb-managed/oasisctl/releases/latest | awk -F '/' '/^location/ {print substr($NF, 1, length($NF)-1)}')
log "[download_oasisctl] Downloading oasisctl version $oasisctlVersion"
cd /tmp
wget https://github.com/arangodb-managed/oasisctl/releases/download/$oasisctlVersion/oasisctl.zip
unzip oasisctl.zip
mv bin/linux/arm/ bin/linux/arm64
mv bin/linux/amd64/oasisctl /usr/bin/oasisctl && chmod +x /usr/bin/oasisctl
cd /home/toolchain/scripts
}



### SYSTEM HANDLERS FUNCTIONS
Expand Down