forked from jugatsu/onec-docker
-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from ovcharenko-di/feature/coverage
Доработки для использования замеров покрытия с помощью Coverage41C на агентах swarm и k8s
- Loading branch information
Showing
14 changed files
with
260 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/usr/bin/env bash | ||
set -eo pipefail | ||
|
||
if [ -n "${DOCKER_LOGIN}" ] && [ -n "${DOCKER_PASSWORD}" ] && [ -n "${DOCKER_REGISTRY_URL}" ]; then | ||
if ! docker login -u "${DOCKER_LOGIN}" -p "${DOCKER_PASSWORD}" "${DOCKER_REGISTRY_URL}"; then | ||
echo "Docker login failed" | ||
exit 1 | ||
fi | ||
else | ||
echo "Skipping Docker login due to missing credentials" | ||
fi | ||
|
||
if [ "${DOCKER_SYSTEM_PRUNE}" = 'true' ] ; then | ||
docker system prune -af | ||
fi | ||
|
||
last_arg='.' | ||
if [ "${NO_CACHE}" = 'true' ] ; then | ||
last_arg='--no-cache .' | ||
fi | ||
|
||
./build-edt.sh | ||
|
||
export PUSH_AGENT='false' | ||
./build-base-k8s-jenkins-agent.sh | ||
|
||
docker build \ | ||
--build-arg DOCKER_REGISTRY_URL=$DOCKER_REGISTRY_URL \ | ||
--build-arg BASE_IMAGE=base-jenkins-agent \ | ||
--build-arg BASE_TAG=$ONEC_VERSION \ | ||
--build-arg EDT_VERSION=$EDT_VERSION \ | ||
--build-arg COVERAGE41C_VERSION=$COVERAGE41C_VERSION \ | ||
-t $DOCKER_REGISTRY_URL/base-jenkins-coverage-agent:$ONEC_VERSION \ | ||
-f coverage41C/Dockerfile \ | ||
$last_arg | ||
|
||
docker push $DOCKER_REGISTRY_URL/base-jenkins-coverage-agent:$ONEC_VERSION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
@echo off | ||
|
||
docker login -u %DOCKER_LOGIN% -p %DOCKER_PASSWORD% %DOCKER_REGISTRY_URL% | ||
|
||
if %ERRORLEVEL% neq 0 goto end | ||
|
||
if %DOCKER_SYSTEM_PRUNE%=="true" docker system prune -af | ||
|
||
if %ERRORLEVEL% neq 0 goto end | ||
|
||
if %NO_CACHE%=="true" (SET last_arg="--no-cache .") else (SET last_arg=".") | ||
|
||
.\build-edt-swarm-agent.bat | ||
|
||
set PUSH_AGENT='false' | ||
.\build-base-swarm-jenkins-agent.bat | ||
|
||
docker build ^ | ||
--build-arg DOCKER_REGISTRY_URL=%DOCKER_REGISTRY_URL% ^ | ||
--build-arg BASE_IMAGE=base-jenkins-agent ^ | ||
--build-arg BASE_TAG=%ONEC_VERSION% ^ | ||
--build-arg EDT_VERSION=%EDT_VERSION% ^ | ||
--build-arg COVERAGE41C_VERSION=%COVERAGE41C_VERSION% ^ | ||
-t %DOCKER_REGISTRY_URL%/base-jenkins-coverage-agent:%ONEC_VERSION% ^ | ||
-f coverage41C/Dockerfile ^ | ||
%last_arg% | ||
|
||
docker push %DOCKER_REGISTRY_URL%/base-jenkins-coverage-agent:%ONEC_VERSION% | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/usr/bin/env bash | ||
set -eo pipefail | ||
|
||
if [ -n "${DOCKER_LOGIN}" ] && [ -n "${DOCKER_PASSWORD}" ] && [ -n "${DOCKER_REGISTRY_URL}" ]; then | ||
if ! docker login -u "${DOCKER_LOGIN}" -p "${DOCKER_PASSWORD}" "${DOCKER_REGISTRY_URL}"; then | ||
echo "Docker login failed" | ||
exit 1 | ||
fi | ||
else | ||
echo "Skipping Docker login due to missing credentials" | ||
fi | ||
|
||
if [ "${DOCKER_SYSTEM_PRUNE}" = 'true' ] ; then | ||
docker system prune -af | ||
fi | ||
|
||
last_arg='.' | ||
if [ "${NO_CACHE}" = 'true' ] ; then | ||
last_arg='--no-cache .' | ||
fi | ||
|
||
./build-edt.sh | ||
|
||
export PUSH_AGENT='false' | ||
./build-base-swarm-jenkins-agent.sh | ||
|
||
docker build \ | ||
--build-arg DOCKER_REGISTRY_URL=$DOCKER_REGISTRY_URL \ | ||
--build-arg BASE_IMAGE=base-jenkins-agent \ | ||
--build-arg BASE_TAG=$ONEC_VERSION \ | ||
--build-arg EDT_VERSION=$EDT_VERSION \ | ||
--build-arg COVERAGE41C_VERSION=$COVERAGE41C_VERSION \ | ||
-t $DOCKER_REGISTRY_URL/base-jenkins-coverage-agent:$ONEC_VERSION \ | ||
-f coverage41C/Dockerfile \ | ||
$last_arg | ||
|
||
docker push $DOCKER_REGISTRY_URL/base-jenkins-coverage-agent:$ONEC_VERSION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.