加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
.travis.yml 1.28 KB
一键复制 编辑 原始数据 按行查看 历史
gaozhidf_2c5a 提交于 2018-04-10 03:20 . update .travis.yml
sudo: required
dist: trusty
language: java
jdk:
- oraclejdk8
before_install:
- chmod +x mvnw
- chmod +x dockerfiles/*.sh
jobs:
include:
- stage: mvnw package
script:
- ./mvnw package
- stage: build && test
script:
- docker-compose up --build -d
- docker images
- ./dockerfiles/test.sh
- docker-compose down --rmi all
- stage: push docker image
script:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker-compose build
- docker-compose push
- stage: ansible deploy
install: skip
script:
- openssl aes-256-cbc -K $encrypted_62f3167d5387_key -iv $encrypted_62f3167d5387_iv -in id_rsa.enc -out ./dockerfiles/ansible/id_rsa -d
- chmod 600 ./dockerfiles/ansible/id_rsa
- cp docker-compose.yml ./dockerfiles/ansible/
- sed -i "s#\$TARGET_SERVER_HOST#$TARGET_SERVER_HOST:$TARGET_SERVER_PORT#g" ./dockerfiles/ansible/hosts
- >
docker run --privileged -e ANSIBLE_FORCE_COLOR=1 --rm
-v `pwd`/dockerfiles/ansible:/target_files/
williamyeh/ansible:alpine3
ansible-playbook --key-file /target_files/id_rsa -i /target_files/hosts /target_files/task.yml
notifications:
email:
recipients:
- gaozhidf@foxmail.com
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化