diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 67582c3..562b0c1 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,10 +1,15 @@ # ghcr.io/eda-labs/eda-devcontainer FROM public.ecr.aws/docker/library/debian:bookworm-slim -ARG EDA_VERSION=25.12.1 +# change this one to change EDA version +ARG EDA_VERSION=25.12.2 + ARG EDA_PLAYGROUND_REPO=nokia-eda/playground ARG EDA_PLAYGROUND_DIR=/home/vscode/.playground +# set this one before the substitution +ENV CODESPACE_EDA_VERSION=$EDA_VERSION + ENV EDA_VERSION=${EDA_VERSION//./-} ENV EDA_PLAYGROUND_REPO=$EDA_PLAYGROUND_REPO ENV EDA_PLAYGROUND_DIR=$EDA_PLAYGROUND_DIR diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 27276e8..e33dc6c 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,6 +1,6 @@ { "name": "Nokia EDA in GitHub Codespaces", - "image": "ghcr.io/eda-labs/codespaces/base:25.12.1-1", + "image": "ghcr.io/eda-labs/codespaces/base:25.12.2-1", "features": { "ghcr.io/devcontainers/features/docker-in-docker:2": { "version": "latest", diff --git a/.devcontainer/overrides.mk b/.devcontainer/overrides.mk index 4c1a180..cb5a093 100644 --- a/.devcontainer/overrides.mk +++ b/.devcontainer/overrides.mk @@ -2,6 +2,12 @@ KPT_RETRY ?= 5 KPT_RECONCILE_TIMEOUT ?= 3m KPT_LIVE_APPLY_ARGS += --reconcile-timeout=$(KPT_RECONCILE_TIMEOUT) +ifdef CODESPACE_EDA_VERSION +EDA_CORE_VERSION=$(CODESPACE_EDA_VERSION) +EDA_APPS_VERSION=$(CODESPACE_EDA_VERSION) +EDABUILDER_VERSION=$(CODESPACE_EDA_VERSION) +endif + # Override the INSTALL_KPT_PACKAGE macro # # Set the --reconcile-timeout flag so that KPT doesn't just hang for a while diff --git a/.devcontainer/postCreate.sh b/.devcontainer/postCreate.sh index 6256e8b..c0d0b70 100755 --- a/.devcontainer/postCreate.sh +++ b/.devcontainer/postCreate.sh @@ -3,18 +3,13 @@ source .devcontainer/utils.sh cd $EDA_PLAYGROUND_DIR -# get token -encoded=$(grep 'GH_PKG_TOKEN ?=' "Makefile" | sed 's/.*?= *//') -prefix=$(printf '%s' 'Z2hwCg==' | base64 -d) -suffix=$(printf '%s' "$encoded" | base64 -d | cut -c 4- | tr -d '\n') -TOKEN="${prefix}${suffix}" - log "Starting image prepull" T_START=$(date +%s) # preload images into the cluster from the EDA core list -# to reduce the number of jobs: PARALLEL_JOBS=$(($(nproc) - 1)) -PARALLEL_JOBS=$(nproc) -docker exec k3d-eda-demo-server-0 sh -c "cat /opt/images.txt | xargs -P $PARALLEL_JOBS -I {} crictl pull --creds nokia-eda-bot:$TOKEN {}" +# to reduce the number of jobs: +PARALLEL_JOBS=$(($(nproc) - 1)) +# PARALLEL_JOBS=$(nproc) +docker exec k3d-eda-demo-server-0 sh -c "cat /opt/images.txt | xargs -P $PARALLEL_JOBS -I {} sh -c 'echo \"[\$(date +%H:%M:%S)] Pulling image {}\"; crictl pull {} >/dev/null 2>&1'" T_END=$(date +%s) log "Images pulled. Took $((T_END-T_START)) seconds."