forked from litmuschaos/litmusctl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deploying litmusctl bins to s3 bucket (litmuschaos#8)
Signed-off-by: Raj Das <[email protected]>
- Loading branch information
Showing
14 changed files
with
46 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,8 @@ | ||
name: Build | ||
name: build-pipeline | ||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
name: Push-or-Release | ||
name: push-release-pipeline | ||
on: | ||
push: | ||
branches: | ||
- master | ||
tags-ignore: | ||
- '**' | ||
- s3-bucket | ||
create: | ||
tags: | ||
- '**' | ||
|
@@ -27,9 +26,9 @@ jobs: | |
run: | | ||
if [ "$(gofmt -s -l . | wc -l)" -ne 0 ] | ||
then | ||
echo "The following files were found to be not go formatted:" | ||
gofmt -s -l . | ||
exit 1 | ||
echo "The following files were found to be not go formatted:" | ||
gofmt -s -l . | ||
exit 1 | ||
fi | ||
- name: golangci-lint | ||
|
@@ -39,23 +38,23 @@ jobs: | |
run: | | ||
make unused-package-check | ||
- name: Get tag | ||
shell: bash | ||
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF##*/})" | ||
id: tag | ||
|
||
- name: Building litmusctl | ||
run: | | ||
git checkout ${GITHUB_REF##*/} | ||
make build | ||
make TAG=${{ steps.tag.outputs.branch }} build | ||
- name: Push litmusctl to repo | ||
- name: Configure AWS credentials from Test account | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: us-east-1 | ||
|
||
- name: Copy files to the test website with the AWS CLI | ||
run: | | ||
git config --global user.name 'litmuschaos-bot' | ||
git config --global user.email '[email protected]' | ||
git remote -v | ||
if [[ `git status --porcelain` ]]; then | ||
echo "changes" | ||
git add . | ||
git commit -s -m "Updating litmusctl" | ||
git push | ||
exit 0; | ||
else | ||
echo "no changes" | ||
exit 0; | ||
fi | ||
aws s3 sync platforms-${{ steps.tag.outputs.branch }} s3://${{ secrets.AWS_S3_BUCKET }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,5 @@ | |
/httpRequests/ | ||
|
||
.idea | ||
main | ||
main | ||
platforms* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.