mirror of
https://github.com/EpicMorg/docker-scripts.git
synced 2024-12-25 06:05:37 +03:00
tc-agent separated
This commit is contained in:
parent
a4739dce41
commit
665849f39f
@ -1,6 +1,7 @@
|
|||||||
## Changelog
|
## Changelog
|
||||||
### 2021
|
### 2021
|
||||||
* `august`
|
* `august`
|
||||||
|
* splited `tc-agents` with `nodejs`
|
||||||
* fixed `PostgreSQL` images
|
* fixed `PostgreSQL` images
|
||||||
* added `PostgreSQL 13` and `PostgreSQL 14`. `latest` tag symlinked to `14`.
|
* added `PostgreSQL 13` and `PostgreSQL 14`. `latest` tag symlinked to `14`.
|
||||||
* `july`
|
* `july`
|
||||||
|
@ -5,7 +5,7 @@ ARG DEBIAN_FRONTEND=noninteractive
|
|||||||
##################################################################
|
##################################################################
|
||||||
# ARGuments
|
# ARGuments
|
||||||
##################################################################
|
##################################################################
|
||||||
ARG CONFLUENCE_VERSION=7.11.2
|
ARG CONFLUENCE_VERSION=7.13.0
|
||||||
ARG DOWNLOAD_URL=https://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-${CONFLUENCE_VERSION}.tar.gz
|
ARG DOWNLOAD_URL=https://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-${CONFLUENCE_VERSION}.tar.gz
|
||||||
|
|
||||||
##################################################################
|
##################################################################
|
||||||
|
@ -5,7 +5,7 @@ ARG DEBIAN_FRONTEND=noninteractive
|
|||||||
##################################################################
|
##################################################################
|
||||||
# ARGuments
|
# ARGuments
|
||||||
##################################################################
|
##################################################################
|
||||||
ARG CONFLUENCE_VERSION=7.11.2
|
ARG CONFLUENCE_VERSION=7.13.0
|
||||||
ARG DOWNLOAD_URL=https://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-${CONFLUENCE_VERSION}.tar.gz
|
ARG DOWNLOAD_URL=https://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-${CONFLUENCE_VERSION}.tar.gz
|
||||||
|
|
||||||
##################################################################
|
##################################################################
|
||||||
|
73
linux/teamcity/agent/node12/Dockerfile
Normal file
73
linux/teamcity/agent/node12/Dockerfile
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
FROM epicmorg/devel:jdk11
|
||||||
|
LABEL maintainer="EpicMorg DevTeam, developer@epicm.org"
|
||||||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
##################################################################
|
||||||
|
# sid sources list
|
||||||
|
##################################################################
|
||||||
|
#RUN rm -rfv /etc/apt/sources.list
|
||||||
|
COPY sources.sid.list /etc/apt/sources.list.d/
|
||||||
|
RUN apt update && \
|
||||||
|
apt autoremove -y && \
|
||||||
|
apt dist-upgrade -y && \
|
||||||
|
apt autoremove -y
|
||||||
|
|
||||||
|
##################################################################
|
||||||
|
# teamcity minimal agent
|
||||||
|
##################################################################
|
||||||
|
LABEL dockerImage.teamcity.version="latest" \
|
||||||
|
dockerImage.teamcity.buildNumber="latest"
|
||||||
|
|
||||||
|
VOLUME /data/teamcity_agent/conf
|
||||||
|
|
||||||
|
ENV CONFIG_FILE=/data/teamcity_agent/conf/buildAgent.properties
|
||||||
|
ENV LANG=C.UTF-8
|
||||||
|
ENV GIT_SSH_VARIANT=ssh
|
||||||
|
|
||||||
|
COPY run-agent.sh /run-agent.sh
|
||||||
|
RUN chmod +x /run-agent.sh && \
|
||||||
|
sync
|
||||||
|
|
||||||
|
COPY run-services.sh /run-services.sh
|
||||||
|
RUN chmod +x /run-services.sh && \
|
||||||
|
sync
|
||||||
|
|
||||||
|
ADD https://teamcity.jetbrains.com/update/buildAgent.zip /buildAgent.zip
|
||||||
|
RUN unzip -q /buildAgent.zip -d /opt/buildagent && \
|
||||||
|
mv /opt/buildagent/conf /opt/buildagent/conf_dist && \
|
||||||
|
rm -rfv /buildAgent.zip
|
||||||
|
|
||||||
|
RUN useradd -m buildagent && \
|
||||||
|
chmod +x /opt/buildagent/bin/*.sh && \
|
||||||
|
chmod +x /run-agent.sh /run-services.sh && sync
|
||||||
|
|
||||||
|
##################################################################
|
||||||
|
# Node.js 12.x
|
||||||
|
##################################################################
|
||||||
|
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - && \
|
||||||
|
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - && \
|
||||||
|
echo "deb https://nightly.yarnpkg.com/debian/ nightly main" > /etc/apt/sources.list.d/yarn.list && \
|
||||||
|
apt-get update && \
|
||||||
|
apt-get install -y nodejs yarn && \
|
||||||
|
npm install -g npm
|
||||||
|
|
||||||
|
RUN node -v && \
|
||||||
|
npm -v
|
||||||
|
|
||||||
|
##################################################################
|
||||||
|
# cleaninig up
|
||||||
|
##################################################################
|
||||||
|
RUN apt clean -y && \
|
||||||
|
apt-get clean all && \
|
||||||
|
apt autoclean -y && \
|
||||||
|
rm -rfv /var/lib/apt/lists/* && \
|
||||||
|
rm -rfv /var/cache/apt/archives/*.deb && \
|
||||||
|
rm -rfv /tmp/deb/* && \
|
||||||
|
rm -rfv /tmp/composer-setup.php && \
|
||||||
|
rm -rfv /tmp/amxx_base_latest.tar.gz && \
|
||||||
|
rm -rfv /tmp/atlassian-plugin-sdk.deb && \
|
||||||
|
rm -rfv /tmp/addons
|
||||||
|
|
||||||
|
CMD ["/run-services.sh"]
|
||||||
|
|
||||||
|
EXPOSE 9090
|
5
linux/teamcity/agent/node12/Makefile
Normal file
5
linux/teamcity/agent/node12/Makefile
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
all: app
|
||||||
|
|
||||||
|
app:
|
||||||
|
docker-compose build --compress
|
||||||
|
docker-compose push
|
93
linux/teamcity/agent/node12/README.md
Normal file
93
linux/teamcity/agent/node12/README.md
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
## TeamCity Minimal Build Agent
|
||||||
|
|
||||||
|
[<img src="http://jb.gg/badges/official.svg" height="20"/>](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
|
||||||
|
|
||||||
|
This is an official [JetBrains TeamCity](https://www.jetbrains.com/teamcity/) minimal build agent image.
|
||||||
|
|
||||||
|
<img src="https://raw.githubusercontent.com/JetBrains/teamcity-docker-images/master/logo/GitHub.png" height="20" align="center"/> More details about tags and components are [here](https://github.com/JetBrains/teamcity-docker-images/blob/master/generated/teamcity-minimal-agent.md).
|
||||||
|
|
||||||
|
The [TeamCity build agent](https://www.jetbrains.com/help/teamcity/build-agent.html) connects to the TeamCity server and spawns the actual build processes.
|
||||||
|
You can use the ```jetbrains/teamcity-server``` image to run a TeamCity server.
|
||||||
|
|
||||||
|
This minimal image adds just a TeamCity agent without any tools like VCS clients, etc. It is suitable for simple builds and can serve as a base for your custom images. For Java or .NET development we recommend using the default build agent image [jetbrains/teamcity-agent](https://hub.docker.com/r/jetbrains/teamcity-agent/).
|
||||||
|
|
||||||
|
## How to Use This Image
|
||||||
|
|
||||||
|
Pull the TeamCity minimal image from the Docker Hub Repository:
|
||||||
|
|
||||||
|
```
|
||||||
|
jetbrains/teamcity-minimal-agent
|
||||||
|
```
|
||||||
|
|
||||||
|
and use the following command to start a container with TeamCity agent running inside
|
||||||
|
a Linux container:
|
||||||
|
|
||||||
|
```
|
||||||
|
docker run -it -e SERVER_URL="<url to TeamCity server>" \
|
||||||
|
-v <path to agent config folder>:/data/teamcity_agent/conf \
|
||||||
|
jetbrains/teamcity-minimal-agent
|
||||||
|
```
|
||||||
|
|
||||||
|
or a Windows container:
|
||||||
|
```
|
||||||
|
docker run -it -e SERVER_URL="<url to TeamCity server>"
|
||||||
|
-v <path to agent config folder>:C:/BuildAgent/conf
|
||||||
|
jetbrains/teamcity-minimal-agent
|
||||||
|
```
|
||||||
|
where `<url to TeamCity server>` is the full URL for TeamCity server, accessible by the agent. Note that `localhost` will not generally not work as it will refer to the `localhost` inside the container.
|
||||||
|
`<path to agent config folder>` is the host machine directory to serve as the TeamCity agent config directory. We recommend providing this binding in order to persist the agent configuration, e.g. authorization on the server. Note that you should map a different folder for every new agent you create.
|
||||||
|
|
||||||
|
Since version 2020.1, TeamCity agent Docker images __run under a non-root user__. Refer to our [upgrade notes](https://www.jetbrains.com/help/teamcity/upgrade-notes.html#UpgradeNotes-AgentDockerimagesrunundernon-rootuser) for information on possible affected use cases.
|
||||||
|
|
||||||
|
When you run the agent for the first time, you should authorize it via the TeamCity server UI: go to the **Unauthorized Agents** page in your browser. See [more details](https://www.jetbrains.com/help/teamcity/build-agent.html).
|
||||||
|
|
||||||
|
All information about agent authorization is stored in agent's configuration folder. If you stop the container with the agent and then start a new one with the same config folder, the agent's name and authorization state will be preserved.
|
||||||
|
|
||||||
|
TeamCity agent does not need manual upgrade: it will upgrade itself automatically on connecting to an upgraded server.
|
||||||
|
|
||||||
|
### Agent Image Environment Variables
|
||||||
|
|
||||||
|
- **SERVER_URL** - URL of the TeamCity server agent will connect to
|
||||||
|
- **AGENT_NAME** - (optional) Name of the agent in TeamCity UI, autogenerated if omitted
|
||||||
|
- **AGENT_TOKEN** - (optional) Agent authorization token, if unset, the agent should be [authorized](https://www.jetbrains.com/help/teamcity/build-agent.html#BuildAgent-BuildAgentStatus) via TeamCity UI.
|
||||||
|
- **OWN_ADDRESS** - (optional, linux only) IP address build agent binds to, autodetected
|
||||||
|
- **OWN_PORT** - (optional, linux only) Port build agent binds to, 9090 by default
|
||||||
|
|
||||||
|
### Windows Containers Limitations
|
||||||
|
|
||||||
|
The details on the known problems in Windows containers are available in the [TeamCity documentation](https://www.jetbrains.com/help/teamcity/known-issues.html#KnownIssues-WindowsDockerContainers).
|
||||||
|
|
||||||
|
## Customization
|
||||||
|
|
||||||
|
You can customize the image via the usual Docker procedure:
|
||||||
|
|
||||||
|
1. Run the image
|
||||||
|
```
|
||||||
|
docker run -it -e SERVER_URL="<url to TeamCity server>" \
|
||||||
|
-v <path to agent config folder>:/data/teamcity_agent/conf \
|
||||||
|
--name="my-customized-agent" \
|
||||||
|
jetbrains/teamcity-minimal-agent \
|
||||||
|
```
|
||||||
|
2. Enter the container
|
||||||
|
```
|
||||||
|
docker exec -it my-customized-agent bash
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Change whatever you need
|
||||||
|
4. Exit and [create a new image](https://docs.docker.com/engine/reference/commandline/commit/) from the container
|
||||||
|
```
|
||||||
|
docker commit my-customized-agent <the registry where you what to store the image>
|
||||||
|
```
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
The image is available under the [TeamCity license](https://www.jetbrains.com/teamcity/buy/license.html).
|
||||||
|
TeamCity is free for perpetual use with the limitation of 100 build configurations (jobs) and 3 agents. [Licensing details](https://www.jetbrains.com/help/teamcity/licensing-policy.html).
|
||||||
|
|
||||||
|
## Feedback
|
||||||
|
|
||||||
|
Report issues of suggestions to the official TeamCity [issue tracker](https://youtrack.jetbrains.com/issues/TW).
|
||||||
|
|
||||||
|
## Other TeamCity Images
|
||||||
|
* [TeamCity Server](https://hub.docker.com/r/jetbrains/teamcity-server/)
|
||||||
|
* [Build Agent](https://hub.docker.com/r/jetbrains/teamcity-agent/)
|
6
linux/teamcity/agent/node12/docker-compose.yml
Normal file
6
linux/teamcity/agent/node12/docker-compose.yml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
version: '3.9'
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
image: "epicmorg/teamcity-agent:node12"
|
||||||
|
build:
|
||||||
|
context: .
|
90
linux/teamcity/agent/node12/run-agent.sh
Executable file
90
linux/teamcity/agent/node12/run-agent.sh
Executable file
@ -0,0 +1,90 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
check() {
|
||||||
|
if [[ $? != 0 ]]; then
|
||||||
|
echo "Error! Stopping the script."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
configure() {
|
||||||
|
if [[ $# -gt 0 ]]; then
|
||||||
|
echo "run agent.sh configure $@"
|
||||||
|
${AGENT_DIST}/bin/agent.sh configure "$@"; check
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
reconfigure() {
|
||||||
|
declare -a opts
|
||||||
|
[[ -n "${SERVER_URL}" ]] && opts[${#opts[@]}]='--server-url' && opts[${#opts[@]}]="$SERVER_URL"
|
||||||
|
[[ -n "${AGENT_TOKEN}" ]] && opts[${#opts[@]}]='--auth-token' && opts[${#opts[@]}]="$AGENT_TOKEN"
|
||||||
|
[[ -n "${AGENT_NAME}" ]] && opts[${#opts[@]}]='--name' && opts[${#opts[@]}]="$AGENT_NAME"
|
||||||
|
[[ -n "${OWN_ADDRESS}" ]] && opts[${#opts[@]}]='--ownAddress' && opts[${#opts[@]}]="$OWN_ADDRESS"
|
||||||
|
[[ -n "${OWN_PORT}" ]] && opts[${#opts[@]}]='--ownPort' && opts[${#opts[@]}]="$OWN_PORT"
|
||||||
|
if [[ 0 -ne "${#opts[@]}" ]]; then
|
||||||
|
# Using sed to strip double quotes produced by docker-compose
|
||||||
|
for i in $(seq 0 $(expr ${#opts[@]} - 1)); do
|
||||||
|
opts[$i]="$(echo "${opts[$i]}" | sed -e 's/""/"/g')"
|
||||||
|
done
|
||||||
|
configure "${opts[@]}"
|
||||||
|
echo "File buildAgent.properties was updated"
|
||||||
|
fi
|
||||||
|
for AGENT_OPT in ${AGENT_OPTS}; do
|
||||||
|
echo ${AGENT_OPT} >> ${CONFIG_DIR}/buildAgent.properties
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
prepare_conf() {
|
||||||
|
echo "Will prepare agent config" ;
|
||||||
|
cp -p ${AGENT_DIST}/conf_dist/*.* ${CONFIG_DIR}/; check
|
||||||
|
cp -p ${CONFIG_DIR}/buildAgent.dist.properties ${CONFIG_DIR}/buildAgent.properties; check
|
||||||
|
reconfigure
|
||||||
|
echo "File buildAgent.properties was created and updated" ;
|
||||||
|
}
|
||||||
|
|
||||||
|
AGENT_DIST=/opt/buildagent
|
||||||
|
|
||||||
|
CONFIG_DIR=/data/teamcity_agent/conf
|
||||||
|
|
||||||
|
LOG_DIR=/opt/buildagent/logs
|
||||||
|
|
||||||
|
|
||||||
|
rm -f ${LOG_DIR}/*.pid
|
||||||
|
|
||||||
|
if [ -f ${CONFIG_DIR}/buildAgent.properties ] ; then
|
||||||
|
echo "File buildAgent.properties was found in ${CONFIG_DIR}" ;
|
||||||
|
reconfigure
|
||||||
|
else
|
||||||
|
echo "Will create new buildAgent.properties using distributive" ;
|
||||||
|
if [[ -n "${SERVER_URL}" ]]; then
|
||||||
|
echo "TeamCity URL is provided: ${SERVER_URL}"
|
||||||
|
else
|
||||||
|
echo "TeamCity URL is not provided, but is required."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
prepare_conf
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$RUN_AS_BUILDAGENT" -o "$RUN_AS_BUILDAGENT" = "false" -o "$RUN_AS_BUILDAGENT" = "no" ]; then
|
||||||
|
${AGENT_DIST}/bin/agent.sh start
|
||||||
|
else
|
||||||
|
echo "Make sure build agent directory ${AGENT_DIST} is owned by buildagent user"
|
||||||
|
chown -R buildagent:buildagent ${AGENT_DIST}
|
||||||
|
check; sync
|
||||||
|
|
||||||
|
echo "Start build agent under buildagent user"
|
||||||
|
sudo -E -u buildagent HOME=/home/buildagent ${AGENT_DIST}/bin/agent.sh start
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
while [ ! -f ${LOG_DIR}/teamcity-agent.log ];
|
||||||
|
do
|
||||||
|
echo -n "."
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
|
||||||
|
trap '${AGENT_DIST}/bin/agent.sh stop force; while ps -p $(cat $(ls -1 ${LOG_DIR}/*.pid)) &>/dev/null; do sleep 1; done; kill %%' SIGINT SIGTERM SIGHUP
|
||||||
|
|
||||||
|
tail -qF ${LOG_DIR}/teamcity-agent.log &
|
||||||
|
wait
|
15
linux/teamcity/agent/node12/run-services.sh
Executable file
15
linux/teamcity/agent/node12/run-services.sh
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo '/run-services.sh'
|
||||||
|
|
||||||
|
for entry in /services/*.sh
|
||||||
|
do
|
||||||
|
if [[ -f "$entry" ]]; then
|
||||||
|
echo "$entry"
|
||||||
|
[[ ! -x "$entry" ]] && (chmod +x "$entry"; sync)
|
||||||
|
"$entry"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
echo '/run-agent.sh'
|
||||||
|
exec '/run-agent.sh'
|
7
linux/teamcity/agent/node12/sources.sid.list
Normal file
7
linux/teamcity/agent/node12/sources.sid.list
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#main
|
||||||
|
deb http://ftp.ru.debian.org/debian/ sid main contrib non-free
|
||||||
|
deb-src http://ftp.ru.debian.org/debian/ sid main contrib non-free
|
||||||
|
|
||||||
|
##multimedia
|
||||||
|
#deb http://ftp.ru.debian.org/debian-multimedia/ sid main non-free
|
||||||
|
#deb-src http://ftp.ru.debian.org/debian-multimedia/ sid main non-free
|
73
linux/teamcity/agent/node14/Dockerfile
Normal file
73
linux/teamcity/agent/node14/Dockerfile
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
FROM epicmorg/devel:jdk11
|
||||||
|
LABEL maintainer="EpicMorg DevTeam, developer@epicm.org"
|
||||||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
##################################################################
|
||||||
|
# sid sources list
|
||||||
|
##################################################################
|
||||||
|
#RUN rm -rfv /etc/apt/sources.list
|
||||||
|
COPY sources.sid.list /etc/apt/sources.list.d/
|
||||||
|
RUN apt update && \
|
||||||
|
apt autoremove -y && \
|
||||||
|
apt dist-upgrade -y && \
|
||||||
|
apt autoremove -y
|
||||||
|
|
||||||
|
##################################################################
|
||||||
|
# teamcity minimal agent
|
||||||
|
##################################################################
|
||||||
|
LABEL dockerImage.teamcity.version="latest" \
|
||||||
|
dockerImage.teamcity.buildNumber="latest"
|
||||||
|
|
||||||
|
VOLUME /data/teamcity_agent/conf
|
||||||
|
|
||||||
|
ENV CONFIG_FILE=/data/teamcity_agent/conf/buildAgent.properties
|
||||||
|
ENV LANG=C.UTF-8
|
||||||
|
ENV GIT_SSH_VARIANT=ssh
|
||||||
|
|
||||||
|
COPY run-agent.sh /run-agent.sh
|
||||||
|
RUN chmod +x /run-agent.sh && \
|
||||||
|
sync
|
||||||
|
|
||||||
|
COPY run-services.sh /run-services.sh
|
||||||
|
RUN chmod +x /run-services.sh && \
|
||||||
|
sync
|
||||||
|
|
||||||
|
ADD https://teamcity.jetbrains.com/update/buildAgent.zip /buildAgent.zip
|
||||||
|
RUN unzip -q /buildAgent.zip -d /opt/buildagent && \
|
||||||
|
mv /opt/buildagent/conf /opt/buildagent/conf_dist && \
|
||||||
|
rm -rfv /buildAgent.zip
|
||||||
|
|
||||||
|
RUN useradd -m buildagent && \
|
||||||
|
chmod +x /opt/buildagent/bin/*.sh && \
|
||||||
|
chmod +x /run-agent.sh /run-services.sh && sync
|
||||||
|
|
||||||
|
##################################################################
|
||||||
|
# Node.js 14.x
|
||||||
|
##################################################################
|
||||||
|
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - && \
|
||||||
|
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - && \
|
||||||
|
echo "deb https://nightly.yarnpkg.com/debian/ nightly main" > /etc/apt/sources.list.d/yarn.list && \
|
||||||
|
apt-get update && \
|
||||||
|
apt-get install -y nodejs yarn && \
|
||||||
|
npm install -g npm
|
||||||
|
|
||||||
|
RUN node -v && \
|
||||||
|
npm -v
|
||||||
|
|
||||||
|
##################################################################
|
||||||
|
# cleaninig up
|
||||||
|
##################################################################
|
||||||
|
RUN apt clean -y && \
|
||||||
|
apt-get clean all && \
|
||||||
|
apt autoclean -y && \
|
||||||
|
rm -rfv /var/lib/apt/lists/* && \
|
||||||
|
rm -rfv /var/cache/apt/archives/*.deb && \
|
||||||
|
rm -rfv /tmp/deb/* && \
|
||||||
|
rm -rfv /tmp/composer-setup.php && \
|
||||||
|
rm -rfv /tmp/amxx_base_latest.tar.gz && \
|
||||||
|
rm -rfv /tmp/atlassian-plugin-sdk.deb && \
|
||||||
|
rm -rfv /tmp/addons
|
||||||
|
|
||||||
|
CMD ["/run-services.sh"]
|
||||||
|
|
||||||
|
EXPOSE 9090
|
5
linux/teamcity/agent/node14/Makefile
Normal file
5
linux/teamcity/agent/node14/Makefile
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
all: app
|
||||||
|
|
||||||
|
app:
|
||||||
|
docker-compose build --compress
|
||||||
|
docker-compose push
|
93
linux/teamcity/agent/node14/README.md
Normal file
93
linux/teamcity/agent/node14/README.md
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
## TeamCity Minimal Build Agent
|
||||||
|
|
||||||
|
[<img src="http://jb.gg/badges/official.svg" height="20"/>](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
|
||||||
|
|
||||||
|
This is an official [JetBrains TeamCity](https://www.jetbrains.com/teamcity/) minimal build agent image.
|
||||||
|
|
||||||
|
<img src="https://raw.githubusercontent.com/JetBrains/teamcity-docker-images/master/logo/GitHub.png" height="20" align="center"/> More details about tags and components are [here](https://github.com/JetBrains/teamcity-docker-images/blob/master/generated/teamcity-minimal-agent.md).
|
||||||
|
|
||||||
|
The [TeamCity build agent](https://www.jetbrains.com/help/teamcity/build-agent.html) connects to the TeamCity server and spawns the actual build processes.
|
||||||
|
You can use the ```jetbrains/teamcity-server``` image to run a TeamCity server.
|
||||||
|
|
||||||
|
This minimal image adds just a TeamCity agent without any tools like VCS clients, etc. It is suitable for simple builds and can serve as a base for your custom images. For Java or .NET development we recommend using the default build agent image [jetbrains/teamcity-agent](https://hub.docker.com/r/jetbrains/teamcity-agent/).
|
||||||
|
|
||||||
|
## How to Use This Image
|
||||||
|
|
||||||
|
Pull the TeamCity minimal image from the Docker Hub Repository:
|
||||||
|
|
||||||
|
```
|
||||||
|
jetbrains/teamcity-minimal-agent
|
||||||
|
```
|
||||||
|
|
||||||
|
and use the following command to start a container with TeamCity agent running inside
|
||||||
|
a Linux container:
|
||||||
|
|
||||||
|
```
|
||||||
|
docker run -it -e SERVER_URL="<url to TeamCity server>" \
|
||||||
|
-v <path to agent config folder>:/data/teamcity_agent/conf \
|
||||||
|
jetbrains/teamcity-minimal-agent
|
||||||
|
```
|
||||||
|
|
||||||
|
or a Windows container:
|
||||||
|
```
|
||||||
|
docker run -it -e SERVER_URL="<url to TeamCity server>"
|
||||||
|
-v <path to agent config folder>:C:/BuildAgent/conf
|
||||||
|
jetbrains/teamcity-minimal-agent
|
||||||
|
```
|
||||||
|
where `<url to TeamCity server>` is the full URL for TeamCity server, accessible by the agent. Note that `localhost` will not generally not work as it will refer to the `localhost` inside the container.
|
||||||
|
`<path to agent config folder>` is the host machine directory to serve as the TeamCity agent config directory. We recommend providing this binding in order to persist the agent configuration, e.g. authorization on the server. Note that you should map a different folder for every new agent you create.
|
||||||
|
|
||||||
|
Since version 2020.1, TeamCity agent Docker images __run under a non-root user__. Refer to our [upgrade notes](https://www.jetbrains.com/help/teamcity/upgrade-notes.html#UpgradeNotes-AgentDockerimagesrunundernon-rootuser) for information on possible affected use cases.
|
||||||
|
|
||||||
|
When you run the agent for the first time, you should authorize it via the TeamCity server UI: go to the **Unauthorized Agents** page in your browser. See [more details](https://www.jetbrains.com/help/teamcity/build-agent.html).
|
||||||
|
|
||||||
|
All information about agent authorization is stored in agent's configuration folder. If you stop the container with the agent and then start a new one with the same config folder, the agent's name and authorization state will be preserved.
|
||||||
|
|
||||||
|
TeamCity agent does not need manual upgrade: it will upgrade itself automatically on connecting to an upgraded server.
|
||||||
|
|
||||||
|
### Agent Image Environment Variables
|
||||||
|
|
||||||
|
- **SERVER_URL** - URL of the TeamCity server agent will connect to
|
||||||
|
- **AGENT_NAME** - (optional) Name of the agent in TeamCity UI, autogenerated if omitted
|
||||||
|
- **AGENT_TOKEN** - (optional) Agent authorization token, if unset, the agent should be [authorized](https://www.jetbrains.com/help/teamcity/build-agent.html#BuildAgent-BuildAgentStatus) via TeamCity UI.
|
||||||
|
- **OWN_ADDRESS** - (optional, linux only) IP address build agent binds to, autodetected
|
||||||
|
- **OWN_PORT** - (optional, linux only) Port build agent binds to, 9090 by default
|
||||||
|
|
||||||
|
### Windows Containers Limitations
|
||||||
|
|
||||||
|
The details on the known problems in Windows containers are available in the [TeamCity documentation](https://www.jetbrains.com/help/teamcity/known-issues.html#KnownIssues-WindowsDockerContainers).
|
||||||
|
|
||||||
|
## Customization
|
||||||
|
|
||||||
|
You can customize the image via the usual Docker procedure:
|
||||||
|
|
||||||
|
1. Run the image
|
||||||
|
```
|
||||||
|
docker run -it -e SERVER_URL="<url to TeamCity server>" \
|
||||||
|
-v <path to agent config folder>:/data/teamcity_agent/conf \
|
||||||
|
--name="my-customized-agent" \
|
||||||
|
jetbrains/teamcity-minimal-agent \
|
||||||
|
```
|
||||||
|
2. Enter the container
|
||||||
|
```
|
||||||
|
docker exec -it my-customized-agent bash
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Change whatever you need
|
||||||
|
4. Exit and [create a new image](https://docs.docker.com/engine/reference/commandline/commit/) from the container
|
||||||
|
```
|
||||||
|
docker commit my-customized-agent <the registry where you what to store the image>
|
||||||
|
```
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
The image is available under the [TeamCity license](https://www.jetbrains.com/teamcity/buy/license.html).
|
||||||
|
TeamCity is free for perpetual use with the limitation of 100 build configurations (jobs) and 3 agents. [Licensing details](https://www.jetbrains.com/help/teamcity/licensing-policy.html).
|
||||||
|
|
||||||
|
## Feedback
|
||||||
|
|
||||||
|
Report issues of suggestions to the official TeamCity [issue tracker](https://youtrack.jetbrains.com/issues/TW).
|
||||||
|
|
||||||
|
## Other TeamCity Images
|
||||||
|
* [TeamCity Server](https://hub.docker.com/r/jetbrains/teamcity-server/)
|
||||||
|
* [Build Agent](https://hub.docker.com/r/jetbrains/teamcity-agent/)
|
6
linux/teamcity/agent/node14/docker-compose.yml
Normal file
6
linux/teamcity/agent/node14/docker-compose.yml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
version: '3.9'
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
image: "epicmorg/teamcity-agent:node14"
|
||||||
|
build:
|
||||||
|
context: .
|
90
linux/teamcity/agent/node14/run-agent.sh
Executable file
90
linux/teamcity/agent/node14/run-agent.sh
Executable file
@ -0,0 +1,90 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
check() {
|
||||||
|
if [[ $? != 0 ]]; then
|
||||||
|
echo "Error! Stopping the script."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
configure() {
|
||||||
|
if [[ $# -gt 0 ]]; then
|
||||||
|
echo "run agent.sh configure $@"
|
||||||
|
${AGENT_DIST}/bin/agent.sh configure "$@"; check
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
reconfigure() {
|
||||||
|
declare -a opts
|
||||||
|
[[ -n "${SERVER_URL}" ]] && opts[${#opts[@]}]='--server-url' && opts[${#opts[@]}]="$SERVER_URL"
|
||||||
|
[[ -n "${AGENT_TOKEN}" ]] && opts[${#opts[@]}]='--auth-token' && opts[${#opts[@]}]="$AGENT_TOKEN"
|
||||||
|
[[ -n "${AGENT_NAME}" ]] && opts[${#opts[@]}]='--name' && opts[${#opts[@]}]="$AGENT_NAME"
|
||||||
|
[[ -n "${OWN_ADDRESS}" ]] && opts[${#opts[@]}]='--ownAddress' && opts[${#opts[@]}]="$OWN_ADDRESS"
|
||||||
|
[[ -n "${OWN_PORT}" ]] && opts[${#opts[@]}]='--ownPort' && opts[${#opts[@]}]="$OWN_PORT"
|
||||||
|
if [[ 0 -ne "${#opts[@]}" ]]; then
|
||||||
|
# Using sed to strip double quotes produced by docker-compose
|
||||||
|
for i in $(seq 0 $(expr ${#opts[@]} - 1)); do
|
||||||
|
opts[$i]="$(echo "${opts[$i]}" | sed -e 's/""/"/g')"
|
||||||
|
done
|
||||||
|
configure "${opts[@]}"
|
||||||
|
echo "File buildAgent.properties was updated"
|
||||||
|
fi
|
||||||
|
for AGENT_OPT in ${AGENT_OPTS}; do
|
||||||
|
echo ${AGENT_OPT} >> ${CONFIG_DIR}/buildAgent.properties
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
prepare_conf() {
|
||||||
|
echo "Will prepare agent config" ;
|
||||||
|
cp -p ${AGENT_DIST}/conf_dist/*.* ${CONFIG_DIR}/; check
|
||||||
|
cp -p ${CONFIG_DIR}/buildAgent.dist.properties ${CONFIG_DIR}/buildAgent.properties; check
|
||||||
|
reconfigure
|
||||||
|
echo "File buildAgent.properties was created and updated" ;
|
||||||
|
}
|
||||||
|
|
||||||
|
AGENT_DIST=/opt/buildagent
|
||||||
|
|
||||||
|
CONFIG_DIR=/data/teamcity_agent/conf
|
||||||
|
|
||||||
|
LOG_DIR=/opt/buildagent/logs
|
||||||
|
|
||||||
|
|
||||||
|
rm -f ${LOG_DIR}/*.pid
|
||||||
|
|
||||||
|
if [ -f ${CONFIG_DIR}/buildAgent.properties ] ; then
|
||||||
|
echo "File buildAgent.properties was found in ${CONFIG_DIR}" ;
|
||||||
|
reconfigure
|
||||||
|
else
|
||||||
|
echo "Will create new buildAgent.properties using distributive" ;
|
||||||
|
if [[ -n "${SERVER_URL}" ]]; then
|
||||||
|
echo "TeamCity URL is provided: ${SERVER_URL}"
|
||||||
|
else
|
||||||
|
echo "TeamCity URL is not provided, but is required."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
prepare_conf
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$RUN_AS_BUILDAGENT" -o "$RUN_AS_BUILDAGENT" = "false" -o "$RUN_AS_BUILDAGENT" = "no" ]; then
|
||||||
|
${AGENT_DIST}/bin/agent.sh start
|
||||||
|
else
|
||||||
|
echo "Make sure build agent directory ${AGENT_DIST} is owned by buildagent user"
|
||||||
|
chown -R buildagent:buildagent ${AGENT_DIST}
|
||||||
|
check; sync
|
||||||
|
|
||||||
|
echo "Start build agent under buildagent user"
|
||||||
|
sudo -E -u buildagent HOME=/home/buildagent ${AGENT_DIST}/bin/agent.sh start
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
while [ ! -f ${LOG_DIR}/teamcity-agent.log ];
|
||||||
|
do
|
||||||
|
echo -n "."
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
|
||||||
|
trap '${AGENT_DIST}/bin/agent.sh stop force; while ps -p $(cat $(ls -1 ${LOG_DIR}/*.pid)) &>/dev/null; do sleep 1; done; kill %%' SIGINT SIGTERM SIGHUP
|
||||||
|
|
||||||
|
tail -qF ${LOG_DIR}/teamcity-agent.log &
|
||||||
|
wait
|
15
linux/teamcity/agent/node14/run-services.sh
Executable file
15
linux/teamcity/agent/node14/run-services.sh
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo '/run-services.sh'
|
||||||
|
|
||||||
|
for entry in /services/*.sh
|
||||||
|
do
|
||||||
|
if [[ -f "$entry" ]]; then
|
||||||
|
echo "$entry"
|
||||||
|
[[ ! -x "$entry" ]] && (chmod +x "$entry"; sync)
|
||||||
|
"$entry"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
echo '/run-agent.sh'
|
||||||
|
exec '/run-agent.sh'
|
7
linux/teamcity/agent/node14/sources.sid.list
Normal file
7
linux/teamcity/agent/node14/sources.sid.list
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#main
|
||||||
|
deb http://ftp.ru.debian.org/debian/ sid main contrib non-free
|
||||||
|
deb-src http://ftp.ru.debian.org/debian/ sid main contrib non-free
|
||||||
|
|
||||||
|
##multimedia
|
||||||
|
#deb http://ftp.ru.debian.org/debian-multimedia/ sid main non-free
|
||||||
|
#deb-src http://ftp.ru.debian.org/debian-multimedia/ sid main non-free
|
73
linux/teamcity/agent/node15/Dockerfile
Normal file
73
linux/teamcity/agent/node15/Dockerfile
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
FROM epicmorg/devel:jdk11
|
||||||
|
LABEL maintainer="EpicMorg DevTeam, developer@epicm.org"
|
||||||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
##################################################################
|
||||||
|
# sid sources list
|
||||||
|
##################################################################
|
||||||
|
#RUN rm -rfv /etc/apt/sources.list
|
||||||
|
COPY sources.sid.list /etc/apt/sources.list.d/
|
||||||
|
RUN apt update && \
|
||||||
|
apt autoremove -y && \
|
||||||
|
apt dist-upgrade -y && \
|
||||||
|
apt autoremove -y
|
||||||
|
|
||||||
|
##################################################################
|
||||||
|
# teamcity minimal agent
|
||||||
|
##################################################################
|
||||||
|
LABEL dockerImage.teamcity.version="latest" \
|
||||||
|
dockerImage.teamcity.buildNumber="latest"
|
||||||
|
|
||||||
|
VOLUME /data/teamcity_agent/conf
|
||||||
|
|
||||||
|
ENV CONFIG_FILE=/data/teamcity_agent/conf/buildAgent.properties
|
||||||
|
ENV LANG=C.UTF-8
|
||||||
|
ENV GIT_SSH_VARIANT=ssh
|
||||||
|
|
||||||
|
COPY run-agent.sh /run-agent.sh
|
||||||
|
RUN chmod +x /run-agent.sh && \
|
||||||
|
sync
|
||||||
|
|
||||||
|
COPY run-services.sh /run-services.sh
|
||||||
|
RUN chmod +x /run-services.sh && \
|
||||||
|
sync
|
||||||
|
|
||||||
|
ADD https://teamcity.jetbrains.com/update/buildAgent.zip /buildAgent.zip
|
||||||
|
RUN unzip -q /buildAgent.zip -d /opt/buildagent && \
|
||||||
|
mv /opt/buildagent/conf /opt/buildagent/conf_dist && \
|
||||||
|
rm -rfv /buildAgent.zip
|
||||||
|
|
||||||
|
RUN useradd -m buildagent && \
|
||||||
|
chmod +x /opt/buildagent/bin/*.sh && \
|
||||||
|
chmod +x /run-agent.sh /run-services.sh && sync
|
||||||
|
|
||||||
|
##################################################################
|
||||||
|
# Node.js 15.x
|
||||||
|
##################################################################
|
||||||
|
RUN curl -sL https://deb.nodesource.com/setup_15.x | bash - && \
|
||||||
|
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - && \
|
||||||
|
echo "deb https://nightly.yarnpkg.com/debian/ nightly main" > /etc/apt/sources.list.d/yarn.list && \
|
||||||
|
apt-get update && \
|
||||||
|
apt-get install -y nodejs yarn && \
|
||||||
|
npm install -g npm
|
||||||
|
|
||||||
|
RUN node -v && \
|
||||||
|
npm -v
|
||||||
|
|
||||||
|
##################################################################
|
||||||
|
# cleaninig up
|
||||||
|
##################################################################
|
||||||
|
RUN apt clean -y && \
|
||||||
|
apt-get clean all && \
|
||||||
|
apt autoclean -y && \
|
||||||
|
rm -rfv /var/lib/apt/lists/* && \
|
||||||
|
rm -rfv /var/cache/apt/archives/*.deb && \
|
||||||
|
rm -rfv /tmp/deb/* && \
|
||||||
|
rm -rfv /tmp/composer-setup.php && \
|
||||||
|
rm -rfv /tmp/amxx_base_latest.tar.gz && \
|
||||||
|
rm -rfv /tmp/atlassian-plugin-sdk.deb && \
|
||||||
|
rm -rfv /tmp/addons
|
||||||
|
|
||||||
|
CMD ["/run-services.sh"]
|
||||||
|
|
||||||
|
EXPOSE 9090
|
5
linux/teamcity/agent/node15/Makefile
Normal file
5
linux/teamcity/agent/node15/Makefile
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
all: app
|
||||||
|
|
||||||
|
app:
|
||||||
|
docker-compose build --compress
|
||||||
|
docker-compose push
|
93
linux/teamcity/agent/node15/README.md
Normal file
93
linux/teamcity/agent/node15/README.md
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
## TeamCity Minimal Build Agent
|
||||||
|
|
||||||
|
[<img src="http://jb.gg/badges/official.svg" height="20"/>](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
|
||||||
|
|
||||||
|
This is an official [JetBrains TeamCity](https://www.jetbrains.com/teamcity/) minimal build agent image.
|
||||||
|
|
||||||
|
<img src="https://raw.githubusercontent.com/JetBrains/teamcity-docker-images/master/logo/GitHub.png" height="20" align="center"/> More details about tags and components are [here](https://github.com/JetBrains/teamcity-docker-images/blob/master/generated/teamcity-minimal-agent.md).
|
||||||
|
|
||||||
|
The [TeamCity build agent](https://www.jetbrains.com/help/teamcity/build-agent.html) connects to the TeamCity server and spawns the actual build processes.
|
||||||
|
You can use the ```jetbrains/teamcity-server``` image to run a TeamCity server.
|
||||||
|
|
||||||
|
This minimal image adds just a TeamCity agent without any tools like VCS clients, etc. It is suitable for simple builds and can serve as a base for your custom images. For Java or .NET development we recommend using the default build agent image [jetbrains/teamcity-agent](https://hub.docker.com/r/jetbrains/teamcity-agent/).
|
||||||
|
|
||||||
|
## How to Use This Image
|
||||||
|
|
||||||
|
Pull the TeamCity minimal image from the Docker Hub Repository:
|
||||||
|
|
||||||
|
```
|
||||||
|
jetbrains/teamcity-minimal-agent
|
||||||
|
```
|
||||||
|
|
||||||
|
and use the following command to start a container with TeamCity agent running inside
|
||||||
|
a Linux container:
|
||||||
|
|
||||||
|
```
|
||||||
|
docker run -it -e SERVER_URL="<url to TeamCity server>" \
|
||||||
|
-v <path to agent config folder>:/data/teamcity_agent/conf \
|
||||||
|
jetbrains/teamcity-minimal-agent
|
||||||
|
```
|
||||||
|
|
||||||
|
or a Windows container:
|
||||||
|
```
|
||||||
|
docker run -it -e SERVER_URL="<url to TeamCity server>"
|
||||||
|
-v <path to agent config folder>:C:/BuildAgent/conf
|
||||||
|
jetbrains/teamcity-minimal-agent
|
||||||
|
```
|
||||||
|
where `<url to TeamCity server>` is the full URL for TeamCity server, accessible by the agent. Note that `localhost` will not generally not work as it will refer to the `localhost` inside the container.
|
||||||
|
`<path to agent config folder>` is the host machine directory to serve as the TeamCity agent config directory. We recommend providing this binding in order to persist the agent configuration, e.g. authorization on the server. Note that you should map a different folder for every new agent you create.
|
||||||
|
|
||||||
|
Since version 2020.1, TeamCity agent Docker images __run under a non-root user__. Refer to our [upgrade notes](https://www.jetbrains.com/help/teamcity/upgrade-notes.html#UpgradeNotes-AgentDockerimagesrunundernon-rootuser) for information on possible affected use cases.
|
||||||
|
|
||||||
|
When you run the agent for the first time, you should authorize it via the TeamCity server UI: go to the **Unauthorized Agents** page in your browser. See [more details](https://www.jetbrains.com/help/teamcity/build-agent.html).
|
||||||
|
|
||||||
|
All information about agent authorization is stored in agent's configuration folder. If you stop the container with the agent and then start a new one with the same config folder, the agent's name and authorization state will be preserved.
|
||||||
|
|
||||||
|
TeamCity agent does not need manual upgrade: it will upgrade itself automatically on connecting to an upgraded server.
|
||||||
|
|
||||||
|
### Agent Image Environment Variables
|
||||||
|
|
||||||
|
- **SERVER_URL** - URL of the TeamCity server agent will connect to
|
||||||
|
- **AGENT_NAME** - (optional) Name of the agent in TeamCity UI, autogenerated if omitted
|
||||||
|
- **AGENT_TOKEN** - (optional) Agent authorization token, if unset, the agent should be [authorized](https://www.jetbrains.com/help/teamcity/build-agent.html#BuildAgent-BuildAgentStatus) via TeamCity UI.
|
||||||
|
- **OWN_ADDRESS** - (optional, linux only) IP address build agent binds to, autodetected
|
||||||
|
- **OWN_PORT** - (optional, linux only) Port build agent binds to, 9090 by default
|
||||||
|
|
||||||
|
### Windows Containers Limitations
|
||||||
|
|
||||||
|
The details on the known problems in Windows containers are available in the [TeamCity documentation](https://www.jetbrains.com/help/teamcity/known-issues.html#KnownIssues-WindowsDockerContainers).
|
||||||
|
|
||||||
|
## Customization
|
||||||
|
|
||||||
|
You can customize the image via the usual Docker procedure:
|
||||||
|
|
||||||
|
1. Run the image
|
||||||
|
```
|
||||||
|
docker run -it -e SERVER_URL="<url to TeamCity server>" \
|
||||||
|
-v <path to agent config folder>:/data/teamcity_agent/conf \
|
||||||
|
--name="my-customized-agent" \
|
||||||
|
jetbrains/teamcity-minimal-agent \
|
||||||
|
```
|
||||||
|
2. Enter the container
|
||||||
|
```
|
||||||
|
docker exec -it my-customized-agent bash
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Change whatever you need
|
||||||
|
4. Exit and [create a new image](https://docs.docker.com/engine/reference/commandline/commit/) from the container
|
||||||
|
```
|
||||||
|
docker commit my-customized-agent <the registry where you what to store the image>
|
||||||
|
```
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
The image is available under the [TeamCity license](https://www.jetbrains.com/teamcity/buy/license.html).
|
||||||
|
TeamCity is free for perpetual use with the limitation of 100 build configurations (jobs) and 3 agents. [Licensing details](https://www.jetbrains.com/help/teamcity/licensing-policy.html).
|
||||||
|
|
||||||
|
## Feedback
|
||||||
|
|
||||||
|
Report issues of suggestions to the official TeamCity [issue tracker](https://youtrack.jetbrains.com/issues/TW).
|
||||||
|
|
||||||
|
## Other TeamCity Images
|
||||||
|
* [TeamCity Server](https://hub.docker.com/r/jetbrains/teamcity-server/)
|
||||||
|
* [Build Agent](https://hub.docker.com/r/jetbrains/teamcity-agent/)
|
6
linux/teamcity/agent/node15/docker-compose.yml
Normal file
6
linux/teamcity/agent/node15/docker-compose.yml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
version: '3.9'
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
image: "epicmorg/teamcity-agent:node15"
|
||||||
|
build:
|
||||||
|
context: .
|
90
linux/teamcity/agent/node15/run-agent.sh
Executable file
90
linux/teamcity/agent/node15/run-agent.sh
Executable file
@ -0,0 +1,90 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
check() {
|
||||||
|
if [[ $? != 0 ]]; then
|
||||||
|
echo "Error! Stopping the script."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
configure() {
|
||||||
|
if [[ $# -gt 0 ]]; then
|
||||||
|
echo "run agent.sh configure $@"
|
||||||
|
${AGENT_DIST}/bin/agent.sh configure "$@"; check
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
reconfigure() {
|
||||||
|
declare -a opts
|
||||||
|
[[ -n "${SERVER_URL}" ]] && opts[${#opts[@]}]='--server-url' && opts[${#opts[@]}]="$SERVER_URL"
|
||||||
|
[[ -n "${AGENT_TOKEN}" ]] && opts[${#opts[@]}]='--auth-token' && opts[${#opts[@]}]="$AGENT_TOKEN"
|
||||||
|
[[ -n "${AGENT_NAME}" ]] && opts[${#opts[@]}]='--name' && opts[${#opts[@]}]="$AGENT_NAME"
|
||||||
|
[[ -n "${OWN_ADDRESS}" ]] && opts[${#opts[@]}]='--ownAddress' && opts[${#opts[@]}]="$OWN_ADDRESS"
|
||||||
|
[[ -n "${OWN_PORT}" ]] && opts[${#opts[@]}]='--ownPort' && opts[${#opts[@]}]="$OWN_PORT"
|
||||||
|
if [[ 0 -ne "${#opts[@]}" ]]; then
|
||||||
|
# Using sed to strip double quotes produced by docker-compose
|
||||||
|
for i in $(seq 0 $(expr ${#opts[@]} - 1)); do
|
||||||
|
opts[$i]="$(echo "${opts[$i]}" | sed -e 's/""/"/g')"
|
||||||
|
done
|
||||||
|
configure "${opts[@]}"
|
||||||
|
echo "File buildAgent.properties was updated"
|
||||||
|
fi
|
||||||
|
for AGENT_OPT in ${AGENT_OPTS}; do
|
||||||
|
echo ${AGENT_OPT} >> ${CONFIG_DIR}/buildAgent.properties
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
prepare_conf() {
|
||||||
|
echo "Will prepare agent config" ;
|
||||||
|
cp -p ${AGENT_DIST}/conf_dist/*.* ${CONFIG_DIR}/; check
|
||||||
|
cp -p ${CONFIG_DIR}/buildAgent.dist.properties ${CONFIG_DIR}/buildAgent.properties; check
|
||||||
|
reconfigure
|
||||||
|
echo "File buildAgent.properties was created and updated" ;
|
||||||
|
}
|
||||||
|
|
||||||
|
AGENT_DIST=/opt/buildagent
|
||||||
|
|
||||||
|
CONFIG_DIR=/data/teamcity_agent/conf
|
||||||
|
|
||||||
|
LOG_DIR=/opt/buildagent/logs
|
||||||
|
|
||||||
|
|
||||||
|
rm -f ${LOG_DIR}/*.pid
|
||||||
|
|
||||||
|
if [ -f ${CONFIG_DIR}/buildAgent.properties ] ; then
|
||||||
|
echo "File buildAgent.properties was found in ${CONFIG_DIR}" ;
|
||||||
|
reconfigure
|
||||||
|
else
|
||||||
|
echo "Will create new buildAgent.properties using distributive" ;
|
||||||
|
if [[ -n "${SERVER_URL}" ]]; then
|
||||||
|
echo "TeamCity URL is provided: ${SERVER_URL}"
|
||||||
|
else
|
||||||
|
echo "TeamCity URL is not provided, but is required."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
prepare_conf
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$RUN_AS_BUILDAGENT" -o "$RUN_AS_BUILDAGENT" = "false" -o "$RUN_AS_BUILDAGENT" = "no" ]; then
|
||||||
|
${AGENT_DIST}/bin/agent.sh start
|
||||||
|
else
|
||||||
|
echo "Make sure build agent directory ${AGENT_DIST} is owned by buildagent user"
|
||||||
|
chown -R buildagent:buildagent ${AGENT_DIST}
|
||||||
|
check; sync
|
||||||
|
|
||||||
|
echo "Start build agent under buildagent user"
|
||||||
|
sudo -E -u buildagent HOME=/home/buildagent ${AGENT_DIST}/bin/agent.sh start
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
while [ ! -f ${LOG_DIR}/teamcity-agent.log ];
|
||||||
|
do
|
||||||
|
echo -n "."
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
|
||||||
|
trap '${AGENT_DIST}/bin/agent.sh stop force; while ps -p $(cat $(ls -1 ${LOG_DIR}/*.pid)) &>/dev/null; do sleep 1; done; kill %%' SIGINT SIGTERM SIGHUP
|
||||||
|
|
||||||
|
tail -qF ${LOG_DIR}/teamcity-agent.log &
|
||||||
|
wait
|
15
linux/teamcity/agent/node15/run-services.sh
Executable file
15
linux/teamcity/agent/node15/run-services.sh
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo '/run-services.sh'
|
||||||
|
|
||||||
|
for entry in /services/*.sh
|
||||||
|
do
|
||||||
|
if [[ -f "$entry" ]]; then
|
||||||
|
echo "$entry"
|
||||||
|
[[ ! -x "$entry" ]] && (chmod +x "$entry"; sync)
|
||||||
|
"$entry"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
echo '/run-agent.sh'
|
||||||
|
exec '/run-agent.sh'
|
7
linux/teamcity/agent/node15/sources.sid.list
Normal file
7
linux/teamcity/agent/node15/sources.sid.list
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#main
|
||||||
|
deb http://ftp.ru.debian.org/debian/ sid main contrib non-free
|
||||||
|
deb-src http://ftp.ru.debian.org/debian/ sid main contrib non-free
|
||||||
|
|
||||||
|
##multimedia
|
||||||
|
#deb http://ftp.ru.debian.org/debian-multimedia/ sid main non-free
|
||||||
|
#deb-src http://ftp.ru.debian.org/debian-multimedia/ sid main non-free
|
73
linux/teamcity/agent/node16/Dockerfile
Normal file
73
linux/teamcity/agent/node16/Dockerfile
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
FROM epicmorg/devel:jdk11
|
||||||
|
LABEL maintainer="EpicMorg DevTeam, developer@epicm.org"
|
||||||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
##################################################################
|
||||||
|
# sid sources list
|
||||||
|
##################################################################
|
||||||
|
#RUN rm -rfv /etc/apt/sources.list
|
||||||
|
COPY sources.sid.list /etc/apt/sources.list.d/
|
||||||
|
RUN apt update && \
|
||||||
|
apt autoremove -y && \
|
||||||
|
apt dist-upgrade -y && \
|
||||||
|
apt autoremove -y
|
||||||
|
|
||||||
|
##################################################################
|
||||||
|
# teamcity minimal agent
|
||||||
|
##################################################################
|
||||||
|
LABEL dockerImage.teamcity.version="latest" \
|
||||||
|
dockerImage.teamcity.buildNumber="latest"
|
||||||
|
|
||||||
|
VOLUME /data/teamcity_agent/conf
|
||||||
|
|
||||||
|
ENV CONFIG_FILE=/data/teamcity_agent/conf/buildAgent.properties
|
||||||
|
ENV LANG=C.UTF-8
|
||||||
|
ENV GIT_SSH_VARIANT=ssh
|
||||||
|
|
||||||
|
COPY run-agent.sh /run-agent.sh
|
||||||
|
RUN chmod +x /run-agent.sh && \
|
||||||
|
sync
|
||||||
|
|
||||||
|
COPY run-services.sh /run-services.sh
|
||||||
|
RUN chmod +x /run-services.sh && \
|
||||||
|
sync
|
||||||
|
|
||||||
|
ADD https://teamcity.jetbrains.com/update/buildAgent.zip /buildAgent.zip
|
||||||
|
RUN unzip -q /buildAgent.zip -d /opt/buildagent && \
|
||||||
|
mv /opt/buildagent/conf /opt/buildagent/conf_dist && \
|
||||||
|
rm -rfv /buildAgent.zip
|
||||||
|
|
||||||
|
RUN useradd -m buildagent && \
|
||||||
|
chmod +x /opt/buildagent/bin/*.sh && \
|
||||||
|
chmod +x /run-agent.sh /run-services.sh && sync
|
||||||
|
|
||||||
|
##################################################################
|
||||||
|
# Node.js 16.x
|
||||||
|
##################################################################
|
||||||
|
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash - && \
|
||||||
|
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - && \
|
||||||
|
echo "deb https://nightly.yarnpkg.com/debian/ nightly main" > /etc/apt/sources.list.d/yarn.list && \
|
||||||
|
apt-get update && \
|
||||||
|
apt-get install -y nodejs yarn && \
|
||||||
|
npm install -g npm
|
||||||
|
|
||||||
|
RUN node -v && \
|
||||||
|
npm -v
|
||||||
|
|
||||||
|
##################################################################
|
||||||
|
# cleaninig up
|
||||||
|
##################################################################
|
||||||
|
RUN apt clean -y && \
|
||||||
|
apt-get clean all && \
|
||||||
|
apt autoclean -y && \
|
||||||
|
rm -rfv /var/lib/apt/lists/* && \
|
||||||
|
rm -rfv /var/cache/apt/archives/*.deb && \
|
||||||
|
rm -rfv /tmp/deb/* && \
|
||||||
|
rm -rfv /tmp/composer-setup.php && \
|
||||||
|
rm -rfv /tmp/amxx_base_latest.tar.gz && \
|
||||||
|
rm -rfv /tmp/atlassian-plugin-sdk.deb && \
|
||||||
|
rm -rfv /tmp/addons
|
||||||
|
|
||||||
|
CMD ["/run-services.sh"]
|
||||||
|
|
||||||
|
EXPOSE 9090
|
5
linux/teamcity/agent/node16/Makefile
Normal file
5
linux/teamcity/agent/node16/Makefile
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
all: app
|
||||||
|
|
||||||
|
app:
|
||||||
|
docker-compose build --compress
|
||||||
|
docker-compose push
|
93
linux/teamcity/agent/node16/README.md
Normal file
93
linux/teamcity/agent/node16/README.md
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
## TeamCity Minimal Build Agent
|
||||||
|
|
||||||
|
[<img src="http://jb.gg/badges/official.svg" height="20"/>](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
|
||||||
|
|
||||||
|
This is an official [JetBrains TeamCity](https://www.jetbrains.com/teamcity/) minimal build agent image.
|
||||||
|
|
||||||
|
<img src="https://raw.githubusercontent.com/JetBrains/teamcity-docker-images/master/logo/GitHub.png" height="20" align="center"/> More details about tags and components are [here](https://github.com/JetBrains/teamcity-docker-images/blob/master/generated/teamcity-minimal-agent.md).
|
||||||
|
|
||||||
|
The [TeamCity build agent](https://www.jetbrains.com/help/teamcity/build-agent.html) connects to the TeamCity server and spawns the actual build processes.
|
||||||
|
You can use the ```jetbrains/teamcity-server``` image to run a TeamCity server.
|
||||||
|
|
||||||
|
This minimal image adds just a TeamCity agent without any tools like VCS clients, etc. It is suitable for simple builds and can serve as a base for your custom images. For Java or .NET development we recommend using the default build agent image [jetbrains/teamcity-agent](https://hub.docker.com/r/jetbrains/teamcity-agent/).
|
||||||
|
|
||||||
|
## How to Use This Image
|
||||||
|
|
||||||
|
Pull the TeamCity minimal image from the Docker Hub Repository:
|
||||||
|
|
||||||
|
```
|
||||||
|
jetbrains/teamcity-minimal-agent
|
||||||
|
```
|
||||||
|
|
||||||
|
and use the following command to start a container with TeamCity agent running inside
|
||||||
|
a Linux container:
|
||||||
|
|
||||||
|
```
|
||||||
|
docker run -it -e SERVER_URL="<url to TeamCity server>" \
|
||||||
|
-v <path to agent config folder>:/data/teamcity_agent/conf \
|
||||||
|
jetbrains/teamcity-minimal-agent
|
||||||
|
```
|
||||||
|
|
||||||
|
or a Windows container:
|
||||||
|
```
|
||||||
|
docker run -it -e SERVER_URL="<url to TeamCity server>"
|
||||||
|
-v <path to agent config folder>:C:/BuildAgent/conf
|
||||||
|
jetbrains/teamcity-minimal-agent
|
||||||
|
```
|
||||||
|
where `<url to TeamCity server>` is the full URL for TeamCity server, accessible by the agent. Note that `localhost` will not generally not work as it will refer to the `localhost` inside the container.
|
||||||
|
`<path to agent config folder>` is the host machine directory to serve as the TeamCity agent config directory. We recommend providing this binding in order to persist the agent configuration, e.g. authorization on the server. Note that you should map a different folder for every new agent you create.
|
||||||
|
|
||||||
|
Since version 2020.1, TeamCity agent Docker images __run under a non-root user__. Refer to our [upgrade notes](https://www.jetbrains.com/help/teamcity/upgrade-notes.html#UpgradeNotes-AgentDockerimagesrunundernon-rootuser) for information on possible affected use cases.
|
||||||
|
|
||||||
|
When you run the agent for the first time, you should authorize it via the TeamCity server UI: go to the **Unauthorized Agents** page in your browser. See [more details](https://www.jetbrains.com/help/teamcity/build-agent.html).
|
||||||
|
|
||||||
|
All information about agent authorization is stored in agent's configuration folder. If you stop the container with the agent and then start a new one with the same config folder, the agent's name and authorization state will be preserved.
|
||||||
|
|
||||||
|
TeamCity agent does not need manual upgrade: it will upgrade itself automatically on connecting to an upgraded server.
|
||||||
|
|
||||||
|
### Agent Image Environment Variables
|
||||||
|
|
||||||
|
- **SERVER_URL** - URL of the TeamCity server agent will connect to
|
||||||
|
- **AGENT_NAME** - (optional) Name of the agent in TeamCity UI, autogenerated if omitted
|
||||||
|
- **AGENT_TOKEN** - (optional) Agent authorization token, if unset, the agent should be [authorized](https://www.jetbrains.com/help/teamcity/build-agent.html#BuildAgent-BuildAgentStatus) via TeamCity UI.
|
||||||
|
- **OWN_ADDRESS** - (optional, linux only) IP address build agent binds to, autodetected
|
||||||
|
- **OWN_PORT** - (optional, linux only) Port build agent binds to, 9090 by default
|
||||||
|
|
||||||
|
### Windows Containers Limitations
|
||||||
|
|
||||||
|
The details on the known problems in Windows containers are available in the [TeamCity documentation](https://www.jetbrains.com/help/teamcity/known-issues.html#KnownIssues-WindowsDockerContainers).
|
||||||
|
|
||||||
|
## Customization
|
||||||
|
|
||||||
|
You can customize the image via the usual Docker procedure:
|
||||||
|
|
||||||
|
1. Run the image
|
||||||
|
```
|
||||||
|
docker run -it -e SERVER_URL="<url to TeamCity server>" \
|
||||||
|
-v <path to agent config folder>:/data/teamcity_agent/conf \
|
||||||
|
--name="my-customized-agent" \
|
||||||
|
jetbrains/teamcity-minimal-agent \
|
||||||
|
```
|
||||||
|
2. Enter the container
|
||||||
|
```
|
||||||
|
docker exec -it my-customized-agent bash
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Change whatever you need
|
||||||
|
4. Exit and [create a new image](https://docs.docker.com/engine/reference/commandline/commit/) from the container
|
||||||
|
```
|
||||||
|
docker commit my-customized-agent <the registry where you what to store the image>
|
||||||
|
```
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
The image is available under the [TeamCity license](https://www.jetbrains.com/teamcity/buy/license.html).
|
||||||
|
TeamCity is free for perpetual use with the limitation of 100 build configurations (jobs) and 3 agents. [Licensing details](https://www.jetbrains.com/help/teamcity/licensing-policy.html).
|
||||||
|
|
||||||
|
## Feedback
|
||||||
|
|
||||||
|
Report issues of suggestions to the official TeamCity [issue tracker](https://youtrack.jetbrains.com/issues/TW).
|
||||||
|
|
||||||
|
## Other TeamCity Images
|
||||||
|
* [TeamCity Server](https://hub.docker.com/r/jetbrains/teamcity-server/)
|
||||||
|
* [Build Agent](https://hub.docker.com/r/jetbrains/teamcity-agent/)
|
6
linux/teamcity/agent/node16/docker-compose.yml
Normal file
6
linux/teamcity/agent/node16/docker-compose.yml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
version: '3.9'
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
image: "epicmorg/teamcity-agent:node16"
|
||||||
|
build:
|
||||||
|
context: .
|
90
linux/teamcity/agent/node16/run-agent.sh
Executable file
90
linux/teamcity/agent/node16/run-agent.sh
Executable file
@ -0,0 +1,90 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
check() {
|
||||||
|
if [[ $? != 0 ]]; then
|
||||||
|
echo "Error! Stopping the script."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
configure() {
|
||||||
|
if [[ $# -gt 0 ]]; then
|
||||||
|
echo "run agent.sh configure $@"
|
||||||
|
${AGENT_DIST}/bin/agent.sh configure "$@"; check
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
reconfigure() {
|
||||||
|
declare -a opts
|
||||||
|
[[ -n "${SERVER_URL}" ]] && opts[${#opts[@]}]='--server-url' && opts[${#opts[@]}]="$SERVER_URL"
|
||||||
|
[[ -n "${AGENT_TOKEN}" ]] && opts[${#opts[@]}]='--auth-token' && opts[${#opts[@]}]="$AGENT_TOKEN"
|
||||||
|
[[ -n "${AGENT_NAME}" ]] && opts[${#opts[@]}]='--name' && opts[${#opts[@]}]="$AGENT_NAME"
|
||||||
|
[[ -n "${OWN_ADDRESS}" ]] && opts[${#opts[@]}]='--ownAddress' && opts[${#opts[@]}]="$OWN_ADDRESS"
|
||||||
|
[[ -n "${OWN_PORT}" ]] && opts[${#opts[@]}]='--ownPort' && opts[${#opts[@]}]="$OWN_PORT"
|
||||||
|
if [[ 0 -ne "${#opts[@]}" ]]; then
|
||||||
|
# Using sed to strip double quotes produced by docker-compose
|
||||||
|
for i in $(seq 0 $(expr ${#opts[@]} - 1)); do
|
||||||
|
opts[$i]="$(echo "${opts[$i]}" | sed -e 's/""/"/g')"
|
||||||
|
done
|
||||||
|
configure "${opts[@]}"
|
||||||
|
echo "File buildAgent.properties was updated"
|
||||||
|
fi
|
||||||
|
for AGENT_OPT in ${AGENT_OPTS}; do
|
||||||
|
echo ${AGENT_OPT} >> ${CONFIG_DIR}/buildAgent.properties
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
prepare_conf() {
|
||||||
|
echo "Will prepare agent config" ;
|
||||||
|
cp -p ${AGENT_DIST}/conf_dist/*.* ${CONFIG_DIR}/; check
|
||||||
|
cp -p ${CONFIG_DIR}/buildAgent.dist.properties ${CONFIG_DIR}/buildAgent.properties; check
|
||||||
|
reconfigure
|
||||||
|
echo "File buildAgent.properties was created and updated" ;
|
||||||
|
}
|
||||||
|
|
||||||
|
AGENT_DIST=/opt/buildagent
|
||||||
|
|
||||||
|
CONFIG_DIR=/data/teamcity_agent/conf
|
||||||
|
|
||||||
|
LOG_DIR=/opt/buildagent/logs
|
||||||
|
|
||||||
|
|
||||||
|
rm -f ${LOG_DIR}/*.pid
|
||||||
|
|
||||||
|
if [ -f ${CONFIG_DIR}/buildAgent.properties ] ; then
|
||||||
|
echo "File buildAgent.properties was found in ${CONFIG_DIR}" ;
|
||||||
|
reconfigure
|
||||||
|
else
|
||||||
|
echo "Will create new buildAgent.properties using distributive" ;
|
||||||
|
if [[ -n "${SERVER_URL}" ]]; then
|
||||||
|
echo "TeamCity URL is provided: ${SERVER_URL}"
|
||||||
|
else
|
||||||
|
echo "TeamCity URL is not provided, but is required."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
prepare_conf
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$RUN_AS_BUILDAGENT" -o "$RUN_AS_BUILDAGENT" = "false" -o "$RUN_AS_BUILDAGENT" = "no" ]; then
|
||||||
|
${AGENT_DIST}/bin/agent.sh start
|
||||||
|
else
|
||||||
|
echo "Make sure build agent directory ${AGENT_DIST} is owned by buildagent user"
|
||||||
|
chown -R buildagent:buildagent ${AGENT_DIST}
|
||||||
|
check; sync
|
||||||
|
|
||||||
|
echo "Start build agent under buildagent user"
|
||||||
|
sudo -E -u buildagent HOME=/home/buildagent ${AGENT_DIST}/bin/agent.sh start
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
while [ ! -f ${LOG_DIR}/teamcity-agent.log ];
|
||||||
|
do
|
||||||
|
echo -n "."
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
|
||||||
|
trap '${AGENT_DIST}/bin/agent.sh stop force; while ps -p $(cat $(ls -1 ${LOG_DIR}/*.pid)) &>/dev/null; do sleep 1; done; kill %%' SIGINT SIGTERM SIGHUP
|
||||||
|
|
||||||
|
tail -qF ${LOG_DIR}/teamcity-agent.log &
|
||||||
|
wait
|
15
linux/teamcity/agent/node16/run-services.sh
Executable file
15
linux/teamcity/agent/node16/run-services.sh
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo '/run-services.sh'
|
||||||
|
|
||||||
|
for entry in /services/*.sh
|
||||||
|
do
|
||||||
|
if [[ -f "$entry" ]]; then
|
||||||
|
echo "$entry"
|
||||||
|
[[ ! -x "$entry" ]] && (chmod +x "$entry"; sync)
|
||||||
|
"$entry"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
echo '/run-agent.sh'
|
||||||
|
exec '/run-agent.sh'
|
7
linux/teamcity/agent/node16/sources.sid.list
Normal file
7
linux/teamcity/agent/node16/sources.sid.list
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#main
|
||||||
|
deb http://ftp.ru.debian.org/debian/ sid main contrib non-free
|
||||||
|
deb-src http://ftp.ru.debian.org/debian/ sid main contrib non-free
|
||||||
|
|
||||||
|
##multimedia
|
||||||
|
#deb http://ftp.ru.debian.org/debian-multimedia/ sid main non-free
|
||||||
|
#deb-src http://ftp.ru.debian.org/debian-multimedia/ sid main non-free
|
Loading…
Reference in New Issue
Block a user