From 4706efe68ccfb1ed2c67c6928e0e18c636f51ca2 Mon Sep 17 00:00:00 2001 From: Jonathan Thomas Date: Thu, 24 May 2018 03:09:42 -0500 Subject: [PATCH 1/4] Refactor of GitLab Ci --- .gitlab-ci.yml | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 844e0b22..e28f332e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,12 +2,20 @@ stages: - build-libopenshot - trigger-openshot-qt -linux-builder: +builder-template: &builder-template stage: build-libopenshot artifacts: expire_in: 6 months paths: - build/install-x64/* + script: + - echo "Template" + when: always + only: + - master + +linux-builder: + <<: *builder-template script: - "curl -O -J -L --header PRIVATE-TOKEN:$ACCESS_TOKEN 'http://gitlab.openshot.org/jonathan/libopenshot-audio/-/jobs/artifacts/master/download?job=linux-builder'" - unzip artifacts.zip @@ -18,16 +26,11 @@ linux-builder: - make install - cp src/bindings/python/*openshot* install-x64/lib - echo -e "CI_PROJECT_NAME:$CI_PROJECT_NAME\nCI_COMMIT_REF_NAME:$CI_COMMIT_REF_NAME\nCI_COMMIT_SHA:$CI_COMMIT_SHA\nCI_JOB_ID:$CI_JOB_ID" > "install-x64/share/$CI_PROJECT_NAME" - when: always tags: - linux mac-builder: - stage: build-libopenshot - artifacts: - expire_in: 6 months - paths: - - build/install-x64/* + <<: *builder-template script: - "curl -O -J -L --header PRIVATE-TOKEN:$ACCESS_TOKEN 'http://gitlab.openshot.org/jonathan/libopenshot-audio/-/jobs/artifacts/master/download?job=mac-builder'" - unzip artifacts.zip @@ -38,16 +41,11 @@ mac-builder: - make install - cp src/bindings/python/*openshot* install-x64/lib - echo -e "CI_PROJECT_NAME:$CI_PROJECT_NAME\nCI_COMMIT_REF_NAME:$CI_COMMIT_REF_NAME\nCI_COMMIT_SHA:$CI_COMMIT_SHA\nCI_JOB_ID:$CI_JOB_ID" > "install-x64/share/$CI_PROJECT_NAME" - when: always tags: - mac windows-builder-x86: - stage: build-libopenshot - artifacts: - expire_in: 6 months - paths: - - build\install-x86\* + <<: *builder-template script: - Invoke-WebRequest -Uri "http://gitlab.openshot.org/jonathan/libopenshot-audio/-/jobs/artifacts/master/download?job=windows-builder-x86" -Headers @{"PRIVATE-TOKEN"="$ACCESS_TOKEN"} -OutFile "artifacts.zip" - Expand-Archive -Path artifacts.zip -DestinationPath . @@ -63,16 +61,11 @@ windows-builder-x86: - cp src\bindings\python\*openshot* install-x86\lib - cp src\libopenshot.dll install-x86\lib - New-Item -path "install-x86/share/" -Name "$CI_PROJECT_NAME" -Value "CI_PROJECT_NAME:$CI_PROJECT_NAME`nCI_COMMIT_REF_NAME:$CI_COMMIT_REF_NAME`nCI_COMMIT_SHA:$CI_COMMIT_SHA`nCI_JOB_ID:$CI_JOB_ID" -ItemType file -force - when: always tags: - windows windows-builder-x64: - stage: build-libopenshot - artifacts: - expire_in: 6 months - paths: - - build\install-x64\* + <<: *builder-template script: - Invoke-WebRequest -Uri "http://gitlab.openshot.org/jonathan/libopenshot-audio/-/jobs/artifacts/master/download?job=windows-builder-x64" -Headers @{"PRIVATE-TOKEN"="$ACCESS_TOKEN"} -OutFile "artifacts.zip" - Expand-Archive -Path artifacts.zip -DestinationPath . @@ -88,7 +81,6 @@ windows-builder-x64: - cp src\bindings\python\*openshot* install-x64\lib - cp src\libopenshot.dll install-x64\lib - New-Item -path "install-x64/share/" -Name "$CI_PROJECT_NAME" -Value "CI_PROJECT_NAME:$CI_PROJECT_NAME`nCI_COMMIT_REF_NAME:$CI_COMMIT_REF_NAME`nCI_COMMIT_SHA:$CI_COMMIT_SHA`nCI_JOB_ID:$CI_JOB_ID" -ItemType file -force - when: always tags: - windows @@ -99,4 +91,6 @@ trigger-pipeline: when: always dependencies: [] tags: - - linux \ No newline at end of file + - linux + only: + - master \ No newline at end of file From 954455e9abe01add70eebacdc03039df33d5b611 Mon Sep 17 00:00:00 2001 From: Jonathan Thomas Date: Thu, 24 May 2018 03:14:24 -0500 Subject: [PATCH 2/4] Another small syntax change to gitlab ci --- .gitlab-ci.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e28f332e..3cf75677 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,8 +11,6 @@ builder-template: &builder-template script: - echo "Template" when: always - only: - - master linux-builder: <<: *builder-template @@ -28,6 +26,8 @@ linux-builder: - echo -e "CI_PROJECT_NAME:$CI_PROJECT_NAME\nCI_COMMIT_REF_NAME:$CI_COMMIT_REF_NAME\nCI_COMMIT_SHA:$CI_COMMIT_SHA\nCI_JOB_ID:$CI_JOB_ID" > "install-x64/share/$CI_PROJECT_NAME" tags: - linux + only: + - master mac-builder: <<: *builder-template @@ -43,6 +43,8 @@ mac-builder: - echo -e "CI_PROJECT_NAME:$CI_PROJECT_NAME\nCI_COMMIT_REF_NAME:$CI_COMMIT_REF_NAME\nCI_COMMIT_SHA:$CI_COMMIT_SHA\nCI_JOB_ID:$CI_JOB_ID" > "install-x64/share/$CI_PROJECT_NAME" tags: - mac + only: + - master windows-builder-x86: <<: *builder-template @@ -63,6 +65,8 @@ windows-builder-x86: - New-Item -path "install-x86/share/" -Name "$CI_PROJECT_NAME" -Value "CI_PROJECT_NAME:$CI_PROJECT_NAME`nCI_COMMIT_REF_NAME:$CI_COMMIT_REF_NAME`nCI_COMMIT_SHA:$CI_COMMIT_SHA`nCI_JOB_ID:$CI_JOB_ID" -ItemType file -force tags: - windows + only: + - master windows-builder-x64: <<: *builder-template @@ -83,6 +87,8 @@ windows-builder-x64: - New-Item -path "install-x64/share/" -Name "$CI_PROJECT_NAME" -Value "CI_PROJECT_NAME:$CI_PROJECT_NAME`nCI_COMMIT_REF_NAME:$CI_COMMIT_REF_NAME`nCI_COMMIT_SHA:$CI_COMMIT_SHA`nCI_JOB_ID:$CI_JOB_ID" -ItemType file -force tags: - windows + only: + - master trigger-pipeline: stage: trigger-openshot-qt From 1038fc4f1ddcde3108faf6729f953a1ae3d9c50c Mon Sep 17 00:00:00 2001 From: Jonathan Thomas Date: Thu, 24 May 2018 03:22:10 -0500 Subject: [PATCH 3/4] Another small syntax change to gitlab ci --- .gitlab-ci.yml | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3cf75677..65109371 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,18 +2,12 @@ stages: - build-libopenshot - trigger-openshot-qt -builder-template: &builder-template +linux-builder: stage: build-libopenshot artifacts: expire_in: 6 months paths: - build/install-x64/* - script: - - echo "Template" - when: always - -linux-builder: - <<: *builder-template script: - "curl -O -J -L --header PRIVATE-TOKEN:$ACCESS_TOKEN 'http://gitlab.openshot.org/jonathan/libopenshot-audio/-/jobs/artifacts/master/download?job=linux-builder'" - unzip artifacts.zip @@ -24,13 +18,18 @@ linux-builder: - make install - cp src/bindings/python/*openshot* install-x64/lib - echo -e "CI_PROJECT_NAME:$CI_PROJECT_NAME\nCI_COMMIT_REF_NAME:$CI_COMMIT_REF_NAME\nCI_COMMIT_SHA:$CI_COMMIT_SHA\nCI_JOB_ID:$CI_JOB_ID" > "install-x64/share/$CI_PROJECT_NAME" + when: always tags: - linux only: - master mac-builder: - <<: *builder-template + stage: build-libopenshot + artifacts: + expire_in: 6 months + paths: + - build/install-x64/* script: - "curl -O -J -L --header PRIVATE-TOKEN:$ACCESS_TOKEN 'http://gitlab.openshot.org/jonathan/libopenshot-audio/-/jobs/artifacts/master/download?job=mac-builder'" - unzip artifacts.zip @@ -41,13 +40,18 @@ mac-builder: - make install - cp src/bindings/python/*openshot* install-x64/lib - echo -e "CI_PROJECT_NAME:$CI_PROJECT_NAME\nCI_COMMIT_REF_NAME:$CI_COMMIT_REF_NAME\nCI_COMMIT_SHA:$CI_COMMIT_SHA\nCI_JOB_ID:$CI_JOB_ID" > "install-x64/share/$CI_PROJECT_NAME" + when: always tags: - mac only: - master windows-builder-x86: - <<: *builder-template + stage: build-libopenshot + artifacts: + expire_in: 6 months + paths: + - build/install-x64/* script: - Invoke-WebRequest -Uri "http://gitlab.openshot.org/jonathan/libopenshot-audio/-/jobs/artifacts/master/download?job=windows-builder-x86" -Headers @{"PRIVATE-TOKEN"="$ACCESS_TOKEN"} -OutFile "artifacts.zip" - Expand-Archive -Path artifacts.zip -DestinationPath . @@ -63,13 +67,18 @@ windows-builder-x86: - cp src\bindings\python\*openshot* install-x86\lib - cp src\libopenshot.dll install-x86\lib - New-Item -path "install-x86/share/" -Name "$CI_PROJECT_NAME" -Value "CI_PROJECT_NAME:$CI_PROJECT_NAME`nCI_COMMIT_REF_NAME:$CI_COMMIT_REF_NAME`nCI_COMMIT_SHA:$CI_COMMIT_SHA`nCI_JOB_ID:$CI_JOB_ID" -ItemType file -force + when: always tags: - windows only: - master windows-builder-x64: - <<: *builder-template + stage: build-libopenshot + artifacts: + expire_in: 6 months + paths: + - build/install-x64/* script: - Invoke-WebRequest -Uri "http://gitlab.openshot.org/jonathan/libopenshot-audio/-/jobs/artifacts/master/download?job=windows-builder-x64" -Headers @{"PRIVATE-TOKEN"="$ACCESS_TOKEN"} -OutFile "artifacts.zip" - Expand-Archive -Path artifacts.zip -DestinationPath . @@ -85,6 +94,7 @@ windows-builder-x64: - cp src\bindings\python\*openshot* install-x64\lib - cp src\libopenshot.dll install-x64\lib - New-Item -path "install-x64/share/" -Name "$CI_PROJECT_NAME" -Value "CI_PROJECT_NAME:$CI_PROJECT_NAME`nCI_COMMIT_REF_NAME:$CI_COMMIT_REF_NAME`nCI_COMMIT_SHA:$CI_COMMIT_SHA`nCI_JOB_ID:$CI_JOB_ID" -ItemType file -force + when: always tags: - windows only: From 7adfdf46696973a5df7793cf7f8330b06ab7b576 Mon Sep 17 00:00:00 2001 From: Jonathan Thomas Date: Thu, 24 May 2018 03:26:39 -0500 Subject: [PATCH 4/4] Another small syntax change to gitlab ci --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 65109371..f15c9e08 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -51,7 +51,7 @@ windows-builder-x86: artifacts: expire_in: 6 months paths: - - build/install-x64/* + - build\install-x86\* script: - Invoke-WebRequest -Uri "http://gitlab.openshot.org/jonathan/libopenshot-audio/-/jobs/artifacts/master/download?job=windows-builder-x86" -Headers @{"PRIVATE-TOKEN"="$ACCESS_TOKEN"} -OutFile "artifacts.zip" - Expand-Archive -Path artifacts.zip -DestinationPath . @@ -78,7 +78,7 @@ windows-builder-x64: artifacts: expire_in: 6 months paths: - - build/install-x64/* + - build\install-x64\* script: - Invoke-WebRequest -Uri "http://gitlab.openshot.org/jonathan/libopenshot-audio/-/jobs/artifacts/master/download?job=windows-builder-x64" -Headers @{"PRIVATE-TOKEN"="$ACCESS_TOKEN"} -OutFile "artifacts.zip" - Expand-Archive -Path artifacts.zip -DestinationPath .