Run on external pull request (#18)

* Run on external pull request

* Working linux build, disable pull requests for now

* Try manual flag

* Try manual flag 2

* Try manual flag 3

* Travis -> Gitlab
This commit is contained in:
Ugljesa Jovanovic 2020-10-05 20:01:20 +00:00 committed by GitHub
parent 1a470eb272
commit aea3eb72fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 31 additions and 7 deletions

View File

@ -1,19 +1,43 @@
stages:
- prepare
- build
- deploy
workflow: workflow:
rules: rules:
- if: $CI_MERGE_REQUEST_IID - if: $CI_EXTERNAL_PULL_REQUEST_IID
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
variables:
GIT_SUBMODULE_STRATEGY: recursive
simpleCheck:
stage: prepare
script: ./gradlew tasks
tags:
- linuxX64
buildLinux: buildLinux:
stage: build
when: manual
allow_failure: false
script: script:
- echo TEST_PULL_REQUEST_LINUX - echo TEST_PULL_REQUEST_LINUX
- env - ./linuxBuild.sh
tags: tags:
- linuxX64 - linuxX64
buildMac: buildMac:
stage: build
when: manual
allow_failure: false
script: echo TEST_PULL_REQUEST_MAC script: echo TEST_PULL_REQUEST_MAC
tags: tags:
- macos - macos
buildWindows: buildWindows:
stage: build
when: manual
allow_failure: false
script: echo TEST_PULL_REQUEST_WIN script: echo TEST_PULL_REQUEST_WIN
tags: tags:
- windowsX64 - windowsX64

View File

@ -13,7 +13,7 @@ import java.io.File
*/ */
fun isInIdea() = System.getProperty("idea.active") == "true" fun isInIdea() = System.getProperty("idea.active") == "true"
fun isInTravis() = System.getenv("TRAVIS") == "true" fun isInGitlabCi() = System.getenv("GITLAB_CI") == "true"
fun getProjectPath() : String { fun getProjectPath() : String {
val path = System.getProperty("PROJECT_PATH") val path = System.getProperty("PROJECT_PATH")
@ -49,8 +49,8 @@ fun KotlinMultiplatformExtension.isNotRunningInIdea(block: KotlinMultiplatformEx
} }
} }
fun KotlinMultiplatformExtension.isRunningInTravis(block: KotlinMultiplatformExtension.() -> Unit) { fun KotlinMultiplatformExtension.isRunningInGitlabCi(block: KotlinMultiplatformExtension.() -> Unit) {
if (isInTravis()) { if (isInGitlabCi()) {
block(this) block(this)
} }
} }

View File

@ -61,7 +61,7 @@ kotlin {
js { js {
browser { browser {
testTask { testTask {
isRunningInTravis { isRunningInGitlabCi {
enabled = false //Until I sort out testing on travis enabled = false //Until I sort out testing on travis
} }
useKarma { useKarma {

View File

@ -84,7 +84,7 @@ kotlin {
js { js {
browser { browser {
testTask { testTask {
isRunningInTravis { isRunningInGitlabCi {
enabled = false //Until I sort out testing on travis enabled = false //Until I sort out testing on travis
} }
useKarma { useKarma {