-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Github action for jaeger packages and docker image #2740
Merged
yurishkuro
merged 7 commits into
jaegertracing:master
from
Ashmita152:gh-docker-build-deploy
Jan 31, 2021
Merged
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
55117ab
- Build docker images for jaeger components
Ashmita152 372410f
Add action for release
Ashmita152 29dbdec
Set DEPLOY as true for package binary script
Ashmita152 47dc688
Fix BRANCH env variable for release event
Ashmita152 7dfdf28
Feedbacks
Ashmita152 61c932d
Fix BRANCH for release
Ashmita152 76cf30f
Feedbacks
Ashmita152 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Build binaries | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build-binaries: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
|
||
- name: Fetch git tags | ||
run: | | ||
git fetch --prune --unshallow --tags | ||
|
||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: ^1.15 | ||
|
||
- name: Export BRANCH variable | ||
uses: ./.github/actions/setup-branch | ||
|
||
- name: Install tools | ||
run: make install-ci | ||
|
||
- name: Build binaries | ||
run: make build-all-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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Build docker images | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
docker-images: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
|
||
- name: Fetch git tags | ||
run: | | ||
git fetch --prune --unshallow --tags | ||
|
||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: ^1.15 | ||
|
||
- uses: actions/setup-node@v2-beta | ||
with: | ||
node-version: '10' | ||
|
||
- uses: docker/login-action@v1 | ||
id: dockerhub-login | ||
with: | ||
username: jaegertracingbot | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
env: | ||
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | ||
if: env.DOCKERHUB_TOKEN != null | ||
|
||
- name: Export DOCKERHUB_LOGIN variable | ||
run: | | ||
echo "DOCKERHUB_LOGIN=true" >> $GITHUB_ENV | ||
if: steps.dockerhub-login.outcome == 'success' | ||
|
||
- name: Export BRANCH variable | ||
uses: ./.github/actions/setup-branch | ||
|
||
- name: Install tools | ||
run: make install-ci | ||
|
||
- name: Build docker images | ||
run: make docker | ||
|
||
- name: Upload docker images | ||
run: bash scripts/travis/upload-all-docker-images.sh |
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 |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: Publish release | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
publish-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
|
||
- name: Fetch git tags | ||
run: | | ||
git fetch --prune --unshallow --tags | ||
|
||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: ^1.15 | ||
|
||
- uses: actions/setup-node@v2-beta | ||
with: | ||
node-version: '10' | ||
|
||
- uses: docker/login-action@v1 | ||
id: dockerhub-login | ||
with: | ||
username: jaegertracingbot | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
env: | ||
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | ||
if: env.DOCKERHUB_TOKEN != null | ||
|
||
- name: Export DOCKERHUB_LOGIN variable | ||
run: | | ||
echo "DOCKERHUB_LOGIN=true" >> $GITHUB_ENV | ||
if: steps.dockerhub-login.outcome == 'success' | ||
|
||
- name: Export BRANCH variable | ||
uses: ./.github/actions/setup-branch | ||
|
||
- name: Install tools | ||
run: make install-ci | ||
|
||
- name: Build binaries | ||
run: make build-all-platforms | ||
|
||
- name: Package binaries | ||
Ashmita152 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
run: bash scripts/travis/package-deploy.sh | ||
env: | ||
DEPLOY: true | ||
Ashmita152 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
- name: Upload binaries | ||
Ashmita152 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
file: deploy/*.tar.gz | ||
file_glob: true | ||
tag: ${{ github.ref }} | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build docker images | ||
run: make docker | ||
|
||
- name: Upload docker images | ||
Ashmita152 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
run: bash scripts/travis/upload-all-docker-images.sh | ||
|
||
- name: Build, test, and publish all-in-one image | ||
run: bash scripts/travis/build-all-in-one-image.sh |
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
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need this step when building binaries?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also, when we do need tags, can we achieve the same effect with this setting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think if we want to pull tags as part of
checkout
action, only option from my understanding is to setfetch-depth: 0
which will also fetch all the commit history of all branches which will increase build time. I'm unable to find an option for just pulling the tags without commit history.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe it's worth creating a PR for the official action to add a new parameter like
tags: