代码拉取完成,页面将自动刷新
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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。