From ad8c7232f7123ddf50320c0e8de82378099710d4 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 11 Aug 2019 17:07:16 -0700 Subject: [PATCH 1/7] Mark type exec --- .drone.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 4a66afa81..abfdd0bf1 100644 --- a/.drone.yml +++ b/.drone.yml @@ -40,13 +40,14 @@ steps: - /bin/bash -c ". ./qemux86-64-envsetup.sh && ./sources/openembedded-core/scripts/sstate-cache-management.sh -d -y" --- kind: pipeline -name: clean workspace +type: exec +name: cleanup clone: disable: true steps: -- name: cleanup +- name: clean trigger: status: - success From 3c60bcb82122c0053081616740f11497912e1543 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 11 Aug 2019 17:14:30 -0700 Subject: [PATCH 2/7] Add trigger to cleanup pipeline --- .drone.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.drone.yml b/.drone.yml index abfdd0bf1..16aa21176 100644 --- a/.drone.yml +++ b/.drone.yml @@ -46,6 +46,14 @@ name: cleanup clone: disable: true +trigger: + branch: + - master + - feature-drone-exec-runner + event: + - push + - pull_request + steps: - name: clean trigger: From 68c5059402f5a9bbd8fc84d8e8762ec228b16fe7 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 11 Aug 2019 18:03:58 -0700 Subject: [PATCH 3/7] set trigger to base on arm64 pipeline status --- .drone.yml | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/.drone.yml b/.drone.yml index 16aa21176..43a5dbe63 100644 --- a/.drone.yml +++ b/.drone.yml @@ -47,19 +47,12 @@ clone: disable: true trigger: - branch: - - master - - feature-drone-exec-runner - event: - - push - - pull_request + status: + - success + - failure steps: - name: clean - trigger: - status: - - success - - failure commands: - rm -rf /scratch/tmp-$DRONE_BUILD_NUMBER From 93127f484b416a4586ef16a58986bb788adfccbc Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 11 Aug 2019 18:08:04 -0700 Subject: [PATCH 4/7] Also add branch and event trigger to cleanup pipe --- .drone.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.drone.yml b/.drone.yml index 43a5dbe63..542a1d738 100644 --- a/.drone.yml +++ b/.drone.yml @@ -47,6 +47,12 @@ clone: disable: true trigger: + branch: + - master + - feature-drone-exec-runner + event: + - push + - pull_request status: - success - failure From db3710b56943500c779de4e3d531384b00c8b59a Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 11 Aug 2019 19:31:47 -0700 Subject: [PATCH 5/7] Define platform for cleanup pipeline --- .drone.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.drone.yml b/.drone.yml index 542a1d738..44154ce2a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -43,6 +43,10 @@ kind: pipeline type: exec name: cleanup +platform: + os: linux + arch: arm64 + clone: disable: true From 896987586c90efc93c776db024cbb27d579c8bec Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 11 Aug 2019 20:45:50 -0700 Subject: [PATCH 6/7] Test cleanup pipeline --- .drone.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 44154ce2a..eafeac85d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -36,8 +36,9 @@ steps: - echo IMAGE_CLASSES += \"testimage testsdk\" >> conf/local.conf - echo INHERIT += \"report-error rm_work\" >> conf/local.conf #- echo TESTIMAGE_AUTO_qemuall = \"1\" >> conf/local.conf - - /bin/bash -c ". ./qemux86-64-envsetup.sh && bitbake yoe-simple-image" - - /bin/bash -c ". ./qemux86-64-envsetup.sh && ./sources/openembedded-core/scripts/sstate-cache-management.sh -d -y" + - mkdir -p /scratch/tmp-$DRONE_BUILD_NUMBER + #- /bin/bash -c ". ./qemux86-64-envsetup.sh && bitbake yoe-simple-image" + #- /bin/bash -c ". ./qemux86-64-envsetup.sh && ./sources/openembedded-core/scripts/sstate-cache-management.sh -d -y" --- kind: pipeline type: exec @@ -64,6 +65,7 @@ trigger: steps: - name: clean commands: + - echo "build number $DRONE_BUILD_NUMBER" - rm -rf /scratch/tmp-$DRONE_BUILD_NUMBER depends_on: From abfb89615ab7160e311678de12b22ef75e1c1eab Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 11 Aug 2019 20:57:35 -0700 Subject: [PATCH 7/7] Few more echo cmds --- .drone.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.drone.yml b/.drone.yml index eafeac85d..a073c08f2 100644 --- a/.drone.yml +++ b/.drone.yml @@ -23,9 +23,9 @@ steps: - export DOCKER_REPO=none - export LANG=en_US.UTF-8 - export SSTATE_CACHE_DIR=/scratch/sstate-cache - - echo "build number $DRONE_BUILD_NUMBER" + - echo "Started build# $DRONE_BUILD_NUMBER" - echo "sstate cache dir = $SSTATE_CACHE_DIR" - - echo "building $${DRONE_GIT_HTTP_URL}, branch $${DRONE_REPO_BRANCH}" + - echo "building $DRONE_GIT_HTTP_URL, branch $DRONE_SOURCE_BRANCH" - git submodule update --recursive --init - echo export DOCKER_REPO=none > local.sh - echo export LANG=en_US.UTF-8 >> local.sh @@ -36,9 +36,8 @@ steps: - echo IMAGE_CLASSES += \"testimage testsdk\" >> conf/local.conf - echo INHERIT += \"report-error rm_work\" >> conf/local.conf #- echo TESTIMAGE_AUTO_qemuall = \"1\" >> conf/local.conf - - mkdir -p /scratch/tmp-$DRONE_BUILD_NUMBER - #- /bin/bash -c ". ./qemux86-64-envsetup.sh && bitbake yoe-simple-image" - #- /bin/bash -c ". ./qemux86-64-envsetup.sh && ./sources/openembedded-core/scripts/sstate-cache-management.sh -d -y" + - /bin/bash -c ". ./qemux86-64-envsetup.sh && bitbake yoe-simple-image" + - /bin/bash -c ". ./qemux86-64-envsetup.sh && ./sources/openembedded-core/scripts/sstate-cache-management.sh -d -y" --- kind: pipeline type: exec @@ -65,7 +64,7 @@ trigger: steps: - name: clean commands: - - echo "build number $DRONE_BUILD_NUMBER" + - echo "Deleting tmpdir for build# $DRONE_BUILD_NUMBER" - rm -rf /scratch/tmp-$DRONE_BUILD_NUMBER depends_on: