Skip to content

Commit

Permalink
Merge pull request #238 from NipunaRanasinghe/master
Browse files Browse the repository at this point in the history
Update docker command to docker compose v2
  • Loading branch information
ayeshLK authored Aug 15, 2024
2 parents 57dc6af + d72ebed commit 3cdc77e
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-with-bal-test-graalvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
- name: Start Redis Server
run: |
cd ballerina/tests/resources/docker
docker-compose -f docker-compose-standalone.yml up -d
docker compose -f compose-standalone.yml up -d
- name: Test with GraalVM
run: |
Expand All @@ -65,4 +65,4 @@ jobs:
- name: Stop Redis Server
run: |
cd ballerina/tests/resources/docker
docker-compose -f docker-compose-standalone.yml down
docker compose -f compose-standalone.yml down
6 changes: 3 additions & 3 deletions ballerina/Ballerina.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
distribution = "2201.7.0"
org="ballerinax"
name = "redis"
version = "3.0.2"
version = "3.0.3"
authors = ["Ballerina"]
keywords = ["IT Operations/Databases", "Cost/Freemium"]
icon = "icon.png"
Expand All @@ -16,8 +16,8 @@ graalvmCompatible = true
groupId = "io.ballerina.lib"
artifactId = "redis-native"
module = "redis-native"
version="3.0.2"
path = "../native/build/libs/redis-native-3.0.2.jar"
version="3.0.3-SNAPSHOT"
path = "../native/build/libs/redis-native-3.0.3-SNAPSHOT.jar"

[[platform.java17.dependency]]
groupId = "io.lettuce"
Expand Down
2 changes: 1 addition & 1 deletion ballerina/Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ dependencies = [
[[package]]
org = "ballerinax"
name = "redis"
version = "3.0.2"
version = "3.0.3"
dependencies = [
{org = "ballerina", name = "crypto"},
{org = "ballerina", name = "jballerina.java"},
Expand Down
16 changes: 8 additions & 8 deletions ballerina/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -104,16 +104,16 @@ task startRedisServer() {
gradle.taskGraph.whenReady { graph ->
if (graph.hasTask(":${packageName}-ballerina:test")) {
println("Starting redis server...")
def dockerComposeFile = "docker-compose-standalone.yml"
def dockerComposeFile = "compose-standalone.yml"
if (System.getenv("TEST_CLUSTER_MODE")?.toBoolean()) {
dockerComposeFile = "docker-compose-cluster.yml"
dockerComposeFile = "compose-cluster.yml"
}

exec {
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
commandLine 'cmd', '/c', "docker-compose -f tests/resources/docker/${dockerComposeFile} up && exit %%ERRORLEVEL%%"
commandLine 'cmd', '/c', "docker compose -f tests/resources/docker/${dockerComposeFile} up && exit %%ERRORLEVEL%%"
} else {
commandLine 'sh', '-c', "docker-compose -f tests/resources/docker/${dockerComposeFile} up -d"
commandLine 'sh', '-c', "docker compose -f tests/resources/docker/${dockerComposeFile} up -d"
}
}
}
Expand All @@ -125,16 +125,16 @@ task stopRedisServer() {
gradle.taskGraph.whenReady { graph ->
if (graph.hasTask(":${packageName}-ballerina:test")) {
println("Stopping redis server...")
def dockerComposeFile = "docker-compose-standalone.yml"
def dockerComposeFile = "compose-standalone.yml"
if (System.getenv("TEST_CLUSTER_MODE")?.toBoolean()) {
dockerComposeFile = "docker-compose-cluster.yml"
dockerComposeFile = "compose-cluster.yml"
}

exec {
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
commandLine 'cmd', '/c', "docker-compose -f tests/resources/docker/${dockerComposeFile} down && exit %%ERRORLEVEL%%"
commandLine 'cmd', '/c', "docker compose -f tests/resources/docker/${dockerComposeFile} down && exit %%ERRORLEVEL%%"
} else {
commandLine 'sh', '-c', "docker-compose -f tests/resources/docker/${dockerComposeFile} down"
commandLine 'sh', '-c', "docker compose -f tests/resources/docker/${dockerComposeFile} down"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3.0'

services:
redis-cluster-node1:
image: redis:7.2.2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3.0'

services:
redis-standalone:
image: redis:7.2.2
Expand Down
2 changes: 1 addition & 1 deletion examples/rate-limiting/Redis rate limiting.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Use the following command to start a Redis server using Docker. It will start th
interact with Redis.

```bash
docker-compose up
docker compose up
```

Once you run the following command, you can access the RedisInsight web interface by navigating to
Expand Down
File renamed without changes.

0 comments on commit 3cdc77e

Please sign in to comment.