Skip to content

Commit

Permalink
first draft
Browse files Browse the repository at this point in the history
  • Loading branch information
vkuznet committed Mar 9, 2021
1 parent f916fd1 commit 5f5e2cc
Show file tree
Hide file tree
Showing 12 changed files with 1,243 additions and 0 deletions.
86 changes: 86 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Build

on:
push:
tags:
- '*.*.*'

jobs:

build:
name: Build
runs-on: ubuntu-latest
steps:

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ^1.15

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Build
run: |
make
mkdir rucio-tracer-tools
cp messanger/messanger server/server rucio-tracer-tools
tar cfz rucio-tracer-tools.tar.gz rucio-tracer-tools

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

- name: Upload binaries
id: upload-rucio-tracer
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./rucio-tracer-tools.tar.gz
asset_name: rucio-tracer-tools.tar.gz
asset_content_type: application/octet-stream

- name: Get the Ref
id: get-ref
uses: ankitvgupta/ref-to-tag-action@master
with:
ref: ${{ github.ref }}
head_ref: ${{ github.head_ref }}

- name: Build image
run: |
curl -ksLO https://raw.githubusercontent.com/dmwm/CMSKubernetes/master/docker/rucio-tracer/Dockerfile
sed -i -e "s,ENV TAG=.*,ENV TAG=${{steps.get-ref.outputs.tag}},g" Dockerfile
chmod +x run.sh
docker build . --tag docker.pkg.github.com/dmwm/rucio-tracer/rucio-tracer
- name: Login to Registry
uses: docker/[email protected]
with:
registry: docker.pkg.github.com
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
load: true
tags: cmssw/rucio-tracer:${{steps.get-ref.outputs.tag}}
- run: docker push cmssw/rucio-tracer:${{steps.get-ref.outputs.tag}}
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
all: build

build:
cd messanger; make; cd -
cd server; make; cd -

clean:
cd messanger; make clean; cd -
cd server; make clean; cd -
12 changes: 12 additions & 0 deletions docs/ruciositemap.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"T1_US_FNAL": "T1_US_FNAL_Disk",
"T1_DE_KIT": "T1_DE_KIT_Disk",
"T1_ES_PIC": "T1_ES_PIC_Disk",
"T1_RU_JINR": "T1_RU_JINR_Disk",
"T1_FR_CCIN2P3": "T1_FR_CCIN2P3_Disk",
"T1_UK_RAL": "T1_UK_RAL_Disk",
"T1_IT_CNAF": "T1_IT_CNAF_Disk",
"T2_CH_CERN_HLT": "T2_CH_CERN",
"T2_CH_CERNBOX": "T2_CH_CERN",
"T3_UK_SGrid_Oxford": "T2_UK_London_IC"
}
Loading

0 comments on commit 5f5e2cc

Please sign in to comment.