diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 58e1aceeea57882206710851410265f15f2de583..dc08dc56b3b1ba018cc81c01e4b32df1aff48a37 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,8 +1,6 @@ before_script: - git config --global url.https://.insteadOf git:// - - mkdir -p ~/.hex ~/.config/rebar3 - - printf "{key,<<\"$HEX_KEY\">>}.\n{username,<<\"$HEX_USERNAME\">>}.\n" > ~/.hex/hex.config - - printf "{plugins, [rebar3_hex]}.\n" > ~/.config/rebar3/rebar.config + - mkdir -p ~/.hex ~/.config/rebar3 && touch ~/.config/rebar3/rebar.config - if [ "$HTTP_PROXY" != "" ]; then printf "{http_proxy,\"$HTTP_PROXY\"}.\n" >> ~/.config/rebar3/rebar.config; fi - if [ "$HTTPS_PROXY" != "" ]; then printf "{https_proxy,\"$HTTPS_PROXY\"}.\n" >> ~/.config/rebar3/rebar.config; fi - rebar3 update @@ -28,8 +26,11 @@ hex_publish: only: - /^\d+[.]\d+[.]\d+$/ # Only publish HEAD tagged with semantic version script: - - rebar3 update - - yes Y | rebar3 hex publish + - printf "{key,<<\"$HEX_KEY\">>}.\n{username,<<\"$HEX_USERNAME\">>}.\n" > ~/.hex/hex.config + - printf "{plugins, [rebar3_hex]}.\n" > ~/.config/rebar3/rebar.config + - echo "Y" | rebar3 hex publish + tags: + - amazon aws_publish: stage: publish @@ -41,3 +42,5 @@ aws_publish: - rebar3 as production do tar - aws s3 cp _build/production/rel/tsuru/tsuru-$CI_BUILD_REF_NAME.tar.gz s3://s3.erlang.ninja/tsuru/ - aws s3 cp s3://s3.erlang.ninja/tsuru/tsuru-$CI_BUILD_REF_NAME.tar.gz s3://s3.erlang.ninja/tsuru/tsuru-latest.tar.gz + tags: + - amazon