Skip to content

Commit

Permalink
test first and second part of CI
Browse files Browse the repository at this point in the history
  • Loading branch information
garciagenrique committed Dec 15, 2023
1 parent c4b909a commit c9df82d
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 41 deletions.
75 changes: 39 additions & 36 deletions .github/workflows/docker-autobuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
name: Build matrix from directories with changed files
outputs:
container_list: ${{ steps.set-matrix.outputs.all_changed_files }}
#container_list: ${{ steps.set-matrix.outputs.container_list }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -44,52 +43,56 @@ jobs:
echo "$dir was changed"
done
# build-and-push-changed-container:
# needs: build-matrix-from-changed-dirs
# runs-on: ubuntu-latest
# strategy:
# matrix:
# containers: ${{ fromJson(needs.build-matrix-from-changed-dirs.outputs.all_changed_files) }}
build-and-push-changed-container:
needs: build-matrix-from-changed-dirs
runs-on: ubuntu-latest
strategy:
matrix:
containers: ${{ fromJson(needs.build-matrix-from-changed-dirs.outputs.all_changed_files) }}

# permissions:
# contents: read
# packages: write
permissions:
contents: read
packages: write

# steps:
# - name: Docker Checkout
# uses: actions/checkout@v4
steps:
- name: Docker Checkout
uses: actions/checkout@v4

# - name: Get tag
# run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Get tag
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

# - name: Check env output
# run: echo "tag" is ${{ env.RELEASE_VERSION }}
- name: Check env output
run: echo "tag" is ${{ env.RELEASE_VERSION }}

# - name: Log in to the GH Container Registry
# id: login
# uses: docker/login-action@v3
# with:
# registry: ${{ env.REGISTRY }}
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
- name: Action for git describe
id: ghd
uses: proudust/gh-describe@v1

- name: Log in to the GH Container Registry
id: login
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# - name: Extract metadata for ${{ matrix.containers }}
# id: metadata
# uses: docker/[email protected]
# with:
# flavor: |
# latest=true
# tags: |
# type=ref,event=tag
# # ghcr.io/vre-hub/{vre}-{container_name}:{tag}
# images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ github.event.repository.name }}-${{ matrix.containers }}
- name: Extract metadata for ${{ matrix.containers }}
id: metadata
uses: docker/[email protected]
with:
flavor: |
latest=true
tags: |
type=raw,value=${{ steps.ghd.outputs.tag }}-${{ steps.ghd.outputs.distance }}-${{ steps.ghd.outputs.sha }}
# ghcr.io/vre-hub/{vre}-{container_name}:{tag}
images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ github.event.repository.name }}-${{ matrix.containers }}

# - name: Build and push ${{ matrix.containers }}
# id: build
# uses: docker/[email protected]
# with:
# context: containers/${{ matrix.containers }}
# file: containers/${{ matrix.containers }}/Dockerfile
# context: ${{ matrix.containers }}
# file: ${{ matrix.containers }}/Dockerfile
# push: true
# tags: ${{ steps.metadata.outputs.tags }}
# labels: ${{ steps.metadata.outputs.labels }}
Expand Down
2 changes: 1 addition & 1 deletion containers/iam-reana-sync/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ COPY requirements.txt add_reana_users.py generate_email_list.py /home/

RUN pip install -r /home/requirements.txt

ENTRYPOINT ["/bin/bash"]
ENTRYPOINT ["/bin/bash"]
2 changes: 1 addition & 1 deletion containers/iam-rucio-sync/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ COPY requirements.txt sync_iam_rucio.py iam-sync.conf /home/

RUN pip install -r /home/requirements.txt

ENTRYPOINT ["/bin/bash"]
ENTRYPOINT ["/bin/bash"]
1 change: 0 additions & 1 deletion containers/rucio-client/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@ ADD --chown=user:user rucio.cfg.escape.j2 /opt/user/rucio.cfg.j2
ENV LC_ALL=en_US.UTF-8

ENTRYPOINT ["/bin/bash"]

2 changes: 0 additions & 2 deletions containers/rucio-noise/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,3 @@ RUN chmod +x ./produce_noise.sh
RUN pip install -r /home/requirements.txt

ENTRYPOINT ["/bin/bash"]


0 comments on commit c9df82d

Please sign in to comment.