From 61818d0f32fd9e884dea730003bba34f9c25bc18 Mon Sep 17 00:00:00 2001 From: YannickFuereder Date: Sat, 7 Jan 2023 21:03:30 +0100 Subject: [PATCH 1/3] azure agent --- software/azure-pipeline-agents/README.md | 23 ++++++ .../egg-azure-pipeline-agent-v3-214-0.json | 72 +++++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 software/azure-pipeline-agents/README.md create mode 100644 software/azure-pipeline-agents/egg-azure-pipeline-agent-v3-214-0.json diff --git a/software/azure-pipeline-agents/README.md b/software/azure-pipeline-agents/README.md new file mode 100644 index 000000000..a4ba22a9c --- /dev/null +++ b/software/azure-pipeline-agents/README.md @@ -0,0 +1,23 @@ +# Azrue Pipelines Agent + +## From the [Azure Pipelines Agents Repo](https://github.com/microsoft/azure-pipelines-agent) + +The cross-platform build and release agent for Azure Pipelines and Team Foundation Server 2015 and beyond. + +## Setup + +Create a new PAT like described [here](https://learn.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate) + +The server url should look like this: ```https://\.visualstudio.com``` + +Place into Pterodactyl Server Creation + +## Update support + +This egg only supports version 3-214-0. +
+If you need another version ---> [create issue](https://github.com/parkervcp/eggs/issues/new/choose) + +## Server Ports + +No open ports are required to use this. \ No newline at end of file diff --git a/software/azure-pipeline-agents/egg-azure-pipeline-agent-v3-214-0.json b/software/azure-pipeline-agents/egg-azure-pipeline-agent-v3-214-0.json new file mode 100644 index 000000000..5bf88c3a0 --- /dev/null +++ b/software/azure-pipeline-agents/egg-azure-pipeline-agent-v3-214-0.json @@ -0,0 +1,72 @@ +{ + "_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO", + "meta": { + "version": "PTDL_v2", + "update_url": null + }, + "exported_at": "2023-01-07T20:51:55+01:00", + "name": "Azure Pipeline Agent v3.214.0", + "author": "yannick@netdb.at", + "description": "Allows your to host your Azure Pipeline Self-Hosted Agent on Pterodactyl", + "features": null, + "docker_images": { + "ghcr.io\/parkervcp\/yolks:ubuntu": "ghcr.io\/parkervcp\/yolks:ubuntu" + }, + "file_denylist": [], + "startup": ".\/run.sh", + "config": { + "files": "{}", + "startup": "{\r\n \"done\": \"Listening for Jobs\"\r\n}", + "logs": "{}", + "stop": "^C" + }, + "scripts": { + "installation": { + "script": "#!\/bin\/sh\r\ncd \/mnt\/server\r\ndpkg --add-architecture i386\r\napt update -y\r\napt upgrade -y\r\necho \"-----------------------------------------\"\r\necho \"Install required packages...\"\r\necho \"-----------------------------------------\"\r\napt install -y apt-transport-https wget iproute2 curl tar ca-certificates\r\nwget https:\/\/packages.microsoft.com\/config\/ubuntu\/22.10\/packages-microsoft-prod.deb -O packages-microsoft-prod.deb\r\ndpkg -i packages-microsoft-prod.deb\r\nrm packages-microsoft-prod.deb\r\napt update -y\r\napt install -y dotnet-runtime-6.0\r\necho \"-----------------------------------------\"\r\necho \"Installation completed\"\r\necho \"-----------------------------------------\"\r\necho \"-----------------------------------------\"\r\necho \"Install azure devops agent...\"\r\necho \"-----------------------------------------\"\r\ncurl -O -J -L https:\/\/vstsagentpackage.azureedge.net\/agent\/3.214.0\/vsts-agent-linux-x64-3.214.0.tar.gz\r\ntar xzf vsts-agent-linux-x64-3.214.0.tar.gz\r\nexport AGENT_ALLOW_RUNASROOT=\"1\"\r\n.\/config.sh --unattended --acceptTeeEula --url ${SERVER_URL} --auth PAT --token ${PAT} --pool ${POOL_NAME} --agent ${AGENT_NAME}\r\necho \"-----------------------------------------\"\r\necho \"Installation completed\"\r\necho \"-----------------------------------------\"", + "container": "debian:buster-slim", + "entrypoint": "bash" + } + }, + "variables": [ + { + "name": "Server Url", + "description": "", + "env_variable": "SERVER_URL", + "default_value": "", + "user_viewable": true, + "user_editable": false, + "rules": "required|string|max:100", + "field_type": "text" + }, + { + "name": "Personal Access Token (PAT)", + "description": "", + "env_variable": "PAT", + "default_value": "", + "user_viewable": true, + "user_editable": false, + "rules": "required|string|max:100", + "field_type": "text" + }, + { + "name": "Pool Name", + "description": "", + "env_variable": "POOL_NAME", + "default_value": "", + "user_viewable": true, + "user_editable": false, + "rules": "required|string|max:50", + "field_type": "text" + }, + { + "name": "Agent Name", + "description": "", + "env_variable": "AGENT_NAME", + "default_value": "", + "user_viewable": true, + "user_editable": false, + "rules": "required|string|max:50", + "field_type": "text" + } + ] +} \ No newline at end of file From 1081381f69befcea46f58e803cf068f62e63e232 Mon Sep 17 00:00:00 2001 From: Quinten <67589015+QuintenQVD0@users.noreply.github.com> Date: Sun, 8 Jan 2023 16:53:26 +0100 Subject: [PATCH 2/3] Azure Pipeline Agent first cleanup --- software/azure-pipeline-agents/README.md | 7 +- .../egg-azure-pipeline-agent-v3-214-0.json | 72 ---------------- .../egg-azure-pipeline-agent.json | 82 +++++++++++++++++++ 3 files changed, 83 insertions(+), 78 deletions(-) delete mode 100644 software/azure-pipeline-agents/egg-azure-pipeline-agent-v3-214-0.json create mode 100644 software/azure-pipeline-agents/egg-azure-pipeline-agent.json diff --git a/software/azure-pipeline-agents/README.md b/software/azure-pipeline-agents/README.md index a4ba22a9c..792882eff 100644 --- a/software/azure-pipeline-agents/README.md +++ b/software/azure-pipeline-agents/README.md @@ -8,15 +8,10 @@ The cross-platform build and release agent for Azure Pipelines and Team Foundati Create a new PAT like described [here](https://learn.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate) -The server url should look like this: ```https://\.visualstudio.com``` +The server url should look like this: ```https://.visualstudio.com``` Place into Pterodactyl Server Creation -## Update support - -This egg only supports version 3-214-0. -
-If you need another version ---> [create issue](https://github.com/parkervcp/eggs/issues/new/choose) ## Server Ports diff --git a/software/azure-pipeline-agents/egg-azure-pipeline-agent-v3-214-0.json b/software/azure-pipeline-agents/egg-azure-pipeline-agent-v3-214-0.json deleted file mode 100644 index 5bf88c3a0..000000000 --- a/software/azure-pipeline-agents/egg-azure-pipeline-agent-v3-214-0.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO", - "meta": { - "version": "PTDL_v2", - "update_url": null - }, - "exported_at": "2023-01-07T20:51:55+01:00", - "name": "Azure Pipeline Agent v3.214.0", - "author": "yannick@netdb.at", - "description": "Allows your to host your Azure Pipeline Self-Hosted Agent on Pterodactyl", - "features": null, - "docker_images": { - "ghcr.io\/parkervcp\/yolks:ubuntu": "ghcr.io\/parkervcp\/yolks:ubuntu" - }, - "file_denylist": [], - "startup": ".\/run.sh", - "config": { - "files": "{}", - "startup": "{\r\n \"done\": \"Listening for Jobs\"\r\n}", - "logs": "{}", - "stop": "^C" - }, - "scripts": { - "installation": { - "script": "#!\/bin\/sh\r\ncd \/mnt\/server\r\ndpkg --add-architecture i386\r\napt update -y\r\napt upgrade -y\r\necho \"-----------------------------------------\"\r\necho \"Install required packages...\"\r\necho \"-----------------------------------------\"\r\napt install -y apt-transport-https wget iproute2 curl tar ca-certificates\r\nwget https:\/\/packages.microsoft.com\/config\/ubuntu\/22.10\/packages-microsoft-prod.deb -O packages-microsoft-prod.deb\r\ndpkg -i packages-microsoft-prod.deb\r\nrm packages-microsoft-prod.deb\r\napt update -y\r\napt install -y dotnet-runtime-6.0\r\necho \"-----------------------------------------\"\r\necho \"Installation completed\"\r\necho \"-----------------------------------------\"\r\necho \"-----------------------------------------\"\r\necho \"Install azure devops agent...\"\r\necho \"-----------------------------------------\"\r\ncurl -O -J -L https:\/\/vstsagentpackage.azureedge.net\/agent\/3.214.0\/vsts-agent-linux-x64-3.214.0.tar.gz\r\ntar xzf vsts-agent-linux-x64-3.214.0.tar.gz\r\nexport AGENT_ALLOW_RUNASROOT=\"1\"\r\n.\/config.sh --unattended --acceptTeeEula --url ${SERVER_URL} --auth PAT --token ${PAT} --pool ${POOL_NAME} --agent ${AGENT_NAME}\r\necho \"-----------------------------------------\"\r\necho \"Installation completed\"\r\necho \"-----------------------------------------\"", - "container": "debian:buster-slim", - "entrypoint": "bash" - } - }, - "variables": [ - { - "name": "Server Url", - "description": "", - "env_variable": "SERVER_URL", - "default_value": "", - "user_viewable": true, - "user_editable": false, - "rules": "required|string|max:100", - "field_type": "text" - }, - { - "name": "Personal Access Token (PAT)", - "description": "", - "env_variable": "PAT", - "default_value": "", - "user_viewable": true, - "user_editable": false, - "rules": "required|string|max:100", - "field_type": "text" - }, - { - "name": "Pool Name", - "description": "", - "env_variable": "POOL_NAME", - "default_value": "", - "user_viewable": true, - "user_editable": false, - "rules": "required|string|max:50", - "field_type": "text" - }, - { - "name": "Agent Name", - "description": "", - "env_variable": "AGENT_NAME", - "default_value": "", - "user_viewable": true, - "user_editable": false, - "rules": "required|string|max:50", - "field_type": "text" - } - ] -} \ No newline at end of file diff --git a/software/azure-pipeline-agents/egg-azure-pipeline-agent.json b/software/azure-pipeline-agents/egg-azure-pipeline-agent.json new file mode 100644 index 000000000..bc2e0d2fd --- /dev/null +++ b/software/azure-pipeline-agents/egg-azure-pipeline-agent.json @@ -0,0 +1,82 @@ +{ + "_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO", + "meta": { + "version": "PTDL_v2", + "update_url": null + }, + "exported_at": "2023-01-08T16:50:51+01:00", + "name": "Azure Pipeline Agent", + "author": "yannick@netdb.at", + "description": "Allows your to host your Azure Pipeline Self-Hosted Agent on Pterodactyl", + "features": null, + "docker_images": { + "Debian": "ghcr.io\/parkervcp\/yolks:debian" + }, + "file_denylist": [], + "startup": ".\/Agent.Listener run", + "config": { + "files": "{}", + "startup": "{\r\n \"done\": \"Listening for Jobs\"\r\n}", + "logs": "{}", + "stop": "^^C" + }, + "scripts": { + "installation": { + "script": "#!\/bin\/sh\r\nmkdir -p \/mnt\/server\r\n\r\napt install -y curl tar jq git\r\n\r\n## get release info and download links\r\nLATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/microsoft\/azure-pipelines-agent\/releases\/latest\")\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/microsoft\/azure-pipelines-agent\/releases\")\r\nMATCH=assets.json\r\nARCH=$([[ \"$(uname -m)\" == \"x86_64\" ]] && echo \"linux-x64\" || echo \"linux-arm64\")\r\n\r\nif [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"latest\" ]; then\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${MATCH})\r\nelse\r\n VERSION_CHECK=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .tag_name')\r\n if [ \"${VERSION}\" == \"${VERSION_CHECK}\" ]; then\r\n DOWNLOAD_URL=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i ${MATCH})\r\n else\r\n echo -e \"defaulting to latest release\"\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url)\r\n fi\r\nfi\r\n\r\ncd \/tmp\r\ncurl -sSL -o assets.json ${DOWNLOAD_URL}\r\n\r\nREAL_DOWNLOAD_URL=$(cat assets.json | jq -r .[].downloadUrl | grep -i vsts-agent | grep -i ${ARCH})\r\n\r\ncd \/mnt\/server\r\ncurl -o vsts-agent.tar.gz -sSL ${REAL_DOWNLOAD_URL}\r\n\r\ntar xzf vsts-agent.tar.gz\r\nrm vsts-agent.tar.gz\r\n\r\nexport AGENT_ALLOW_RUNASROOT=\"0\"\r\n.\/config.sh --unattended --acceptTeeEula --url ${SERVER_URL} --auth PAT --token ${PAT} --pool ${POOL_NAME} --agent ${AGENT_NAME}\r\n\r\n\r\necho \"-----------------------------------------\"\r\necho \"Installation completed\"\r\necho \"-----------------------------------------\"", + "container": "debian:bullseye-slim", + "entrypoint": "bash" + } + }, + "variables": [ + { + "name": "Server Url", + "description": "The server url should look like this: https:\/\/.visualstudio.com", + "env_variable": "SERVER_URL", + "default_value": "", + "user_viewable": true, + "user_editable": false, + "rules": "required|string|max:100", + "field_type": "text" + }, + { + "name": "Personal Access Token (PAT)", + "description": "https:\/\/learn.microsoft.com\/en-us\/azure\/devops\/organizations\/accounts\/use-personal-access-tokens-to-authenticate", + "env_variable": "PAT", + "default_value": "", + "user_viewable": true, + "user_editable": false, + "rules": "required|string|max:100", + "field_type": "text" + }, + { + "name": "Pool Name", + "description": "", + "env_variable": "POOL_NAME", + "default_value": "", + "user_viewable": true, + "user_editable": false, + "rules": "required|string|max:50", + "field_type": "text" + }, + { + "name": "Agent Name", + "description": "", + "env_variable": "AGENT_NAME", + "default_value": "", + "user_viewable": true, + "user_editable": false, + "rules": "required|string|max:50", + "field_type": "text" + }, + { + "name": "Version", + "description": "", + "env_variable": "VERSION", + "default_value": "latest", + "user_viewable": true, + "user_editable": true, + "rules": "required|string|max:20", + "field_type": "text" + } + ] +} \ No newline at end of file From 912523fce1e0bb9257f4e37bc6413988c61a5718 Mon Sep 17 00:00:00 2001 From: YannickFuereder Date: Sun, 15 Jan 2023 23:04:24 +0100 Subject: [PATCH 3/3] readme, install script fix --- README.md | 4 ++++ .../README.md | 0 .../egg-azure-pipeline-agent.json | 8 ++++---- 3 files changed, 8 insertions(+), 4 deletions(-) rename software/{azure-pipeline-agents => azure-pipeline-agent}/README.md (100%) rename software/{azure-pipeline-agents => azure-pipeline-agent}/egg-azure-pipeline-agent.json (57%) diff --git a/README.md b/README.md index bddab3720..c6a1f4df5 100644 --- a/README.md +++ b/README.md @@ -332,6 +332,10 @@ If you are reading this it looks like you are looking to add an egg to your serv * [Elasticsearch](/software/elasticsearch) +### Azure Pipeline Agent + +* [Azure Pipeline Agent](/software/azure-pipeline-agent) + ### Gitea * [Gitea](/software/gitea) diff --git a/software/azure-pipeline-agents/README.md b/software/azure-pipeline-agent/README.md similarity index 100% rename from software/azure-pipeline-agents/README.md rename to software/azure-pipeline-agent/README.md diff --git a/software/azure-pipeline-agents/egg-azure-pipeline-agent.json b/software/azure-pipeline-agent/egg-azure-pipeline-agent.json similarity index 57% rename from software/azure-pipeline-agents/egg-azure-pipeline-agent.json rename to software/azure-pipeline-agent/egg-azure-pipeline-agent.json index bc2e0d2fd..7ff75512c 100644 --- a/software/azure-pipeline-agents/egg-azure-pipeline-agent.json +++ b/software/azure-pipeline-agent/egg-azure-pipeline-agent.json @@ -4,7 +4,7 @@ "version": "PTDL_v2", "update_url": null }, - "exported_at": "2023-01-08T16:50:51+01:00", + "exported_at": "2023-01-15T23:01:12+01:00", "name": "Azure Pipeline Agent", "author": "yannick@netdb.at", "description": "Allows your to host your Azure Pipeline Self-Hosted Agent on Pterodactyl", @@ -13,7 +13,7 @@ "Debian": "ghcr.io\/parkervcp\/yolks:debian" }, "file_denylist": [], - "startup": ".\/Agent.Listener run", + "startup": ".\/run.sh", "config": { "files": "{}", "startup": "{\r\n \"done\": \"Listening for Jobs\"\r\n}", @@ -22,8 +22,8 @@ }, "scripts": { "installation": { - "script": "#!\/bin\/sh\r\nmkdir -p \/mnt\/server\r\n\r\napt install -y curl tar jq git\r\n\r\n## get release info and download links\r\nLATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/microsoft\/azure-pipelines-agent\/releases\/latest\")\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/microsoft\/azure-pipelines-agent\/releases\")\r\nMATCH=assets.json\r\nARCH=$([[ \"$(uname -m)\" == \"x86_64\" ]] && echo \"linux-x64\" || echo \"linux-arm64\")\r\n\r\nif [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"latest\" ]; then\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${MATCH})\r\nelse\r\n VERSION_CHECK=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .tag_name')\r\n if [ \"${VERSION}\" == \"${VERSION_CHECK}\" ]; then\r\n DOWNLOAD_URL=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i ${MATCH})\r\n else\r\n echo -e \"defaulting to latest release\"\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url)\r\n fi\r\nfi\r\n\r\ncd \/tmp\r\ncurl -sSL -o assets.json ${DOWNLOAD_URL}\r\n\r\nREAL_DOWNLOAD_URL=$(cat assets.json | jq -r .[].downloadUrl | grep -i vsts-agent | grep -i ${ARCH})\r\n\r\ncd \/mnt\/server\r\ncurl -o vsts-agent.tar.gz -sSL ${REAL_DOWNLOAD_URL}\r\n\r\ntar xzf vsts-agent.tar.gz\r\nrm vsts-agent.tar.gz\r\n\r\nexport AGENT_ALLOW_RUNASROOT=\"0\"\r\n.\/config.sh --unattended --acceptTeeEula --url ${SERVER_URL} --auth PAT --token ${PAT} --pool ${POOL_NAME} --agent ${AGENT_NAME}\r\n\r\n\r\necho \"-----------------------------------------\"\r\necho \"Installation completed\"\r\necho \"-----------------------------------------\"", - "container": "debian:bullseye-slim", + "script": "#!\/bin\/sh\r\nmkdir -p \/mnt\/server\r\napt update\r\napt install -y curl tar jq git\r\n\r\n## get release info and download links\r\nLATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/microsoft\/azure-pipelines-agent\/releases\/latest\")\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/microsoft\/azure-pipelines-agent\/releases\")\r\nMATCH=assets.json\r\nARCH=$([[ \"$(uname -m)\" == \"x86_64\" ]] && echo \"linux-x64\" || echo \"linux-arm64\")\r\nif [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"latest\" ]; then\r\nDOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${MATCH})\r\nelse\r\nVERSION_CHECK=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .tag_name')\r\nif [ \"${VERSION}\" == \"${VERSION_CHECK}\" ]; then\r\nDOWNLOAD_URL=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i ${MATCH})\r\nelse\r\necho -e \"defaulting to latest release\"\r\nDOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url)\r\nfi\r\nfi\r\ncd \/tmp\r\ncurl -sSL -o assets.json ${DOWNLOAD_URL}\r\nREAL_DOWNLOAD_URL=$(cat assets.json | jq -r .[].downloadUrl | grep -i vsts-agent | grep -i ${ARCH})\r\ncd \/mnt\/server\r\n\r\ncurl -o vsts-agent.tar.gz -sSL ${REAL_DOWNLOAD_URL}\r\ntar xzf vsts-agent.tar.gz\r\nrm vsts-agent.tar.gz\r\n\r\nexport AGENT_ALLOW_RUNASROOT=\"1\"\r\n.\/config.sh --unattended --acceptTeeEula --url ${SERVER_URL} --auth PAT --token ${PAT} --pool ${POOL_NAME} --agent ${AGENT_NAME}\r\necho \"-----------------------------------------\"\r\necho \"Installation completed\"\r\necho \"-----------------------------------------\"", + "container": "bitnami\/dotnet-sdk:6-debian-11", "entrypoint": "bash" } },