diff options
author | Paul Emm. Katsoulakis <34388743+paulkatsoulakis@users.noreply.github.com> | 2019-05-03 15:24:45 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-03 15:24:45 +0300 |
commit | 7f3c5f6c0123434c5bc500512c4ee139d7342dbd (patch) | |
tree | d2ca85cbc1dad486b4f73bcfd177dd7fcd08dbf6 /.travis | |
parent | 42f7d7acb7e43b82cbafa18c167b9b7c778d0694 (diff) |
netdata/packaging/ci: Create manual nightly deployment tool (#5899)
* netdata/packaging/ci: Create manual nightly deployment tool
1. Alter docker tools to shebang with /usr/bin/env, safer to detect the right BASH (>4.0)
2. Generate script packaging/manual_nightly_deployment.sh, that runs only from TLD of netdata GIT
and provides the means to deploy to docker and GCS the latest nightly build of netdata.
Only option passed to the script is whether you want to deploy in docker, gcs or both.
Note: for GCS deployment the user has to define which bucket to update.
Note2: this tool has a hard dependency on gsutil to be properly setup on the development environment
* netdata/packaging/ci: Do not change global config for mail and user
Since we are now starting to use these scripts externally, we need to make sure we dont mess developer config.
It seems that we are touching global config, in an attempt to modify a single commit message.
Alter this and instead use the --author option for the single commit that we care about instead of altering the universe
Cheers
Diffstat (limited to '.travis')
-rwxr-xr-x | .travis/create_artifacts.sh | 4 | ||||
-rwxr-xr-x | .travis/draft_release.sh | 4 | ||||
-rwxr-xr-x | .travis/generate_changelog_and_tag_release.sh | 4 | ||||
-rwxr-xr-x | .travis/generate_changelog_for_nightlies.sh | 4 |
4 files changed, 2 insertions, 14 deletions
diff --git a/.travis/create_artifacts.sh b/.travis/create_artifacts.sh index 2c142e8d03..f49f79c257 100755 --- a/.travis/create_artifacts.sh +++ b/.travis/create_artifacts.sh @@ -14,10 +14,6 @@ if [ ! "${TRAVIS_REPO_SLUG}" == "netdata/netdata" ]; then fi; echo "--- Initialize git configuration ---" -export GIT_MAIL="bot@netdata.cloud" -export GIT_USER="netdatabot" -git config user.email "${GIT_MAIL}" -git config user.name "${GIT_USER}" git checkout master git pull diff --git a/.travis/draft_release.sh b/.travis/draft_release.sh index bfdfdfb0c5..ddc0f9ad51 100755 --- a/.travis/draft_release.sh +++ b/.travis/draft_release.sh @@ -23,10 +23,6 @@ if [ ! -f .gitignore ]; then fi echo "--- Initialize git configuration ---" -export GIT_MAIL="bot@netdata.cloud" -export GIT_USER="netdatabot" -git config user.email "${GIT_MAIL}" -git config user.name "${GIT_USER}" git checkout master git pull diff --git a/.travis/generate_changelog_and_tag_release.sh b/.travis/generate_changelog_and_tag_release.sh index 0f3d1bb5d0..fb155b2645 100755 --- a/.travis/generate_changelog_and_tag_release.sh +++ b/.travis/generate_changelog_and_tag_release.sh @@ -48,8 +48,6 @@ fi echo "--- Initialize git configuration ---" export GIT_MAIL="bot@netdata.cloud" export GIT_USER="netdatabot" -git config user.email "${GIT_MAIL}" -git config user.name "${GIT_USER}" git checkout master git pull @@ -62,7 +60,7 @@ echo "---- GENERATE CHANGELOG -----" git add CHANGELOG.md echo "---- COMMIT AND PUSH CHANGES ----" -git commit -m "[ci skip] release $GIT_TAG" +git commit -m "[ci skip] release $GIT_TAG" --author "${GIT_USER} <${GIT_MAIL}>" git tag "$GIT_TAG" -a -m "Automatic tag generation for travis build no. $TRAVIS_BUILD_NUMBER" git push "https://${GITHUB_TOKEN}:@$(git config --get remote.origin.url | sed -e 's/^https:\/\///')" git push "https://${GITHUB_TOKEN}:@$(git config --get remote.origin.url | sed -e 's/^https:\/\///')" --tags diff --git a/.travis/generate_changelog_for_nightlies.sh b/.travis/generate_changelog_for_nightlies.sh index 763acc16bb..68491fa9be 100755 --- a/.travis/generate_changelog_for_nightlies.sh +++ b/.travis/generate_changelog_for_nightlies.sh @@ -38,8 +38,6 @@ if [ ! "${TRAVIS_REPO_SLUG}" == "netdata/netdata" ]; then exit 0 fi -git config user.email "${GIT_MAIL}" -git config user.name "${GIT_USER}" git checkout master git pull @@ -58,7 +56,7 @@ echo "Changelog created! Adding packaging/version(${NEW_VERSION}) and CHANGELOG. echo "${NEW_VERSION}" > packaging/version git add packaging/version && echo "1) Added packaging/version to repository" || FAIL=1 git add CHANGELOG.md && echo "2) Added changelog file to repository" || FAIL=1 -git commit -m '[ci skip] create nightly packages and update changelog' && echo "3) Committed changes to repository" || FAIL=1 +git commit -m '[ci skip] create nightly packages and update changelog' --author "${GIT_USER} <${GIT_MAIL}>" && echo "3) Committed changes to repository" || FAIL=1 git push "https://${GITHUB_TOKEN}:@${PUSH_URL}" && echo "4) Pushed changes to remote ${PUSH_URL}" || FAIL=1 # In case of a failure, wrap it up and bail out cleanly |