Skip to content
This repository was archived by the owner on Jul 28, 2024. It is now read-only.

Commit 5517004

Browse files
authored
Merge pull request env0#255 from env0/chore-add-commits-compare-integ-test
Chore: Add commits compare integration tests
2 parents fb9920a + 9ee39b5 commit 5517004

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
version: 2
2+
deploy:
3+
steps:
4+
setupVariables:
5+
after:
6+
- name: "Compare revisions"
7+
run: |
8+
#!/bin/bash
9+
10+
# Ensure that the script exits on any error
11+
set -e
12+
13+
# Get the current git revision
14+
current_revision=$(git rev-parse HEAD)
15+
16+
echo "current revision: $current_revision"
17+
echo "env0 revision: $ENV0_DEPLOYMENT_REVISION"
18+
19+
# Compare the current git revision with the ENV0_DEPLOYMENT_REVISION
20+
if [ "$current_revision" != "$ENV0_DEPLOYMENT_REVISION" ]; then
21+
echo "Error: Current git revision ($current_revision) does not match ENV0_DEPLOYMENT_REVISION ($ENV0_DEPLOYMENT_REVISION)." >&2
22+
exit 1
23+
fi
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
resource "null_resource" "null" {
2+
}

0 commit comments

Comments
 (0)