Unverified Commit 5cdd238e authored by Ben-Zaad's avatar Ben-Zaad Committed by GitHub
Browse files

Merge pull request #221 from datreeio/staging

staging
parents 057eb1ec 56fec4d6
Showing with 52 additions and 7 deletions
+52 -7
......@@ -3,3 +3,4 @@ dist
.github
internal
*install.sh
scripts
language: go
go:
- 1.17
- "1.17"
os: osx
osx_image: xcode12.5
......@@ -16,17 +16,22 @@ before_deploy:
- git config --global user.email "builds@travis-ci.com"
- git config --global user.name "Travis CI"
- git remote set-url origin https://datree-ci:$GITHUB_TOKEN@github.com/datreeio/datree.git
- bash ./internal/release/install_svu.sh
- bash ./scripts/install_svu.sh
- echo $(svu --version)
- export SEMVER_NUMBER=$(bash ./internal/release/define_semver_number.sh)
- export SEMVER_NUMBER=$(bash ./scripts/define_semver_number.sh)
deploy:
- provider: script
skip_cleanup: true
script: bash ./internal/release/deploy.sh
script: bash ./scripts/deploy.sh
on:
all_branches: true
condition: $TRAVIS_BRANCH =~ ^(staging|main)$
- provider: script
skip_cleanup: true
script: bash ./scripts/deploy_release_candidate.sh
on:
branch: main
env:
global:
......
#!/bin/bash
set -e
osName=$(uname -s)
DOWNLOAD_URL=$(curl --silent "https://api.github.com/repos/datreeio/datree/releases/latest" | grep -o "browser_download_url.*\_${osName}_x86_64.zip")
......
......@@ -22,7 +22,7 @@ fi
BREW_REPO_URL="https://${GITHUB_TOKEN}@github.com/datreeio/${BREW_REPO_NAME}.git"
git clone $BREW_REPO_URL
bash ./internal/release/brew_formula_generator.sh $VERSION $BREW_REPO_NAME
bash ./scripts/brew_formula_generator.sh $VERSION $BREW_REPO_NAME
cd $BREW_REPO_NAME
git add -A
git commit -m "Brew formula update for datree-cli version $VERSION"
......
#!/bin/bash
set -ex
if [ $TRAVIS_BRANCH == "main" ]; then
......@@ -24,7 +25,7 @@ security find-identity -v
curl -sL https://git.io/goreleaser | VERSION=v$GORELEASER_VERSION bash
if [ $TRAVIS_BRANCH == "main" ]; then
bash ./internal/release/brew_push_formula.sh production $DATREE_BUILD_VERSION
bash ./scripts/brew_push_formula.sh production $DATREE_BUILD_VERSION
else
bash ./internal/release/brew_push_formula.sh staging $DATREE_BUILD_VERSION
bash ./scripts/brew_push_formula.sh staging $DATREE_BUILD_VERSION
fi
#!/bin/bash
set -ex
MAJOR_VERSION=0
MINOR_VERSION=14
latestRcTag=$(git tag --sort=-version:refname | grep "^${MAJOR_VERSION}.${MINOR_VERSION}.\d\+" | head -n 1 | grep --only-matching "^${MAJOR_VERSION}.${MINOR_VERSION}.\d\+" || true)
if [ "$latestRcTag" == "" ]; then
nextVersion=$MAJOR_VERSION.$MINOR_VERSION.0
else
nextVersion=$(echo $latestRcTag | awk -F. '{$NF = $NF + 1;} 1' | sed 's/ /./g')
fi
export DATREE_BUILD_VERSION=$nextVersion-rc
echo $DATREE_BUILD_VERSION
git tag $DATREE_BUILD_VERSION -a -m "Generated tag from TravisCI for build $TRAVIS_BUILD_NUMBER"
git push --tags
bash ./scripts/sign_application.sh
curl -sL https://git.io/goreleaser | VERSION=v$GORELEASER_VERSION bash
bash ./scripts/brew_push_formula.sh staging $DATREE_BUILD_VERSION
File moved
#!/bin/bash
# Secure private key
openssl aes-256-cbc -K $encrypted_2dfcdd1dc486_key -iv $encrypted_2dfcdd1dc486_iv -in DatreeCli.p12.enc -out DatreeCli.p12 -d
security create-keychain -p test buildagent.keychain
security default-keychain -s buildagent.keychain
security unlock-keychain -p test buildagent.keychain
security list-keychains -d user -s buildagent.keychain
security import DatreeCli.p12 -k buildagent.keychain -P $P12_PASSWORD -T /usr/bin/codesign
security set-key-partition-list -S "apple-tool:,apple:" -s -k test buildagent.keychain
security find-identity -v
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment