Skip to content

Commit 2118e0c

Browse files
committed
Add docker login to .travis.yml
1 parent 68a095c commit 2118e0c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.travis.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ before_install:
3131
- cp -R tests/Fixture/moodle-local_ci ../moodle-local_ci
3232
- export PATH="$(cd bin; pwd):$(cd vendor/bin; pwd):$PATH"
3333
- export TRAVIS_BUILD_DIR=$(cd ../moodle-local_ci; pwd)
34+
- >
35+
if [ -n "$DOCKER_USER" ] && [ -n "$DOCKER_TOKEN" ]; then
36+
echo "$DOCKER_TOKEN" | docker login -u "$DOCKER_USER" --password-stdin
37+
echo "Using authenticated connection (no pull limits)"
38+
else
39+
echo "Using unauthenticated docker (pull limits may apply). Setup DOCKER_USER and DOCKER_TOKEN if needed."
40+
fi
3441
3542
install:
3643
- moodle-plugin-ci install -vvv

0 commit comments

Comments
 (0)