DEV Community

Query Filter
Query Filter

Posted on

docker15

// 1. Define the TAR task explicitly to ensure it isn't skipped
task buildAnsibleTar(type: Tar) {
    archiveFileName = "ansible.tar.gz"
    destinationDirectory = file("$buildDir/distributions")
    compression = Compression.GZIP

    // Include the RPM from the buildRpm task
    from(tasks.named('buildRpm'))

    // Explicitly include your ansible folder from the project root
    from("${projectDir}/ansible") {
        into('ansible')
    }
}

// 2. Hook it into the lifecycle
tasks.named('buildRpm') { dependsOn tasks.named('jar') }
buildAnsibleTar.dependsOn tasks.named('buildRpm')
publish.dependsOn buildAnsibleTar
Enter fullscreen mode Exit fullscreen mode

Top comments (0)