-
Notifications
You must be signed in to change notification settings - Fork 1.8k
ci: release: upload_to_cloudsmith.sh: switch upload script to cloudsmith #2838
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
Open
AAndrisa
wants to merge
1
commit into
main
Choose a base branch
from
cloudsmith_support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
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 was deleted.
Oops, something went wrong.
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -33,20 +33,21 @@ | |
| # 2. Prepare Release - the release_projects.sh script is passed as input file from the no-OS | ||
| # sources affilated to the Release. | ||
| # 3. Create GitHub Release - generate new release using the same release tag and new sources and | ||
| # 4. Upload Artifactory - the upload_to_artifactory.sh script is passed as input file from the no-OS | ||
| # 4. Upload Cloudsmith - the upload_to_cloudsmith.sh script is passed as input file from the no-OS | ||
| # sources affilated to the Release. | ||
|
|
||
| # Upload artifacts to Artifactory in conjunction with upload_to_artifactory.py python script. | ||
| # Upload artifacts to Cloudsmith in conjunction with upload_to_cloudsmith.py python script that is found | ||
| # in wiki-scripts repository from analogdevicesinc organization. | ||
|
|
||
| # Release Environment Variables | ||
| WORKING_DIRECTORY="${1:-$(System.DefaultWorkingDirectory)}" | ||
| ART_PATH="${2:-$(ARTIFACTORY_PATH)}" | ||
| ART_TOKEN="${3:-$(ARTIFACTORY_TOKEN)}" | ||
| CLOUDSMITH_REPO="${2:-$(CLOUDSMITH_REPO)}" | ||
| CLOUDSMITH_API_KEY="${3:-$(CLOUDSMITH_API_KEY)}" | ||
| # Get default working branch | ||
| BRANCH="${4:-$(Build.SourceBranchName)}" | ||
| BINARY_ALIAS="noos_projects_binaries" | ||
| SRC_ALIAS="_no-os_sources" | ||
| PYSCRIPT_PATH="ci/release/upload_to_artifactory.py" | ||
| PYSCRIPT_PATH="wiki-scripts/utils/cloudsmith_utils/upload_to_cloudsmith.py" | ||
|
|
||
| # Timestamp Variable | ||
| timestamp=$(date +%Y_%m_%d-%H_%M) | ||
|
|
@@ -61,8 +62,12 @@ cd ${WORKING_DIRECTORY}/${BINARY_ALIAS} | |
|
|
||
| # Upload artifacts to Artifactory for each platform | ||
| for platform in "${platform_list[@]}"; do | ||
| python3 ${WORKING_DIRECTORY}/${SRC_ALIAS}/${PYSCRIPT_PATH} \ | ||
| --base_path ${ART_PATH} --server_path no-OS/${BRANCH}/${timestamp}/${platform} \ | ||
| --local_path noos_exports_${platform} --token ${ART_TOKEN} --props_level 1 \ | ||
| --properties "git_sha=${short_hash}" --log_file upload_to_artifactory_log.txt --no_rel_path | ||
| python3 ${WORKING_DIRECTORY}/${PYSCRIPT_PATH} \ | ||
| --repo=${CLOUDSMITH_REPO} \ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. use consistent formatting. |
||
| --version="no-OS/${BRANCH}/${timestamp}/${platform}/" \ | ||
| --local_path="noos_exports_${platform}" \ | ||
| --tags="git_sha-${GIT_SHA};timestamp_${timestamp}" \ | ||
| --token="${CLOUDSMITH_API_KEY}" \ | ||
| --log_file="upload_to_cloudsmith.log" \ | ||
| --no_rel_path | ||
| done | ||
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.
maybe validate if the script actually exists at this path.