Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace bash script with Cake.Docker task #2839

Merged
merged 1 commit into from
Aug 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ deploy:
# Rebuild + Publish Netkan on every merge to master
- provider: script
skip_cleanup: true
script: bin/build_netkan_container.sh
script: ./build docker-inflator
on:
repo: KSP-CKAN/CKAN
branch: master
Expand Down
5 changes: 0 additions & 5 deletions bin/build_netkan_container.sh

This file was deleted.

25 changes: 25 additions & 0 deletions build.cake
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#addin "nuget:?package=Cake.SemVer&version=3.0.0"
#addin "nuget:?package=semver&version=2.0.4"
#addin "nuget:?package=Cake.Docker&version=0.10.0"
#tool "nuget:?package=ILRepack&version=2.0.17"
#tool "nuget:?package=NUnit.ConsoleRunner&version=3.10.0"

Expand Down Expand Up @@ -33,6 +34,30 @@ Task("Ckan")
Task("Netkan")
.IsDependentOn("Repack-Netkan");

Task("docker-inflator")
.IsDependentOn("Repack-Netkan")
.Does(() =>
{
var dockerDirectory = buildDirectory.Combine("docker");
var inflatorDirectory = dockerDirectory.Combine("inflator");
CreateDirectory(inflatorDirectory);
CopyFile(buildDirectory.CombineWithFilePath("netkan.exe"),
inflatorDirectory.CombineWithFilePath("netkan.exe"));

var mainTag = "kspckan/inflator";
var latestTag = mainTag + ":latest";
DockerBuild(
new DockerImageBuildSettings()
{
File = "Dockerfile.netkan",
Tag = new string[] { mainTag }
},
inflatorDirectory.ToString()
);
DockerTag(mainTag, latestTag);
DockerPush(latestTag);
});

Task("osx")
.IsDependentOn("Ckan")
.Does(() => StartProcess("make",
Expand Down