From fe11bf93989824ac1f44d32e885b3143e5644461 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 3 Dec 2019 15:24:47 +0800 Subject: [PATCH] update travel.yml --- .travis.yml | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 04d0afa..64c4aa0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,17 +7,7 @@ services: - docker script: - go test -v ./cmd/nps/ - - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - - - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" - - sudo apt-get update - - sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce - - docker --version - - export VERSION=0.24.1 - - git clone https://github.com/cnlh/spksrc.git ~/spksrc - - mkdir ~/spksrc/nps && cp -rf ./* ~/spksrc/nps/ - - docker run -itd --name spksrc --env VERSION=$VERSION -v ~/spksrc:/spksrc synocommunity/spksrc /bin/bash - - docker exec -it spksrc /bin/bash -c 'cd /spksrc && make setup && cd /spksrc/spk/npc && make' - - cp ~/spksrc/packages/npc_noarch-all_$VERSION-1.spk ./npc_$VERSION.spk + before_deploy: - wget https://github.com/upx/upx/releases/download/v3.95/upx-3.95-amd64_linux.tar.xz - tar -xvf upx-3.95-amd64_linux.tar.xz @@ -172,6 +162,18 @@ before_deploy: - tar -czvf win_386_server.tar.gz conf/nps.conf conf/tasks.json conf/clients.json conf/hosts.json conf/server.key conf/server.pem web/views web/static nps.exe + - export VERSION=0.24.2 + - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - + - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" + - sudo apt-get update + - sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce + - docker --version + - git clone https://github.com/cnlh/spksrc.git ~/spksrc + - mkdir ~/spksrc/nps && cp -rf ./* ~/spksrc/nps/ + - docker run -itd --name spksrc --env VERSION=$VERSION -v ~/spksrc:/spksrc synocommunity/spksrc /bin/bash + - docker exec -it spksrc /bin/bash -c 'cd /spksrc && make setup && cd /spksrc/spk/npc && make' + - cp ~/spksrc/packages/npc_noarch-all_$VERSION-1.spk ./npc_$VERSION.spk + - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin - export DOCKER_CLI_EXPERIMENTAL=enabled - docker run --rm --privileged docker/binfmt:66f9012c56a8316f9244ffd7622d7c21c1f6f28d