Skip to content

Commit

Permalink
Merge pull request #199 from JeremiahSanders/release/1.12.0
Browse files Browse the repository at this point in the history
Release/1.12.0
  • Loading branch information
JeremiahSanders authored Jun 11, 2024
2 parents b3627e9 + e1869a9 commit e35f3cd
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .project-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "cicee",
"description": "Runs continuous integration workloads via docker-compose, locally or on a build server.",
"title": "Continuous Integration Containerized Execution Environment (CICEE)",
"version": "1.11.0",
"version": "1.12.0",
"ciEnvironment": {
"variables": [
{
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ CICEE also provides a [continuous integration shell function library][cicee-lib]

* `bash`: bash shell
* `docker`: Docker command-line interface
* `docker-compose`: Docker Compose command-line interface (compose file version `3.7` support required)
* `dotnet`: .NET SDK (`6.x`, `7.x`, and `8.x` supported)

## Why use CICEE?
Expand Down
2 changes: 1 addition & 1 deletion bin/apply-template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ set -o pipefail # Fail pipelines if any command errors, not just the last one.
# I.e., updates the project to use the current CICEE template.
###

dotnet run --project src --framework net6.0 -- template init -f &&
dotnet run --project src --framework net8.0 -- template init -f &&
git checkout HEAD ci/libexec/ci-workflows.sh
3 changes: 3 additions & 0 deletions ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
FROM gnosian/ci-env-dotnet AS build-environment

# Add exception for known `cicee exec` mount directory. Without this, GitHub Actions fails to resolve current commit SHA (which defaults to "0000000").
RUN git config --global --add safe.directory /code
2 changes: 1 addition & 1 deletion ci/libexec/ci-workflows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ declare WORKFLOWS_SCRIPT_DIRECTORY="$(dirname "${WORKFLOWS_SCRIPT_LOCATION}")"
PROJECT_ROOT="${PROJECT_ROOT:-$(cd "${WORKFLOWS_SCRIPT_DIRECTORY}" && cd ../.. && pwd)}"

# Load the CI action library.
source "$(dotnet run --project src --framework net6.0 -- lib)"
source "$(dotnet run --project src --framework net8.0 -- lib)"

####
#-- BEGIN Workflow Compositions
Expand Down
6 changes: 3 additions & 3 deletions src/Cicee.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<PropertyGroup>
<Authors>jds</Authors>
<Company />
<Copyright>Copyright (c) 2023 Jeremiah Sanders</Copyright>
<Copyright>Copyright (c) 2024 Jeremiah Sanders</Copyright>
<Description>Continuous Integration Containerized Execution Environment</Description>
<PackageId>cicee</PackageId>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand All @@ -26,8 +26,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Jds.LanguageExt.Extras" Version="0.6.0" />
<PackageReference Include="LanguageExt.Core" Version="4.4.3" />
<PackageReference Include="Jds.LanguageExt.Extras" Version="1.0.0" />
<PackageReference Include="LanguageExt.Core" Version="4.4.8" />
<PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
</ItemGroup>

Expand Down
3 changes: 1 addition & 2 deletions src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ CICEE also provides a [continuous integration shell function library][cicee-lib]

* `bash`: bash shell
* `docker`: Docker command-line interface
* `docker-compose`: Docker Compose command-line interface (compose file version `3.7` support required)
* `dotnet`: .NET runtime (`6.x` supported)
* `dotnet`: .NET SDK (`6.x`, `7.x`, and `8.x` supported)

## Why use CICEE?

Expand Down
23 changes: 20 additions & 3 deletions src/lib/cicee-exec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,23 @@ else
fi
fi

# Run docker compose and check that it returns exit code 0, telling us that `compose` is supported.
_=$(docker compose)
docker_compose_exit_code=$?
# Define a `docker_compose_executable` variable for the compose entrypoint
if [[ $docker_compose_exit_code -eq 0 ]]; then
# Docker CLI supports compose command
docker_compose_executable="docker compose"
else
if command -v docker-compose &>/dev/null; then
# Docker CLI didn't support 'compose', but 'docker-compose' is defined
docker_compose_executable="docker-compose"
else
echo "Docker Compose is not detected. Cannot continue." &&
exit -1
fi
fi

__arrange() {
__build_project_ci() {
if [[ -f "${PROJECT_ROOT}/ci/Dockerfile" ]]; then
Expand All @@ -100,7 +117,7 @@ __arrange() {
CI_EXEC_CONTEXT="${CI_EXEC_CONTEXT:-}" \
CI_ENTRYPOINT="${CI_ENTRYPOINT:-}" \
CI_COMMAND="${CI_COMMAND:-}" \
docker-compose \
${docker_compose_executable} \
"${COMPOSE_FILE_ARGS[@]}" \
pull \
--ignore-pull-failures \
Expand All @@ -120,7 +137,7 @@ __act() {
CI_ENTRYPOINT="${CI_ENTRYPOINT:-}" \
CI_COMMAND="${CI_COMMAND:-}" \
COMPOSE_PROJECT_NAME="${PROJECT_NAME}" \
docker-compose \
${docker_compose_executable} \
"${COMPOSE_FILE_ARGS[@]}" \
up \
--abort-on-container-exit \
Expand All @@ -137,7 +154,7 @@ __cleanup() {
CI_ENTRYPOINT="${CI_ENTRYPOINT:-}" \
CI_COMMAND="${CI_COMMAND:-}" \
COMPOSE_PROJECT_NAME="${PROJECT_NAME}" \
docker-compose \
${docker_compose_executable} \
"${COMPOSE_FILE_ARGS[@]}" \
down \
--volumes \
Expand Down
10 changes: 5 additions & 5 deletions tests/integration/Cicee.Tests.Integration.csproj
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
<LangVersion>10</LangVersion>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.2" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="xunit" Version="2.8.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.0">
<PackageReference Include="coverlet.collector" Version="6.0.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
10 changes: 5 additions & 5 deletions tests/unit/Cicee.Tests.Unit.csproj
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
<IsPackable>false</IsPackable>
<LangVersion>10</LangVersion>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.2" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="xunit" Version="2.8.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.0">
<PackageReference Include="coverlet.collector" Version="6.0.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down

0 comments on commit e35f3cd

Please sign in to comment.