Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Commit

Permalink
problem: no binaries deployed
Browse files Browse the repository at this point in the history
  • Loading branch information
splix committed Mar 19, 2019
1 parent b422aba commit 43f58a2
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 62 deletions.
68 changes: 9 additions & 59 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,64 +1,15 @@
# Appveyor configuration template for Rust using rustup for Rust installation
# https://github.com/starkat99/appveyor-rust

## Operating System (VM environment) ##

# Rust needs at least Visual Studio 2013 Appveyor OS for MSVC targets.
image: Visual Studio 2015

## Build Matrix ##
# This configuration will setup a build for each channel & target combination (12 windows
# combinations in all).
#
# There are 3 channels: stable, beta, and nightly.
#
# Alternatively, the full version may be specified for the channel to build using that specific
# version (e.g. channel: 1.5.0)
#
# The values for target are the set of windows Rust build targets. Each value is of the form
#
# ARCH-pc-windows-TOOLCHAIN
#
# Where ARCH is the target architecture, either x86_64 or i686, and TOOLCHAIN is the linker
# toolchain to use, either msvc or gnu. See https://www.rust-lang.org/downloads.html#win-foot for
# a description of the toolchain differences.
# See https://github.com/rust-lang-nursery/rustup.rs/#toolchain-specification for description of
# toolchains and host triples.
#
# Comment out channel/target combos you do not wish to build in CI.
#
# You may use the `cargoflags` and `RUSTFLAGS` variables to set additional flags for cargo commands
# and rustc, respectively. For instance, you can uncomment the cargoflags lines in the nightly
# channels to enable unstable features when building for nightly. Or you could add additional
# matrix entries to test different combinations of features.
environment:
GCP_PASSWD:
secure: GiLB9xoSis0z90cMZO88dhWAhRYpXI65mTuYYQsEOdnf+R1CZkuptKRB6mhdEbDliHu6jGWdW+7A6rpYmmTgpYuXcijONGn8mfXHenW7k48=

matrix:
### MSVC Toolchains ###
# Stable 64-bit MSVC
- channel: stable
target: x86_64-pc-windows-msvc
# Beta 64-bit MSVC
- channel: beta
target: x86_64-pc-windows-msvc
secure: /kPjA5Ff2c6ZDhU7y6TiUWiR4Jr4uXyLKWan35EXXTI=

# Only build against the branches that will have pull requests built against them (master).
# Otherwise creating feature branches on this repository and a pull requests against them will
# cause each commit to be tested twice, once for the branch and once for the pull request.
branches:
only:
- master

## Install Script ##

# This is the most important part of the Appveyor configuration. This installs the version of Rust
# specified by the 'channel' and 'target' environment variables from the build matrix. This uses
# rustup to install Rust.
#
# For simple configurations, instead of using the build matrix, you can simply set the
# default-toolchain and default-host manually here.
install:
# Install janus.
- set PATH=C:\msys64\mingw64\bin;C:\msys64\usr\bin\;%PATH%
Expand All @@ -72,7 +23,7 @@ install:
- appveyor DownloadFile https://static.rust-lang.org/rustup/archive/1.7.0/i686-pc-windows-gnu/rustup-init.exe -FileName rustup-init.exe
# Currently broken version.
# - appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe - rustup-init -yv --default-toolchain %channel% --default-host %target%
- rustup-init -yv --default-toolchain %channel% --default-host %target%
- rustup-init -yv --default-toolchain stable --default-host x86_64-pc-windows-msvc
- cmd: set PATH=%PATH%;%USERPROFILE%\.cargo\bin
- rustup update
- rustc -vV
Expand All @@ -83,15 +34,15 @@ install:
- cmd: set RUSTFLAGS=-C target-feature=+crt-static

## Build Script ##

cache:
- '%USERPROFILE%\.cargo'

# Uses 'cargo build' to build. Alternatively, the project may call rustc directly or perform other
# build commands. Rust will automatically be placed in the PATH environment variable.
build_script:
- cargo build --all --verbose --release
- 7z a emerald-%channel%-%target%-%VERSION%.zip ./target/release/emerald-vault.exe
- cp ./target/release/emerald-vault.exe ./target/release/emerald.exe
- 7z a emerald-cli-win-%VERSION%.zip ./target/release/emerald.exe
# Uses 'cargo test' to run tests and build. Alternatively, the project may call compiled programs
# directly or perform other testing commands. Rust will automatically be placed in the PATH
# environment variable.
Expand All @@ -100,13 +51,12 @@ test_script:

artifacts:
- path: '*.zip'
name: emerald-vault
before_deploy:
# Set up GCP upload.
# - nuget install secure-file -ExcludeVersion
# - secure-file\tools\secure-file -decrypt gcloud-appveyor.json.enc -secret %GCP_PASSWD% -out .gcloud.json
name: emerald-cli

deploy_script:
- openssl aes-256-cbc -d -in gcloud-appveyor.json.enc -k %GCP_PASSWD% -out gcloud-appveyor.json -md sha256
- ps: >-
If ($env:APPVEYOR_REPO_BRANCH -eq 'master') {
janus.exe deploy -to="builds.etcdevteam.com/emerald-vault/$env:VERSION_BASE/" -files="./*.zip" -key="./gcloud-appveyor.json.enc"
janus.exe deploy -to="builds.etcdevteam.com/emerald-cli/$env:VERSION_BASE/" -files="./*.zip" -key="./gcloud-appveyor.json"
}
- rm gcloud-appveyor.json
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ script:
- cargo test --all --verbose
- cargo build --all --verbose --release
- cp ./target/release/emerald-vault "$HOME/.cargo/bin/"
- cp ./target/release/emerald "./target/release/"
- bats cli.bats

deploy:
Expand Down
6 changes: 3 additions & 3 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#!/usr/bin/env bash

VERSION_BASE=$(janus version -format='v%M.%m.x')
CLI_ARCHIVE_NAME="emerald-vault-$TRAVIS_OS_NAME-$APP_VERSION"
CLI_ARCHIVE_NAME="emerald-cli-$TRAVIS_OS_NAME-$APP_VERSION"
zip -j "$CLI_ARCHIVE_NAME.zip" target/release/emerald
tar -zcf "$CLI_ARCHIVE_NAME.tar.gz" target/release/emerald
echo "Deploy to http://builds.etcdevteam.com/emerald-vault/$VERSION_BASE/"
echo "Deploy to http://builds.etcdevteam.com/emerald-cli/$VERSION_BASE/"

mkdir deploy
mv *.zip *.tar.gz deploy/
ls -l deploy/

janus deploy -to="builds.etcdevteam.com/emerald-vault/$VERSION_BASE/" -files="./deploy/*" -key="./gcloud-travis.json.enc"
janus deploy -to="builds.etcdevteam.com/emerald-cli/$VERSION_BASE/" -files="./deploy/*" -key="./gcloud-travis.json.enc"
echo "Deployed"
Binary file modified gcloud-appveyor.json.enc
Binary file not shown.

0 comments on commit 43f58a2

Please sign in to comment.