Commit 86f92790 authored by Yakubov, Sergey's avatar Yakubov, Sergey
Browse files

first commit

parent 36169fbb
Loading
Loading
Loading
Loading

.gitignore

0 → 100644
+2 −0
Original line number Diff line number Diff line
.idea
dist
 No newline at end of file

.gitlab-ci.yml

0 → 100644
+48 −0
Original line number Diff line number Diff line
stages:
  - package
  - build

variables:
  GIT_STRATEGY: clone
  CONTAINER_RUCIO_URL: "${CI_REGISTRY_IMAGE}/rucio"

# This import is for the func_rse_docker_* functions
before_script:
  - curl https://code.ornl.gov/rse-deployment/rse-sharables/raw/master/rse-bash-modules.sh -O
  - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
  - source rse-bash-modules.sh
  - func_rse_docker_cleanup

after_script:
  - curl https://code.ornl.gov/rse-deployment/rse-sharables/raw/master/rse-bash-modules.sh -O
  - source rse-bash-modules.sh
  - func_rse_docker_cleanup
  - sudo chown -R gitlab-runner .

package-build:
  stage: package
  script:
    - >
      docker run
      -v `pwd`:/src      
      code.ornl.gov:4567/rse/images/python:3.10-slim
      bash -c "cd /src && pip install poetry && poetry build && 
      poetry config repositories.gitlab_repo ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi && 
      poetry publish -u gitlab-ci-token -p ${CI_JOB_TOKEN} -r gitlab_repo
      "
  when: manual
  tags:
    - rse-multi-builder


image-build:
  stage: build
  script:
    - >    
      docker build
      -f dockerfiles/Dockerfile
      -t rucio .
    - docker tag rucio $CONTAINER_RUCIO_URL/$CI_COMMIT_REF_NAME:$CI_COMMIT_SHORT_SHA
    - docker push $CONTAINER_RUCIO_URL/$CI_COMMIT_REF_NAME:$CI_COMMIT_SHORT_SHA
  tags:
    - rse-multi-builder
 No newline at end of file

dockerfiles/Dockerfile

0 → 100644
+7 −0
Original line number Diff line number Diff line
FROM rucio/rucio-server:release-1.29.8

RUN pip install poetry

COPY . /src
RUN cd /src && poetry config virtualenvs.create false && poetry install

pyproject.toml

0 → 100644
+14 −0
Original line number Diff line number Diff line
[tool.poetry]
name = "rucio_protocols"
version = "0.1.0"
description = ""
authors = ["ORNL"]
readme = "README.md"
packages = [{include = "rucio_protocols"}]

[tool.poetry.dependencies]
python = "^3.5"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
+14 −0
Original line number Diff line number Diff line
# -*- coding: utf-8 -*-
# Copyright European Organization for Nuclear Research (CERN) since 2012
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
Loading