[bbb-greenlight: 15/16] Replace upstream pipeline with our own for building an image




commit f5db9e7324cc6ab5d395e9dcb9e3aaaba00a1243
Author: Bartłomiej Piotrowski <b bpiotrowski pl>
Date:   Mon Aug 3 12:28:23 2020 +0200

    Replace upstream pipeline with our own for building an image

 .gitlab-ci.yml | 85 ++++++++++++----------------------------------------------
 1 file changed, 17 insertions(+), 68 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 95b712a..e38140f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,71 +1,20 @@
-stages:
-  - test
-  - build
-  - deploy
-
-cache:
-  paths:
-    - /cache
-
-before_script:
-
-test:
+docker:
+  image: 'registry.fedoraproject.org/fedora:32'
   stage: test
-  image: ruby:2.5
+  variables:
+    STORAGE_DRIVER: 'vfs'
+    BUILDAH_FORMAT: 'docker'
+    BUILDAH_ISOLATION: 'chroot'
   script:
-  - apt-get update -qq && apt-get install -y -qq sqlite3 libsqlite3-dev nodejs
-  - bundle install --path /cache
-  - bundle exec rake db:create RAILS_ENV=test
-  - bundle exec rake test & bundle exec rspec & bundle exec rubocop
-  except:
-    variables:
-      - $CD_TEST_IGNORE
+    - dnf install -y buildah podman runc
+    - sed -i '/^mountopt =.*/d' /etc/containers/storage.conf
+    - |
+      cat >> /etc/containers/libpod.conf << END
+      cgroup_manager = "cgroupfs"
+      events_logger = "file"
+      END
 
-build:
-  stage: build
-  image: docker:stable
-  services:
-  - docker:dind
-  script:
-  # Install bash, curl, git for deployment script
-  - apk update && apk add --no-cache bash curl git
-  # Install CA certs, openssl to https downloads, python for gcloud sdk
-  - apk add --update make ca-certificates openssl python
-  - update-ca-certificates
-  # Build.
-  - ./scripts/image_build.sh $CI_PROJECT_PATH $CI_COMMIT_REF_NAME $CI_COMMIT_SHA
-  only:
-    refs:
-      - branches
-      - tags
-    variables:
-      - $CD_DOCKER_USERNAME
-      - $CD_DOCKER_PASSWORD
-  except:
-    variables:
-      - $CD_BUILD_IGNORE
-
-deploy:
-  stage: deploy
-  image: docker:stable
-  services:
-  - docker:dind
-  script:
-  # Install bash, curl, git for deployment script
-  - apk update && apk add --no-cache bash curl git
-  # Install CA certs, openssl to https downloads, python for gcloud sdk
-  - apk add --update make ca-certificates openssl python
-  - update-ca-certificates
-  # Deploy.
-  - ./scripts/image_deploy.sh $CI_PROJECT_PATH $CI_COMMIT_REF_NAME $CI_COMMIT_SHA $CI_COMMIT_BEFORE_SHA
-  only:
-    refs:
-      - branches
-      - tags
-    variables:
-      - $CD_DOCKER_USERNAME
-      - $CD_DOCKER_PASSWORD
-      - $CD_DEPLOY_SCRIPT
-  except:
-    variables:
-      - $CD_DEPLOY_IGNORE
+    - buildah login -u $CI_REGISTRY_USER -p $CI_REGISTRY_TOKEN registry.gitlab.gnome.org
+    - buildah bud -t greenlight .
+    - buildah tag greenlight registry.gitlab.gnome.org/infrastructure/bbb-greenlight:$CI_COMMIT_SHORT_SHA 
registry.gitlab.gnome.org/infrastructure/bbb-greenlight:latest
+    - buildah push registry.gitlab.gnome.org/infrastructure/bbb-greenlight:$CI_COMMIT_SHORT_SHA 
registry.gitlab.gnome.org/infrastructure/bbb-greenlight:latest


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]