File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set +e
4
+
5
+ UNIQUE_ID=$( date +%s%N) # Generate a unique identifier for this instance
6
+ CONTAINER_NAME=" osde2e-${UNIQUE_ID} " # Name of the container based on the unique identifier
7
+
8
+ # Check if the container already exists
9
+ if docker ps -a --format ' {{.Names}}' | grep -q " ^${CONTAINER_NAME} $" ; then
10
+ echo " Container ${CONTAINER_NAME} already exists. Exiting."
11
+ exit 1
12
+ fi
13
+
14
+ # Create the container with environment variables and unique name
15
+ docker create --name " ${CONTAINER_NAME} " -e OCM_TOKEN \
16
+ -e OCM_CLIENT_ID -e OCM_CLIENT_SECRET \
17
+ -e AWS_ACCESS_KEY_ID \
18
+ -e AWS_SECRET_ACCESS_KEY \
19
+ -e AWS_ACCOUNT_ID \
20
+ -e AWS_REGION \
21
+ -e ROSA_STS=" ${STS} " \
22
+ -e CHANNEL \
23
+ -e REPORT_DIR=' /tmp/osde2e-report' \
24
+ quay.io/redhat-services-prod/osde2e-cicada-tenant/osde2e:latest provision --reserve --configs " ${CONFIGS} "
25
+
26
+ # Start the container
27
+ docker start -a " ${CONTAINER_NAME} "
28
+
29
+ # Copy the junit results xml for publishing
30
+ docker cp " ${CONTAINER_NAME} " :/tmp/osde2e-report .
31
+
32
+ # Optionally, clean up by removing the container after use
33
+ docker rm " ${CONTAINER_NAME} "
You can’t perform that action at this time.
0 commit comments