Commit 346fcb7d authored by Yakubov, Sergey's avatar Yakubov, Sergey
Browse files

Merge branch '1-add-remote-data-broker-protocol' into 'main'

Resolve "Add remote data broker protocol"

Closes #1

See merge request !1
parents 36169fbb ee7a9b2b
Loading
Loading
Loading
Loading
Loading

.gitignore

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

.gitlab-ci.yml

0 → 100644
+54 −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
  variables:
    RUCIO_TAG: 1.29.8
    PROTOCOLS_VERSION: 0.1.0
  script:
    - >    
      docker build
      -f dockerfiles/Dockerfile
      --build-arg RUCIO_TAG=${RUCIO_TAG}
      --build-arg PROTOCOLS_VERSION=${PROTOCOLS_VERSION}
      -t rucio .
    - docker tag rucio $CONTAINER_RUCIO_URL:${RUCIO_TAG}_p${PROTOCOLS_VERSION}
    - docker push $CONTAINER_RUCIO_URL:${RUCIO_TAG}_p${PROTOCOLS_VERSION}
  when: manual
  tags:
    - rse-multi-builder
 No newline at end of file

dockerfiles/Dockerfile

0 → 100644
+6 −0
Original line number Diff line number Diff line
ARG RUCIO_TAG
FROM rucio/rucio-server:release-${RUCIO_TAG}
ARG PROTOCOLS_VERSION

RUN pip install rucio-protocols==${PROTOCOLS_VERSION} --index-url https://code.ornl.gov/api/v4/projects/13491/packages/pypi/simple

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