From 20ea2d0d074a2609c970a847fc1f1bfb4c000474 Mon Sep 17 00:00:00 2001 From: Gyusun Yeom Date: Sun, 22 Sep 2019 23:06:48 +0900 Subject: [PATCH] Move to azure pipeline --- azure-pipelines.yml | 21 ++++++++++ glew-cmake/Dockerfile | 10 +++++ glew-cmake/pipeline.yml | 73 ----------------------------------- glew-cmake/update-pipeline.sh | 1 - 4 files changed, 31 insertions(+), 74 deletions(-) create mode 100644 azure-pipelines.yml create mode 100644 glew-cmake/Dockerfile delete mode 100644 glew-cmake/pipeline.yml delete mode 100755 glew-cmake/update-pipeline.sh diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..adf7275 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,21 @@ +schedules: + - cron: "0 0 * * *" + displayName: Daily midnight build + branches: + include: + - master + +jobs: +- job: NightlyUpdate + pool: + vmImage: 'ubuntu-16.04' + container: perlmint/glew-cmake:20190922 + steps: + - checkout: self + persistCredentials: true + - bash: | + export TEST_MODE=false + git config --global user.email $GIT_USEREMAIL && + git config --global user.name $GIT_USERNAME && + unset SYSTEM # remove SYSTEM variable set by azure pipeline + ./glew-cmake/maintain.sh \ No newline at end of file diff --git a/glew-cmake/Dockerfile b/glew-cmake/Dockerfile new file mode 100644 index 0000000..9fc0db8 --- /dev/null +++ b/glew-cmake/Dockerfile @@ -0,0 +1,10 @@ +# Azure pipeline require glibc based image +FROM debian:buster-slim + +RUN apt update && \ + apt install -y git make gcc python && \ + apt clean && \ + rm -rf /var/lib/apt/lists/* + +RUN mkdir -p ~/.ssh && \ + ssh-keyscan github.com >> ~/.ssh/known_hosts \ No newline at end of file diff --git a/glew-cmake/pipeline.yml b/glew-cmake/pipeline.yml deleted file mode 100644 index fcb1b9f..0000000 --- a/glew-cmake/pipeline.yml +++ /dev/null @@ -1,73 +0,0 @@ -resources: -- name: glew-cmake-repo - type: git - source: - uri: git@github.com:Perlmint/glew-cmake.git - branch: master - private_key: ((private-repo-key)) -- name: nightly - type: time - icon: clock-outline - source: - location: Asia/Seoul - start: 11:30 PM - stop: 11:59 PM -- name: build-image - type: docker-image - source: - repository: alpine - tag: edge - -run-script: &run-script | - apk add --no-cache perl git openssh-client make bash coreutils python2 - git config --global user.email "omniavinco@gmail.com" - git config --global user.name "Gyusun Yeom" - mkdir -p ~/.ssh - ssh-keyscan github.com >> ~/.ssh/known_hosts - echo | sed 's/^ \+//' > ~/.ssh/id_rsa <<- EOM - ((private-repo-key)) - EOM - chmod 600 ~/.ssh/id_rsa - cd ./glew-cmake-repo - git remote set-branches --add origin glew-cmake-release - git fetch - bash glew-cmake/maintain.sh - -jobs: -- name: Nightly update - plan: - - get: nightly - trigger: true - - get: build-image - - get: glew-cmake-repo - - task: update - image: build-image - config: - platform: linux - inputs: - - name: glew-cmake-repo - params: - TEST_MODE: false - run: - path: /bin/sh - args: - - -c - - *run-script -- name: Manual test - plan: - - get: build-image - - get: glew-cmake-repo - - task: update - image: build-image - config: - platform: linux - inputs: - - name: glew-cmake-repo - params: - TEST_MODE: true - run: - path: /bin/sh - args: - - -c - - *run-script - diff --git a/glew-cmake/update-pipeline.sh b/glew-cmake/update-pipeline.sh deleted file mode 100755 index 464d156..0000000 --- a/glew-cmake/update-pipeline.sh +++ /dev/null @@ -1 +0,0 @@ -fly set-pipeline -c pipeline.yml -p glew-cmake -t perlmint_ci --var "private-repo-key=$(sudo cat $1)"