Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ansible
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
streampunk
ansible
Commits
fe08f865
Commit
fe08f865
authored
4 years ago
by
ale
Browse files
Options
Downloads
Patches
Plain Diff
CI: use a script for detecting changes from ansible log
parent
efc0697c
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+1
-1
1 addition, 1 deletion
.gitlab-ci.yml
ci/has-changed
+10
-0
10 additions, 0 deletions
ci/has-changed
with
11 additions
and
1 deletion
.gitlab-ci.yml
+
1
−
1
View file @
fe08f865
...
@@ -30,7 +30,7 @@ check:
...
@@ -30,7 +30,7 @@ check:
-
echo -n "${ANSIBLE_VAULT_PASSWORD}" > .ansible_vault_pw
-
echo -n "${ANSIBLE_VAULT_PASSWORD}" > .ansible_vault_pw
-
export ANSIBLE_VAULT_PASSWORD_FILE=.ansible_vault_pw
-
export ANSIBLE_VAULT_PASSWORD_FILE=.ansible_vault_pw
-
with-ssh-key ansible-playbook -i hosts.ini --diff --check site.yml
-
with-ssh-key ansible-playbook -i hosts.ini --diff --check site.yml
-
grep
changed
=
ansible.log
| grep -q -v changed=0 &&
false
-
./ci/has-
changed ansible.log
artifacts
:
artifacts
:
paths
:
paths
:
-
ansible.log
-
ansible.log
...
...
This diff is collapsed.
Click to expand it.
ci/has-changed
0 → 100755
+
10
−
0
View file @
fe08f865
#!/bin/sh
log
=
"
$1
"
if
grep
changed
=
$log
|
grep
-v
-q
changed
=
0
;
then
echo
"changes were detected"
>
&2
exit
1
fi
exit
0
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