From 95631be004eb89b43e53eb01d316a7daebc841a3 Mon Sep 17 00:00:00 2001 From: Joe Ipson Date: Mon, 10 Mar 2025 12:07:24 -0600 Subject: [PATCH 01/21] Added support for running node server in Docker --- .gitignore | 2 ++ Dockerfile | 17 +++++++++++++++++ entrypoint.sh | 20 ++++++++++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 Dockerfile create mode 100644 entrypoint.sh diff --git a/.gitignore b/.gitignore index 0a64975da..b2df00f37 100644 --- a/.gitignore +++ b/.gitignore @@ -61,3 +61,5 @@ DEBUG_PROFILE.zip packaging/add_itemsize/* !packaging/add_itemsize/add_itemsize.js /.idea/AIAssistantCustomInstructionsStorage.xml + +config/ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..cb1dfcad5 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM alpine:3.21.3 + +RUN apk add --update nodejs npm su-exec shadow + +RUN rm -rf /var/cache/apk/* + +RUN mkdir /app_build +WORKDIR /app_build +RUN npm i -g yarn + +COPY . . + +RUN yarn install && yarn run build + +RUN chmod +x entrypoint.sh + +ENTRYPOINT ["./entrypoint.sh"] diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 000000000..ef1d65757 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +mkdir -p /app + +cp /app_build/chunk0* /app +cp -r /app_build/resources /app +cp -r /app_build/webui /app + +cd /app + +if [ -z "$PUID" ] || [ -z "$PGID" ]; then + exec node chunk0.js +else + adduser -u $PUID -D abc + groupmod -g $PGID abc + + chown abc:abc -R /app + + su-exec abc node chunk0.js +fi From d8d6773bb04b475f34ad1ce01182cfaa08ecc8c9 Mon Sep 17 00:00:00 2001 From: Joe Ipson Date: Mon, 10 Mar 2025 14:47:42 -0600 Subject: [PATCH 02/21] Move container to be pinned to nvmrc version --- Dockerfile | 5 ++--- entrypoint.sh | 18 ++++++++++++++---- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index cb1dfcad5..c246c3145 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,11 @@ -FROM alpine:3.21.3 +FROM node:22.13.0-alpine3.21 -RUN apk add --update nodejs npm su-exec shadow +RUN apk add --update su-exec shadow RUN rm -rf /var/cache/apk/* RUN mkdir /app_build WORKDIR /app_build -RUN npm i -g yarn COPY . . diff --git a/entrypoint.sh b/entrypoint.sh index ef1d65757..46bff2b3b 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -11,10 +11,20 @@ cd /app if [ -z "$PUID" ] || [ -z "$PGID" ]; then exec node chunk0.js else - adduser -u $PUID -D abc - groupmod -g $PGID abc + EXISTING_USER=$(getent passwd "$PUID" | cut -d: -f1) + EXISTING_GROUP=$(getent group "$PGID" | cut -d: -f1) - chown abc:abc -R /app + if [ -z "$EXISTING_USER" ]; then + adduser -u $PUID -D abc + EXISTING_USER=abc + fi - su-exec abc node chunk0.js + if [ -z "$EXISTING_GROUP" ]; then + groupmod -g $PGID abc + EXISTING_GROUP=abc + fi + + chown $EXISTING_USER:$EXISTING_GROUP -R /app + + su-exec $EXISTING_USER node chunk0.js fi From 9657005fd9ca53fd50baffe4097f7133f3b1a26f Mon Sep 17 00:00:00 2001 From: Joe Ipson Date: Tue, 11 Mar 2025 12:21:32 -0600 Subject: [PATCH 03/21] WIP for docker on cirrus ci --- .cirrus.yml | 6 ++++++ Dockerfile | 10 ++++++---- packaging/ciAssemble.sh | 8 ++++---- packaging/docker-build.sh | 6 ++++++ entrypoint.sh => packaging/entrypoint.sh | 6 +++--- 5 files changed, 25 insertions(+), 11 deletions(-) create mode 100644 packaging/docker-build.sh rename entrypoint.sh => packaging/entrypoint.sh (84%) diff --git a/.cirrus.yml b/.cirrus.yml index f4f28c792..1903cffed 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -29,6 +29,12 @@ Build_task: - ./packaging/ciAssemble.sh Assemble_Linux_script: - ./packaging/ciAssemble.sh linux + Docker_Build_script: + - docker build -t peacock:latest . + Docker_Publish_script: + - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin + - docker tag peacock:latest peacock/peacock:latest + - docker push peacock/peacock:latest Peacock_Release_artifacts: path: Peacock-v*.zip type: application/zip diff --git a/Dockerfile b/Dockerfile index c246c3145..fc75e6db3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,18 @@ FROM node:22.13.0-alpine3.21 -RUN apk add --update su-exec shadow +RUN apk add --update su-exec shadow jq RUN rm -rf /var/cache/apk/* RUN mkdir /app_build +RUN mkdir /app_linux WORKDIR /app_build COPY . . -RUN yarn install && yarn run build +RUN chmod +x packaging/docker-build.sh +RUN chmod +x packaging/entrypoint.sh -RUN chmod +x entrypoint.sh +RUN packaging/docker-build.sh -ENTRYPOINT ["./entrypoint.sh"] +ENTRYPOINT ["./packaging/entrypoint.sh"] diff --git a/packaging/ciAssemble.sh b/packaging/ciAssemble.sh index c8a8aee81..a689eca5a 100755 --- a/packaging/ciAssemble.sh +++ b/packaging/ciAssemble.sh @@ -31,7 +31,7 @@ fi # generate options.ini node chunk0.js noop -mkdir "$OUT_DIR" +mkdir -p "$OUT_DIR" cp packaging/HOW_TO_USE.html "$OUT_DIR" cp PeacockPatcher.exe "$OUT_DIR" cp chunk*.js "$OUT_DIR" @@ -43,15 +43,15 @@ fi cp LICENSE "$OUT_DIR" cp THIRDPARTYNOTICES.txt "$OUT_DIR" cp .nvmrc "$OUT_DIR" -mkdir "$OUT_DIR"/resources +mkdir -p "$OUT_DIR"/resources cp resources/dynamic_resources_h3.rpkg "$OUT_DIR"/resources/dynamic_resources_h3.rpkg cp resources/dynamic_resources_h2.rpkg "$OUT_DIR"/resources/dynamic_resources_h2.rpkg cp resources/dynamic_resources_h1.rpkg "$OUT_DIR"/resources/dynamic_resources_h1.rpkg cp -r resources/challenges "$OUT_DIR"/resources/challenges cp -r resources/mastery "$OUT_DIR"/resources/mastery cp resources/contracts.prp "$OUT_DIR"/resources/contracts.prp -mkdir "$OUT_DIR"/webui -mkdir "$OUT_DIR"/webui/dist +mkdir -p "$OUT_DIR"/webui +mkdir -p "$OUT_DIR"/webui/dist cp webui/dist/*.html "$OUT_DIR"/webui/dist cp -r webui/dist/assets "$OUT_DIR"/webui/dist/assets cp webui/dist/THIRDPARTYNOTICES.txt "$OUT_DIR"/webui/dist/THIRDPARTYNOTICES.txt diff --git a/packaging/docker-build.sh b/packaging/docker-build.sh new file mode 100644 index 000000000..8e2c8394e --- /dev/null +++ b/packaging/docker-build.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +VERSION=$(jq -r '.version' package.json) +BUILD_DIR=Peacock-v"$VERSION"-linux + +cp -r "$BUILD_DIR"/* /app_linux \ No newline at end of file diff --git a/entrypoint.sh b/packaging/entrypoint.sh similarity index 84% rename from entrypoint.sh rename to packaging/entrypoint.sh index 46bff2b3b..ef0aff719 100644 --- a/entrypoint.sh +++ b/packaging/entrypoint.sh @@ -2,9 +2,9 @@ mkdir -p /app -cp /app_build/chunk0* /app -cp -r /app_build/resources /app -cp -r /app_build/webui /app +cp /app_linux/chunk0* /app +cp -r /app_linux/resources /app +cp -r /app_linux/webui /app cd /app From 5f5a387c34d8a1da9d9922a3351522eb52f48d82 Mon Sep 17 00:00:00 2001 From: Joe Ipson Date: Tue, 11 Mar 2025 12:33:09 -0600 Subject: [PATCH 04/21] WIP for docker on cirrus ci --- .cirrus.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 1903cffed..981af2046 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -29,12 +29,6 @@ Build_task: - ./packaging/ciAssemble.sh Assemble_Linux_script: - ./packaging/ciAssemble.sh linux - Docker_Build_script: - - docker build -t peacock:latest . - Docker_Publish_script: - - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin - - docker tag peacock:latest peacock/peacock:latest - - docker push peacock/peacock:latest Peacock_Release_artifacts: path: Peacock-v*.zip type: application/zip @@ -76,3 +70,14 @@ task: - yarn build Test_script: - yarn test:main + +docker_builder: + only_if: $CIRRUS_TAG != '' + depends_on: + - Build + env: + DOCKER_USERNAME: ENCRYPTED[...] + DOCKER_PASSWORD: ENCRYPTED[...] + build_script: docker build --tag peacock/peacock:$CIRRUS_TAG . + login_script: docker login --username $DOCKER_USERNAME --password $DOCKER_PASSWORD + push_script: docker push peacock/peacock:$CIRRUS_TAG && docker push peacock/peacock:latest \ No newline at end of file From d45d4ac76d8d77488dd0765368914df9b0cedc0b Mon Sep 17 00:00:00 2001 From: Joe Ipson Date: Tue, 11 Mar 2025 12:33:47 -0600 Subject: [PATCH 05/21] WIP for docker on cirrus ci --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 981af2046..374caabc3 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -72,7 +72,7 @@ task: - yarn test:main docker_builder: - only_if: $CIRRUS_TAG != '' + # only_if: $CIRRUS_TAG != '' depends_on: - Build env: From ce2a52c0b8c52e9aa4783371859946c8d4ec9158 Mon Sep 17 00:00:00 2001 From: Joe Ipson Date: Tue, 11 Mar 2025 12:39:48 -0600 Subject: [PATCH 06/21] WIP for docker on cirrus ci --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 374caabc3..b22d0d850 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -78,6 +78,6 @@ docker_builder: env: DOCKER_USERNAME: ENCRYPTED[...] DOCKER_PASSWORD: ENCRYPTED[...] - build_script: docker build --tag peacock/peacock:$CIRRUS_TAG . + build_script: docker build --tag peacock/peacock:$CIRRUS_TAG --tag peacock/peacock:latest . login_script: docker login --username $DOCKER_USERNAME --password $DOCKER_PASSWORD push_script: docker push peacock/peacock:$CIRRUS_TAG && docker push peacock/peacock:latest \ No newline at end of file From 038f09803c4e7e959905eb762dbc2a12aa59212a Mon Sep 17 00:00:00 2001 From: Joe Ipson Date: Tue, 11 Mar 2025 12:43:31 -0600 Subject: [PATCH 07/21] WIP for docker on cirrus ci --- .cirrus.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index b22d0d850..2c968b106 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -78,6 +78,7 @@ docker_builder: env: DOCKER_USERNAME: ENCRYPTED[...] DOCKER_PASSWORD: ENCRYPTED[...] - build_script: docker build --tag peacock/peacock:$CIRRUS_TAG --tag peacock/peacock:latest . - login_script: docker login --username $DOCKER_USERNAME --password $DOCKER_PASSWORD - push_script: docker push peacock/peacock:$CIRRUS_TAG && docker push peacock/peacock:latest \ No newline at end of file + build_script: docker build --tag --tag peacock/peacock:latest . + # build_script: docker build --tag peacock/peacock:$CIRRUS_TAG --tag peacock/peacock:latest . + # login_script: docker login --username $DOCKER_USERNAME --password $DOCKER_PASSWORD + # push_script: docker push peacock/peacock:$CIRRUS_TAG && docker push peacock/peacock:latest \ No newline at end of file From 22eb46d5d63ec628329ebcef26f794e98e0ed590 Mon Sep 17 00:00:00 2001 From: Joe Ipson Date: Tue, 11 Mar 2025 12:45:23 -0600 Subject: [PATCH 08/21] WIP for docker on cirrus ci --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 2c968b106..2ce8f2bf5 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -78,7 +78,7 @@ docker_builder: env: DOCKER_USERNAME: ENCRYPTED[...] DOCKER_PASSWORD: ENCRYPTED[...] - build_script: docker build --tag --tag peacock/peacock:latest . + build_script: docker build --tag peacock/peacock:latest . # build_script: docker build --tag peacock/peacock:$CIRRUS_TAG --tag peacock/peacock:latest . # login_script: docker login --username $DOCKER_USERNAME --password $DOCKER_PASSWORD # push_script: docker push peacock/peacock:$CIRRUS_TAG && docker push peacock/peacock:latest \ No newline at end of file From a4ed2201e02258e673316ab8591ad24d46bc1933 Mon Sep 17 00:00:00 2001 From: Joe Ipson Date: Tue, 11 Mar 2025 12:51:28 -0600 Subject: [PATCH 09/21] WIP for docker on cirrus ci --- .cirrus.yml | 3 +++ packaging/docker-build.sh | 2 ++ 2 files changed, 5 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml index 2ce8f2bf5..5e78469a8 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -34,6 +34,9 @@ Build_task: type: application/zip SourceMap_artifacts: path: chunk0.js.map + Docker_Build_Artifacts: + path: Peacock-v* + type: directory task: container: diff --git a/packaging/docker-build.sh b/packaging/docker-build.sh index 8e2c8394e..78e962b91 100644 --- a/packaging/docker-build.sh +++ b/packaging/docker-build.sh @@ -3,4 +3,6 @@ VERSION=$(jq -r '.version' package.json) BUILD_DIR=Peacock-v"$VERSION"-linux +ls + cp -r "$BUILD_DIR"/* /app_linux \ No newline at end of file From b81a234d3c8d4ad354181a8722b6b6e1ff5d6f2a Mon Sep 17 00:00:00 2001 From: Joe Ipson Date: Tue, 11 Mar 2025 12:56:57 -0600 Subject: [PATCH 10/21] WIP for docker on cirrus ci --- .cirrus.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml index 5e78469a8..9dd078ac8 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -81,6 +81,9 @@ docker_builder: env: DOCKER_USERNAME: ENCRYPTED[...] DOCKER_PASSWORD: ENCRYPTED[...] + artifacts: + - Peacock-v* + pre_build_script: ls -la build_script: docker build --tag peacock/peacock:latest . # build_script: docker build --tag peacock/peacock:$CIRRUS_TAG --tag peacock/peacock:latest . # login_script: docker login --username $DOCKER_USERNAME --password $DOCKER_PASSWORD From 8b705f012f9788f111904363f2e59a4c3d3254c1 Mon Sep 17 00:00:00 2001 From: Joe Ipson Date: Tue, 11 Mar 2025 13:05:22 -0600 Subject: [PATCH 11/21] WIP for docker on cirrus ci --- .cirrus.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 9dd078ac8..6722fd977 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -77,14 +77,17 @@ task: docker_builder: # only_if: $CIRRUS_TAG != '' depends_on: - - Build + - Build_task env: DOCKER_USERNAME: ENCRYPTED[...] DOCKER_PASSWORD: ENCRYPTED[...] - artifacts: - - Peacock-v* + artifacts_from_build_task: + path: Peacock-v* + type: directory + task: Build_task + source: Peacock-v* pre_build_script: ls -la - build_script: docker build --tag peacock/peacock:latest . - # build_script: docker build --tag peacock/peacock:$CIRRUS_TAG --tag peacock/peacock:latest . + build_script: docker build --tag thepeacockproject/peacock:latest . + # build_script: docker build --tag thepeacockproject/peacock:$CIRRUS_TAG --tag thepeacockproject/peacock:latest . # login_script: docker login --username $DOCKER_USERNAME --password $DOCKER_PASSWORD - # push_script: docker push peacock/peacock:$CIRRUS_TAG && docker push peacock/peacock:latest \ No newline at end of file + # push_script: docker push thepeacockproject/peacock:$CIRRUS_TAG && docker push thepeacockproject/peacock:latest \ No newline at end of file From 6d9e64d443c8691829c77c85987e4107362d550a Mon Sep 17 00:00:00 2001 From: Joe Ipson Date: Tue, 11 Mar 2025 13:06:53 -0600 Subject: [PATCH 12/21] WIP for docker on cirrus ci --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 6722fd977..dd849ef8b 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -77,7 +77,7 @@ task: docker_builder: # only_if: $CIRRUS_TAG != '' depends_on: - - Build_task + - Build env: DOCKER_USERNAME: ENCRYPTED[...] DOCKER_PASSWORD: ENCRYPTED[...] From 3d088e329e2d9f095f8694bc1d8f140e07e146f9 Mon Sep 17 00:00:00 2001 From: Joe Ipson Date: Tue, 11 Mar 2025 13:12:40 -0600 Subject: [PATCH 13/21] WIP for docker on cirrus ci --- .cirrus.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index dd849ef8b..53e9f7a37 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -34,8 +34,8 @@ Build_task: type: application/zip SourceMap_artifacts: path: chunk0.js.map - Docker_Build_Artifacts: - path: Peacock-v* + Docker_Build_artifacts: + path: Peacock-v*/ type: directory task: @@ -82,10 +82,8 @@ docker_builder: DOCKER_USERNAME: ENCRYPTED[...] DOCKER_PASSWORD: ENCRYPTED[...] artifacts_from_build_task: - path: Peacock-v* + path: Peacock-v*/ type: directory - task: Build_task - source: Peacock-v* pre_build_script: ls -la build_script: docker build --tag thepeacockproject/peacock:latest . # build_script: docker build --tag thepeacockproject/peacock:$CIRRUS_TAG --tag thepeacockproject/peacock:latest . From 88201f022858e856982dbaadb954e78f425dee21 Mon Sep 17 00:00:00 2001 From: Joe Ipson Date: Tue, 11 Mar 2025 13:17:23 -0600 Subject: [PATCH 14/21] WIP for docker on cirrus ci --- .cirrus.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 53e9f7a37..9608cc413 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -34,9 +34,6 @@ Build_task: type: application/zip SourceMap_artifacts: path: chunk0.js.map - Docker_Build_artifacts: - path: Peacock-v*/ - type: directory task: container: @@ -75,6 +72,7 @@ task: - yarn test:main docker_builder: + name: Docker # only_if: $CIRRUS_TAG != '' depends_on: - Build @@ -82,8 +80,8 @@ docker_builder: DOCKER_USERNAME: ENCRYPTED[...] DOCKER_PASSWORD: ENCRYPTED[...] artifacts_from_build_task: - path: Peacock-v*/ - type: directory + path: Peacock-v*.zip + type: application/zip pre_build_script: ls -la build_script: docker build --tag thepeacockproject/peacock:latest . # build_script: docker build --tag thepeacockproject/peacock:$CIRRUS_TAG --tag thepeacockproject/peacock:latest . From 2dd3b03221c48cca845d545e40103298a8481d10 Mon Sep 17 00:00:00 2001 From: Joe Ipson Date: Tue, 11 Mar 2025 13:27:05 -0600 Subject: [PATCH 15/21] WIP for docker on cirrus ci --- .cirrus.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 9608cc413..c2c0e513f 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -79,11 +79,9 @@ docker_builder: env: DOCKER_USERNAME: ENCRYPTED[...] DOCKER_PASSWORD: ENCRYPTED[...] - artifacts_from_build_task: - path: Peacock-v*.zip - type: application/zip + download_artifact: curl -L "https://api.cirrus-ci.com/v1/artifact/task/$CIRRUS_BUILD_ID/Peacock_Release.zip" pre_build_script: ls -la build_script: docker build --tag thepeacockproject/peacock:latest . # build_script: docker build --tag thepeacockproject/peacock:$CIRRUS_TAG --tag thepeacockproject/peacock:latest . - # login_script: docker login --username $DOCKER_USERNAME --password $DOCKER_PASSWORD - # push_script: docker push thepeacockproject/peacock:$CIRRUS_TAG && docker push thepeacockproject/peacock:latest \ No newline at end of file + # push_script: docker push thepeacockproject/peacock:$CIRRUS_TAG && docker push thepeacockproject/peacock:latest + # login_script: docker login --username $DOCKER_USERNAME --password $DOCKER_PASSWORD \ No newline at end of file From 6fc557dc7cc9e70f3dd09ac05e214a9d3603d61d Mon Sep 17 00:00:00 2001 From: Joe Ipson Date: Tue, 11 Mar 2025 13:32:23 -0600 Subject: [PATCH 16/21] WIP for docker on cirrus ci --- .cirrus.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index c2c0e513f..3a4015235 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -79,7 +79,9 @@ docker_builder: env: DOCKER_USERNAME: ENCRYPTED[...] DOCKER_PASSWORD: ENCRYPTED[...] - download_artifact: curl -L "https://api.cirrus-ci.com/v1/artifact/task/$CIRRUS_BUILD_ID/Peacock_Release.zip" + download_artifact: curl -L "https://api.cirrus-ci.com/v1/artifact/task/$CIRRUS_BUILD_ID/Peacock_Release.zip" -o Peacock.zip + extract_artifact: unzip Peacock.zip + extract_linux_build: unzip Peacock-v*-linux.zip pre_build_script: ls -la build_script: docker build --tag thepeacockproject/peacock:latest . # build_script: docker build --tag thepeacockproject/peacock:$CIRRUS_TAG --tag thepeacockproject/peacock:latest . From 34c926d665488122e8f277ea47f68726121fb8b6 Mon Sep 17 00:00:00 2001 From: Joe Ipson Date: Tue, 11 Mar 2025 13:36:00 -0600 Subject: [PATCH 17/21] WIP for docker on cirrus ci --- .cirrus.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 3a4015235..28cf11aaa 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -79,9 +79,12 @@ docker_builder: env: DOCKER_USERNAME: ENCRYPTED[...] DOCKER_PASSWORD: ENCRYPTED[...] - download_artifact: curl -L "https://api.cirrus-ci.com/v1/artifact/task/$CIRRUS_BUILD_ID/Peacock_Release.zip" -o Peacock.zip - extract_artifact: unzip Peacock.zip - extract_linux_build: unzip Peacock-v*-linux.zip + artifact_script: + - apt update --yes + - apt install unzip curl --yes + - curl -L "https://api.cirrus-ci.com/v1/artifact/task/$CIRRUS_BUILD_ID/Peacock_Release.zip" -o Peacock.zip + - unzip Peacock.zip + - unzip Peacock-v*-linux.zip pre_build_script: ls -la build_script: docker build --tag thepeacockproject/peacock:latest . # build_script: docker build --tag thepeacockproject/peacock:$CIRRUS_TAG --tag thepeacockproject/peacock:latest . From a127e55f7296fa8566a1b2406e73546e0842d2de Mon Sep 17 00:00:00 2001 From: Joe Ipson Date: Tue, 11 Mar 2025 13:43:33 -0600 Subject: [PATCH 18/21] WIP for docker on cirrus ci --- .cirrus.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml index 28cf11aaa..ffebf4b89 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -80,6 +80,8 @@ docker_builder: DOCKER_USERNAME: ENCRYPTED[...] DOCKER_PASSWORD: ENCRYPTED[...] artifact_script: + - echo "CIRRUS_BUILD_ID: $CIRRUS_BUILD_ID" + - echo "CIRRUS_TASK_ID: $CIRRUS_TASK_ID" - apt update --yes - apt install unzip curl --yes - curl -L "https://api.cirrus-ci.com/v1/artifact/task/$CIRRUS_BUILD_ID/Peacock_Release.zip" -o Peacock.zip From 94915fe9049cc7732beae6b68c39999310067b48 Mon Sep 17 00:00:00 2001 From: Joe Ipson Date: Tue, 11 Mar 2025 13:58:14 -0600 Subject: [PATCH 19/21] WIP for docker on cirrus ci --- .cirrus.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index ffebf4b89..ef6b883da 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -81,10 +81,9 @@ docker_builder: DOCKER_PASSWORD: ENCRYPTED[...] artifact_script: - echo "CIRRUS_BUILD_ID: $CIRRUS_BUILD_ID" - - echo "CIRRUS_TASK_ID: $CIRRUS_TASK_ID" - apt update --yes - apt install unzip curl --yes - - curl -L "https://api.cirrus-ci.com/v1/artifact/task/$CIRRUS_BUILD_ID/Peacock_Release.zip" -o Peacock.zip + - curl -L "https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/Build/Peacock_Release.zip" -o Peacock.zip - unzip Peacock.zip - unzip Peacock-v*-linux.zip pre_build_script: ls -la From ca3ff21dd10b4166a89ef0d203ee90271393fd2a Mon Sep 17 00:00:00 2001 From: Joe Ipson Date: Tue, 11 Mar 2025 14:02:05 -0600 Subject: [PATCH 20/21] Finally have Docker building an image properly --- .cirrus.yml | 5 ++--- packaging/docker-build.sh | 2 -- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index ef6b883da..4c6fe9b3e 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -79,14 +79,13 @@ docker_builder: env: DOCKER_USERNAME: ENCRYPTED[...] DOCKER_PASSWORD: ENCRYPTED[...] - artifact_script: - - echo "CIRRUS_BUILD_ID: $CIRRUS_BUILD_ID" + get_artifact_script: - apt update --yes - apt install unzip curl --yes - curl -L "https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/Build/Peacock_Release.zip" -o Peacock.zip - unzip Peacock.zip - unzip Peacock-v*-linux.zip - pre_build_script: ls -la + - rm Peacock*.zip build_script: docker build --tag thepeacockproject/peacock:latest . # build_script: docker build --tag thepeacockproject/peacock:$CIRRUS_TAG --tag thepeacockproject/peacock:latest . # push_script: docker push thepeacockproject/peacock:$CIRRUS_TAG && docker push thepeacockproject/peacock:latest diff --git a/packaging/docker-build.sh b/packaging/docker-build.sh index 78e962b91..8e2c8394e 100644 --- a/packaging/docker-build.sh +++ b/packaging/docker-build.sh @@ -3,6 +3,4 @@ VERSION=$(jq -r '.version' package.json) BUILD_DIR=Peacock-v"$VERSION"-linux -ls - cp -r "$BUILD_DIR"/* /app_linux \ No newline at end of file From f6afaab293a4ca0d1a80c3d3896014e50fa3be35 Mon Sep 17 00:00:00 2001 From: Joe Ipson Date: Tue, 11 Mar 2025 14:06:32 -0600 Subject: [PATCH 21/21] Finally have Docker building an image properly --- .cirrus.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 4c6fe9b3e..34fbe5ccf 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -88,5 +88,5 @@ docker_builder: - rm Peacock*.zip build_script: docker build --tag thepeacockproject/peacock:latest . # build_script: docker build --tag thepeacockproject/peacock:$CIRRUS_TAG --tag thepeacockproject/peacock:latest . - # push_script: docker push thepeacockproject/peacock:$CIRRUS_TAG && docker push thepeacockproject/peacock:latest - # login_script: docker login --username $DOCKER_USERNAME --password $DOCKER_PASSWORD \ No newline at end of file + # login_script: docker login --username $DOCKER_USERNAME --password $DOCKER_PASSWORD + # push_script: docker push thepeacockproject/peacock:$CIRRUS_TAG && docker push thepeacockproject/peacock:latest \ No newline at end of file