fix(ansible_collection): ensure before building git is on the tagged commit
!75 nofusscomputing/projects/ansible/collections/ci-test!1
This commit is contained in:
@ -408,6 +408,20 @@ variables:
|
||||
pip install \
|
||||
ansible==9.2.0
|
||||
|
||||
- | # Setup git to be on the tagged commit
|
||||
|
||||
echo "setting up git to be on revision ${CI_COMMIT_TAG}";
|
||||
|
||||
git log -2;
|
||||
|
||||
git fetch -fpvt;
|
||||
|
||||
git pull --rebase;
|
||||
|
||||
git reset ${CI_COMMIT_TAG} --hard;
|
||||
|
||||
git log -2;
|
||||
|
||||
script:
|
||||
|
||||
- | # Build the collection
|
||||
@ -461,7 +475,7 @@ variables:
|
||||
curl \
|
||||
--header "JOB-TOKEN: $CI_JOB_TOKEN" \
|
||||
-o artifacts/release_notes.md \
|
||||
${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${CI_PROJECT_NAME}/${NEW_VERSION}/release_notes.md
|
||||
${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${CI_PROJECT_NAME}/${CI_COMMIT_TAG}/release_notes.md
|
||||
|
||||
echo "Release notes fetched";
|
||||
|
||||
|
@ -23,6 +23,12 @@ Ansible Lint:
|
||||
- if: "$CI_COMMIT_AUTHOR =='nfc_bot <helpdesk@nofusscomputing.com>'"
|
||||
when: never
|
||||
|
||||
- if: # Occur on merge
|
||||
$CI_COMMIT_BRANCH == "development"
|
||||
&&
|
||||
$CI_PIPELINE_SOURCE == "push"
|
||||
when: always
|
||||
|
||||
- if:
|
||||
$CI_COMMIT_BRANCH != "development"
|
||||
&&
|
||||
@ -52,6 +58,12 @@ Ansible Lint (galaxy.yml):
|
||||
- if: "$CI_COMMIT_AUTHOR =='nfc_bot <helpdesk@nofusscomputing.com>'"
|
||||
when: never
|
||||
|
||||
- if: # Occur on merge
|
||||
$CI_COMMIT_BRANCH == "development"
|
||||
&&
|
||||
$CI_PIPELINE_SOURCE == "push"
|
||||
when: always
|
||||
|
||||
- if:
|
||||
$CI_COMMIT_BRANCH != "development"
|
||||
&&
|
||||
|
Reference in New Issue
Block a user