Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ansible-node-exporter
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hdacloud
ansible-node-exporter
Commits
b169a41b
Unverified
Commit
b169a41b
authored
4 years ago
by
paulfantom
Browse files
Options
Downloads
Patches
Plain Diff
Simplify release process
* Generate changelog only on commits resulting in tag * Use ghr to create release
parent
077fdfbf
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.circleci/config.yml
+18
-16
18 additions, 16 deletions
.circleci/config.yml
with
18 additions
and
16 deletions
.circleci/config.yml
+
18
−
16
View file @
b169a41b
...
@@ -51,31 +51,33 @@ jobs:
...
@@ -51,31 +51,33 @@ jobs:
*"[patch]"*|*"[fix]"*|*"[bugfix]"* ) GIT_TAG=$(git semver --next-patch) ;;
*"[patch]"*|*"[fix]"*|*"[bugfix]"* ) GIT_TAG=$(git semver --next-patch) ;;
*"[minor]"*|*"[feat]"*|*"[feature]"* ) GIT_TAG=$(git semver --next-minor) ;;
*"[minor]"*|*"[feat]"*|*"[feature]"* ) GIT_TAG=$(git semver --next-minor) ;;
*"[major]"*|*"[breaking change]"* ) GIT_TAG=$(git semver --next-major) ;;
*"[major]"*|*"[breaking change]"* ) GIT_TAG=$(git semver --next-major) ;;
*) echo "Keyword not detected. Doing nothing" ;;
*) echo "Keyword not detected. Doing nothing"
&& circleci-agent step halt
;;
esac
esac
echo "GIT_TAG=${GIT_TAG}" >> $BASH_ENV
echo "GIT_TAG=${GIT_TAG}" >> $BASH_ENV
if [ "${GIT_TAG}" != "none" ]; then
echo "Assigning new tag: ${GIT_TAG}"
git tag "${GIT_TAG}" -a -m "Automatic tag generation for travis build no. ${CIRCLE_BUILD_NUM}"
git push "https://${GH_TOKEN}:@${GIT_URL}" --tags || circleci-agent step halt
fi
-
run
:
|
-
run
:
|
docker run -it --rm \
docker run -it --rm \
-v "${CIRCLE_WORKING_DIRECTORY}:/usr/local/src/your-app" \
-v "${CIRCLE_WORKING_DIRECTORY}:/role" \
-u "${CIRCLE_PROJECT_USERNAME}" -p "${CIRCLE_PROJECT_REPONAME}" \
-w "/role" \
ferrarimarco/github-changelog-generator:1.15.2 \
--user "${CIRCLE_PROJECT_USERNAME}" \
--project "${CIRCLE_PROJECT_REPONAME}" \
--token "${GH_TOKEN}" \
--token "${GH_TOKEN}" \
--release-url "https://galaxy.ansible.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME#ansible-}" \
--release-url "https://galaxy.ansible.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME#ansible-}" \
--unreleased-label "**Next release**" --no-compare-link
--unreleased-label "**Next release**" --no-compare-link \
--future-release "${GIT_TAG}"
-
run
:
git add CHANGELOG.md
-
run
:
git add CHANGELOG.md
-
run
:
git commit -m '[ci skip] Automatic changelog update'
-
run
:
git commit -m "[ci skip] Automatic changelog update"
-
run
:
git tag "${GIT_TAG}" -a -m "Automatic tag generation for CI build no. ${CIRCLE_BUILD_NUM}"
-
run
:
git push "https://${GH_TOKEN}:@${GIT_URL}" --tags || circleci-agent step halt
-
run
:
git push "https://${GH_TOKEN}:@${GIT_URL}" || circleci-agent step halt
-
run
:
git push "https://${GH_TOKEN}:@${GIT_URL}" || circleci-agent step halt
-
run
:
|
-
run
:
|
if [[ "${GIT_TAG}" != "none" ]]; then
ghr \
docker run -it \
-t ${GH_TOKEN} \
-e CHANDLER_GITHUB_API_TOKEN="${GH_TOKEN}" \
-u ${CIRCLE_PROJECT_USERNAME} \
-v "${CIRCLE_WORKING_DIRECTORY}:/chandler" \
-r ${CIRCLE_PROJECT_REPONAME} \
whizark/chandler push "${GIT_TAG}"
-n ${GIT_TAG} \
fi
-b "$(sed -n -e '/## \[0.22.0\]/,/## \[/ p' CHANGELOG.md | sed -e '$ d')" \
${GIT_TAG} ./artifacts/ # We don't have artifacts but ghr still needs sth
workflows
:
workflows
:
version
:
2
version
:
2
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment