From 1ab67f4257fa7dfe4e27b02643db860a96487a98 Mon Sep 17 00:00:00 2001 From: varac Date: Fri, 24 Jun 2016 12:48:16 +0200 Subject: Added .gitlab-ci.yml - build a gem and upload it as artefact to 0xacab - trigger platform pipeline --- .gitlab-ci.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .gitlab-ci.yml (limited to '.gitlab-ci.yml') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..3404346 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,25 @@ +before_script: + - ruby -v + +image: ruby:2.1 + +stages: + - syntax + - build + +build: + stage: build + script: + - rake build + artifacts: + paths: + - pkg/leap_cli-1.9.gem + +# trigger leap_platform pipeline using same REF +# as it is used for this project +# (i.e. a push to leap_cli:develop will trigger +# a leap_platform:develop build) +trigger: + type: deploy + script: + - "curl -X POST -F token=$PLATFORM_TRIGGER_TOKEN -F ref=$CI_BUILD_REF_NAME https://0xacab.org/api/v3/projects/129/trigger/builds" -- cgit v1.2.3 From e46c4c64128621c2e84233e27b63040c027be88f Mon Sep 17 00:00:00 2001 From: varac Date: Mon, 27 Jun 2016 11:33:38 +0200 Subject: [wip] testing .gitlab-ci.yml --- .gitlab-ci.yml | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to '.gitlab-ci.yml') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3404346..2cd09eb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,25 +1,23 @@ -before_script: - - ruby -v - image: ruby:2.1 stages: - syntax - build + - trigger build: stage: build script: - rake build - artifacts: - paths: - - pkg/leap_cli-1.9.gem + # disable artefact upload until it's fixed + # see https://leap.se/code/issues/8221 + #artifacts: + # paths: + # - pkg/leap_cli-1.9.gem -# trigger leap_platform pipeline using same REF -# as it is used for this project -# (i.e. a push to leap_cli:develop will trigger -# a leap_platform:develop build) +# trigger leap_platform pipeline trigger: + stage: trigger type: deploy script: - - "curl -X POST -F token=$PLATFORM_TRIGGER_TOKEN -F ref=$CI_BUILD_REF_NAME https://0xacab.org/api/v3/projects/129/trigger/builds" + - curl -s -X POST -F token=${PLATFORM_TRIGGER_TOKEN} -F ref=develop https://0xacab.org/api/v3/projects/129/trigger/builds -- cgit v1.2.3 From 2d277c7d2aa3ddfbe3c2c65f68d7290930934b70 Mon Sep 17 00:00:00 2001 From: varac Date: Mon, 27 Jun 2016 23:42:35 +0200 Subject: re-enable gem artefact upload --- .gitlab-ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to '.gitlab-ci.yml') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2cd09eb..0e455a8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,11 +9,11 @@ build: stage: build script: - rake build - # disable artefact upload until it's fixed - # see https://leap.se/code/issues/8221 - #artifacts: - # paths: - # - pkg/leap_cli-1.9.gem + artifacts: + paths: + - pkg/leap_cli-*.gem + name: "leap_cli_${CI_BUILD_REF_NAME}_${CI_BUILD_REF}" + expire_in: 3 month # trigger leap_platform pipeline trigger: -- cgit v1.2.3 From b0c4f0efb6d52fc54230245e0f67c4991416b6a6 Mon Sep 17 00:00:00 2001 From: varac Date: Thu, 21 Jul 2016 22:12:51 +0200 Subject: Test gem installation --- .gitlab-ci.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to '.gitlab-ci.yml') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0e455a8..3b5bee8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,6 @@ -image: ruby:2.1 +image: leapcode/ruby:2.1-slim stages: - - syntax - build - trigger @@ -9,6 +8,11 @@ build: stage: build script: - rake build + #- sudo rake install + #- ./bin/leap + - gem install --user-install pkg/leap_cli-*.gem + - export PATH="$PATH:$(ruby -e 'puts Gem.user_dir')/bin" + - leap artifacts: paths: - pkg/leap_cli-*.gem -- cgit v1.2.3 From 79330af765392972b31273a0d5e34e9b63176bec Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Tue, 13 Sep 2016 15:52:52 -0400 Subject: add a gitlab CI stage for running tests --- .gitlab-ci.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to '.gitlab-ci.yml') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3b5bee8..70ca8e2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,6 +2,7 @@ image: leapcode/ruby:2.1-slim stages: - build + - test - trigger build: @@ -10,7 +11,7 @@ build: - rake build #- sudo rake install #- ./bin/leap - - gem install --user-install pkg/leap_cli-*.gem + - "gem install --user-install pkg/leap_cli-*.gem" - export PATH="$PATH:$(ruby -e 'puts Gem.user_dir')/bin" - leap artifacts: @@ -19,9 +20,17 @@ build: name: "leap_cli_${CI_BUILD_REF_NAME}_${CI_BUILD_REF}" expire_in: 3 month +test:  +    stage: test +    script: +      - "gem install --user-install pkg/leap_cli-*.gem" +      - export PATH="$PATH:$(ruby -e 'puts Gem.user_dir')/bin" +      - leap +      - rake test + # trigger leap_platform pipeline trigger: stage: trigger type: deploy script: - - curl -s -X POST -F token=${PLATFORM_TRIGGER_TOKEN} -F ref=develop https://0xacab.org/api/v3/projects/129/trigger/builds + - "curl -s -X POST -F token=${PLATFORM_TRIGGER_TOKEN} -F ref=develop https://0xacab.org/api/v3/projects/129/trigger/builds" -- cgit v1.2.3 From 8e3ef4ba6a13fd03804696aaa41ced10131285c4 Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Tue, 13 Sep 2016 19:11:01 -0400 Subject: fix .gitlab-ci.yml spacing so it validates --- .gitlab-ci.yml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to '.gitlab-ci.yml') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 70ca8e2..8e556a4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,9 +8,7 @@ stages: build: stage: build script: - - rake build - #- sudo rake install - #- ./bin/leap + - "rake build" - "gem install --user-install pkg/leap_cli-*.gem" - export PATH="$PATH:$(ruby -e 'puts Gem.user_dir')/bin" - leap @@ -20,13 +18,13 @@ build: name: "leap_cli_${CI_BUILD_REF_NAME}_${CI_BUILD_REF}" expire_in: 3 month -test:  -    stage: test -    script: -      - "gem install --user-install pkg/leap_cli-*.gem" -      - export PATH="$PATH:$(ruby -e 'puts Gem.user_dir')/bin" -      - leap -      - rake test +test: + stage: test + script: + - "gem install --user-install pkg/leap_cli-*.gem" + - export PATH="$PATH:$(ruby -e 'puts Gem.user_dir')/bin" + - leap + - "rake test" # trigger leap_platform pipeline trigger: -- cgit v1.2.3 From 5448925ff1cb802da3ab626e685277aaef0fa4b9 Mon Sep 17 00:00:00 2001 From: elijah Date: Tue, 13 Sep 2016 17:12:32 -0700 Subject: fix gitlab test --- .gitlab-ci.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to '.gitlab-ci.yml') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8e556a4..9f3b66c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,10 +21,8 @@ build: test: stage: test script: - - "gem install --user-install pkg/leap_cli-*.gem" - - export PATH="$PATH:$(ruby -e 'puts Gem.user_dir')/bin" - - leap - - "rake test" + - bundle install --path vendor/bundle --with test + - rake test # trigger leap_platform pipeline trigger: -- cgit v1.2.3 From bc50fa403a76496df7fe3f242838da3bafa58665 Mon Sep 17 00:00:00 2001 From: elijah Date: Thu, 15 Sep 2016 11:38:24 -0700 Subject: fix ci test --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.gitlab-ci.yml') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9f3b66c..0269b93 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,7 +22,7 @@ test: stage: test script: - bundle install --path vendor/bundle --with test - - rake test + - bundle exec rake test # trigger leap_platform pipeline trigger: -- cgit v1.2.3 From e207c628f9aeadf1c93b6756f00bb97789dc7673 Mon Sep 17 00:00:00 2001 From: elijah Date: Wed, 28 Sep 2016 15:06:04 -0700 Subject: actually fix ci tests --- .gitlab-ci.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to '.gitlab-ci.yml') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0269b93..5aca7d3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,8 +21,14 @@ build: test: stage: test script: +# - apt-get install --yes pkg-config +# - bundle config build.nokogiri --use-system-libraries + - apt-get install rake - bundle install --path vendor/bundle --with test - - bundle exec rake test + - git clone https://leap.se/git/leap_platform.git -b develop + - chmod -R a+rwX test/provider + - useradd -ms /bin/bash testuser + - su -c "PLATFORM_DIR=$(readlink -e leap_platform) bundle exec rake test" testuser # trigger leap_platform pipeline trigger: -- cgit v1.2.3