This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| kubernetesClient = new DefaultKubernetesClient() | |
| updateFlag = new AtomicBoolean(true) | |
| void watch() { | |
| println("Start watching") | |
| kubernetesClient.events().inNamespace(namespaceName).watch(new Watcher < Event > () { | |
| @Override void eventReceived(Action action, Event resource) { | |
| // println("Event " + action.name() + " " + resource.toString()) | |
| updateFlag.set(true) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| String calculateConfig(Map configData) { | |
| def brothers = [] | |
| Endpoints endpoints = kubernetesClient.endpoints() | |
| .inNamespace(namespaceName) | |
| .withName(serviceName) | |
| .get() | |
| List < EndpointSubset > endpointItems = endpoints.getSubsets() | |
| endpointItems.each { | |
| subset -> | |
| def brotherPort = subset.getPorts().find { it.name == 'http'}.port |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| meta: | |
| boss-nexus: http://nexus.devops/repository/ | |
| pod-nexus: http://localhost:8081 | |
| service-namespace: devops | |
| service-name: nexus-proxy | |
| config: | |
| maven2: | |
| - name: maven-public | |
| hosted: | |
| - name: maven-releases |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM groovy:3.0-alpine | |
| ADD src/main/groovy/local.groovy /home/groovy/ | |
| ADD src/main/groovy/remote.groovy /home/groovy/ | |
| ADD src/main/groovy/run.sh /home/groovy/ | |
| ADD src/main/groovy/grapeConfig.xml /home/groovy/.groovy/ | |
| # repeating the command is a hacky way for http retrying | |
| RUN groovy -Dgrape.root=/home/groovy/grapes -Dgroovy.grape.report.downloads=true -Divy.message.logger.level=4 local.groovy -do_nothing || \ | |
| groovy -Dgrape.root=/home/groovy/grapes -Dgroovy.grape.report.downloads=true -Divy.message.logger.level=4 local.groovy -do_nothing || \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env sh | |
| # fail if anything errors | |
| set -e | |
| # fail if a function call is missing an argument | |
| set -u | |
| username=$(cat /nexus-password/username) | |
| password=$(cat /nexus-password/password) | |
| ip=$POD_IP |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| interface Device { | |
| val operatingSystem: OperatingSystem | |
| val serialNumber: String | |
| val model: String | |
| val manufacturer: String | |
| val networkState: NetworkState | |
| val deviceFeatures: Collection<DeviceFeature> | |
| val healthy: Boolean | |
| val abi: String |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| interface DeviceProvider { | |
| sealed class DeviceEvent { | |
| class DeviceConnected(val device: Device) : DeviceEvent() | |
| class DeviceDisconnected(val device: Device) : DeviceEvent() | |
| } | |
| val deviceInitializationTimeoutMillis: Long | |
| suspend fun initialize(vendorConfiguration: VendorConfiguration) | |
| suspend fun terminate() | |
| fun subscribe() : Channel<DeviceEvent> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| interface TestParser { | |
| fun extract(configuration: Configuration) : List<Test> | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| data class TestBatch(val tests: List<Test>) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| data class TestShard( | |
| val tests: Collection<Test>, | |
| val flakyTests: Collection<Test> = emptyList() | |
| ) |