1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
| matrix: include: - language: node_js node_js: - 10.16.1 branches: only: - master install: - npm install script: - npm run build - docker build . -t "$DOCKER_NAME/innovate-admin-vue:latest" addons: ssh_known_hosts: - "$SERVER_IP" after_success: - docker login -u=$DOCKER_NAME -p="$DOCKER_PWD" - docker push $DOCKER_NAME/innovate-admin-vue:latest - chmod 600 ~/.ssh/id_rsa - rsync -az --delete ./docker-compose.yml root@$SERVER_IP:$DOCKER_NAME/innovate-admin-vue/ - ssh -o "StrictHostKeyChecking no" -i id_rsa root@$SERVER_IP "cd $DOCKER_NAME/innovate-admin-vue/;docker-compose -f docker-compose.yml pull;docker-compose -f docker-compose.yml up -d;exit" before_install: - openssl aes-256-cbc -K $encrypted_1687bb340939_key -iv $encrypted_1687bb340939_iv -in id_rsa.enc -out ~/.ssh/id_rsa -d - chmod 600 ~/.ssh/id_rsa - echo -e "Host $SERVER_IP\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config - cd $DOCKER_NAME/innovate-admin-vue - language: java services: - docker sudo: required branches: only: - master script: - mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V - docker build . -t "$DOCKER_NAME/innovate-admin:latest" before_install: - openssl aes-256-cbc -K $encrypted_1687bb340939_key -iv $encrypted_1687bb340939_iv -in id_rsa.enc -out ~/.ssh/id_rsa -d - chmod 600 ~/.ssh/id_rsa - echo -e "Host $SERVER_IP\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config - cd $DOCKER_NAME/innovate-admin after_success: - docker login -u=$DOCKER_NAME -p="$DOCKER_PWD" - docker push $DOCKER_NAME/innovate-admin:latest - chmod 600 ~/.ssh/id_rsa - rsync -az --delete ./docker-compose.yml root@$SERVER_IP:$DOCKER_NAME/innovate-admin/ - ssh -o "StrictHostKeyChecking no" -i id_rsa root@$SERVER_IP "cd $DOCKER_NAME/innovate-admin/;docker-compose -f docker-compose.yml pull;docker-compose -f docker-compose.yml up -d;exit" notifications: email: - biaogejiushibiao@outlook.com on_success: change on_failure: always before_install: - openssl aes-256-cbc -K $encrypted_1687bb340939_key -iv $encrypted_1687bb340939_iv -in id_rsa.enc -out ~\/.ssh/id_rsa -d
|