chore(ci): improved ci build step output

The build step ci output was really noisy with docker logs
so this writes that output into log files in the build
artifacts instead.
This commit is contained in:
Danny Coates 2020-03-13 18:34:26 -07:00
Родитель bb0381304a
Коммит 8784dc21e2
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4C442633C62E00CB
6 изменённых файлов: 16 добавлений и 10 удалений

Просмотреть файл

@ -5,6 +5,10 @@ cd "$DIR"
./create-version-json.sh
if [[ -n "${CIRCLECI}" ]]; then
echo "Docker logs are located in the CircleCI build artifacts"
fi
for d in ../packages/*/ ; do
./build.sh "$(basename "$d")"
done

Просмотреть файл

@ -18,15 +18,17 @@ if grep -e "$MODULE" -e 'all' "$DIR/../packages/test.list" > /dev/null; then
mkdir -p config
cp ../version.json config
mkdir -p ../../artifacts
ODDBALLS=("fxa-auth-server" "fxa-content-server" "fxa-profile-server" "fxa-payments-server")
if [[ -x scripts/build-ci.sh ]]; then
./scripts/build-ci.sh
time ./scripts/build-ci.sh
elif [[ "${ODDBALLS[*]}" =~ ${MODULE} ]]; then
cd ..
docker build -f "${MODULE}/Dockerfile" -t "${MODULE}:build" .
time docker build --progress=plain -f "${MODULE}/Dockerfile" -t "${MODULE}:build" . > "../artifacts/${MODULE}.log"
elif [[ -r Dockerfile ]]; then
docker build -f Dockerfile -t "${MODULE}:build" .
time docker build --progress=plain -t "${MODULE}:build" . > "../../artifacts/${MODULE}.log"
fi
# for debugging:

Просмотреть файл

@ -1,4 +1,4 @@
#!/bin/bash -ex
#!/bin/bash -e
DIR=$(dirname "$0")

Просмотреть файл

@ -7,7 +7,7 @@ DIR=$(dirname "$0")
cd "$DIR/.."
docker pull mozilla/fxa-circleci:latest
docker pull -q mozilla/fxa-circleci:latest
ID=$(docker create mozilla/fxa-circleci:latest)
docker cp "$ID":Dockerfile /tmp
@ -15,6 +15,6 @@ if diff Dockerfile /tmp/Dockerfile; then
echo "The source is unchanged. Tagging latest as build"
docker tag mozilla/fxa-circleci:latest fxa-circleci:build
else
docker build -t fxa-circleci:build .
docker build --progress=plain -t fxa-circleci:build . > ../../artifacts/fxa-circleci.log
fi
docker rm -v "$ID"

Просмотреть файл

@ -1,8 +1,8 @@
#!/bin/bash -ex
#!/bin/bash -e
DIR=$(dirname "$0")
cd $DIR/..
cd "$DIR/.."
npm ci
npm run build

Просмотреть файл

@ -7,7 +7,7 @@ DIR=$(dirname "$0")
cd "$DIR/.."
docker pull mozilla/fxa-email-service:latest
docker pull -q mozilla/fxa-email-service:latest
./scripts/hash-source.sh > .sourcehash
ID=$(docker create mozilla/fxa-email-service:latest)
@ -17,6 +17,6 @@ if diff .sourcehash /tmp/.sourcehash ; then
echo "The source is unchanged. Tagging latest as build"
docker tag mozilla/fxa-email-service:latest fxa-email-service:build
else
docker build -t fxa-email-service:build .
docker build --progress=plain -t fxa-email-service:build . > ../../artifacts/fxa-email-service.log
fi
docker rm -v "$ID"