代码拉取完成,页面将自动刷新
sudo: required
language: php
services:
- docker
env:
global:
- IMAGE_NAME=restyaplatform/restyaboard
cache:
directories:
- node_modules
jobs:
include:
- stage: test
script:
- npm cache verify
- npm install
- grunt pre-commit
- stage: release
script:
- docker pull "${IMAGE_NAME}:dev"
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
# Direct push to dev
- if [ "$TRAVIS_BRANCH" = "dev" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then
docker build --pull --cache-from "${IMAGE_NAME}:dev" --tag "${IMAGE_NAME}" .;
docker tag "$IMAGE_NAME" "${IMAGE_NAME}:dev";
docker push "${IMAGE_NAME}:dev";
exit 0;
fi
# PullRequests
- if [ "$TRAVIS_PULL_REQUEST" = "true" ]; then
exit 0;
fi
# Tags
- if [ -n "$TRAVIS_TAG" ]; then
docker build --pull --cache-from "${IMAGE_NAME}:dev" --tag "${IMAGE_NAME}" .;
docker tag "$IMAGE_NAME" "${IMAGE_NAME}:$TRAVIS_TAG";
docker push "${IMAGE_NAME}:$TRAVIS_TAG";
exit 0;
fi
# Else
- exit 0;
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。