mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-27 15:44:21 +02:00
chore(ci): move to harbor docker registry (#4237)
This commit is contained in:
parent
54277ec33b
commit
2683d38e39
27
.github/actions/package/action.yml
vendored
27
.github/actions/package/action.yml
vendored
@ -27,11 +27,14 @@ inputs:
|
|||||||
sign:
|
sign:
|
||||||
description: Wether to sign the package or not
|
description: Wether to sign the package or not
|
||||||
default: ""
|
default: ""
|
||||||
artifactory_username:
|
registry_url:
|
||||||
description: The artifactory username
|
description: Docker registry url
|
||||||
required: true
|
required: true
|
||||||
artifactory_password:
|
registry_username:
|
||||||
description: The artifactory password
|
description: Docker registry username
|
||||||
|
required: true
|
||||||
|
registry_password:
|
||||||
|
description: Docker registry password
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
@ -41,9 +44,9 @@ runs:
|
|||||||
- name: Login to Registry
|
- name: Login to Registry
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
registry: docker.centreon.com
|
registry: ${{ inputs.registry_url }}
|
||||||
username: ${{ inputs.artifactory_username }}
|
username: ${{ inputs.registry_username }}
|
||||||
password: ${{ inputs.artifactory_password }}
|
password: ${{ inputs.registry_password }}
|
||||||
|
|
||||||
- name: Package
|
- name: Package
|
||||||
uses: ./.github/actions/runner-docker
|
uses: ./.github/actions/runner-docker
|
||||||
@ -51,8 +54,9 @@ runs:
|
|||||||
script_name: ${{ inputs.script_name }}
|
script_name: ${{ inputs.script_name }}
|
||||||
image_name: ${{ inputs.image_name }}
|
image_name: ${{ inputs.image_name }}
|
||||||
image_version: latest
|
image_version: latest
|
||||||
artifactory_username: ${{ inputs.artifactory_username }}
|
registry_url: ${{ inputs.registry_url }}
|
||||||
artifactory_password: ${{ inputs.artifactory_password }}
|
registry_username: ${{ inputs.registry_username }}
|
||||||
|
registry_password: ${{ inputs.registry_password }}
|
||||||
params: ${{ inputs.version }} ${{ inputs.release }} "${{ inputs.plugins }}"
|
params: ${{ inputs.version }} ${{ inputs.release }} "${{ inputs.plugins }}"
|
||||||
|
|
||||||
- name: Sign
|
- name: Sign
|
||||||
@ -62,8 +66,9 @@ runs:
|
|||||||
script_name: rpm-signing
|
script_name: rpm-signing
|
||||||
image_name: rpm-signing
|
image_name: rpm-signing
|
||||||
image_version: ubuntu
|
image_version: ubuntu
|
||||||
artifactory_username: ${{ inputs.artifactory_username }}
|
registry_url: ${{ inputs.registry_url }}
|
||||||
artifactory_password: ${{ inputs.artifactory_password }}
|
registry_username: ${{ inputs.registry_username }}
|
||||||
|
registry_password: ${{ inputs.registry_password }}
|
||||||
|
|
||||||
- name: Cache packaged files
|
- name: Cache packaged files
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
|
19
.github/actions/runner-docker/action.yml
vendored
19
.github/actions/runner-docker/action.yml
vendored
@ -13,11 +13,14 @@ inputs:
|
|||||||
centreon_pat:
|
centreon_pat:
|
||||||
description: "Secret"
|
description: "Secret"
|
||||||
required: false
|
required: false
|
||||||
artifactory_username:
|
registry_url:
|
||||||
description: The artifactory username
|
description: Docker registry url
|
||||||
required: true
|
required: true
|
||||||
artifactory_password:
|
registry_username:
|
||||||
description: The artifactory password
|
description: Docker registry username
|
||||||
|
required: true
|
||||||
|
registry_password:
|
||||||
|
description: Docker registry password
|
||||||
required: true
|
required: true
|
||||||
params:
|
params:
|
||||||
description: "params for script"
|
description: "params for script"
|
||||||
@ -28,9 +31,9 @@ runs:
|
|||||||
- name: Login to Registry (via runner)
|
- name: Login to Registry (via runner)
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
registry: docker.centreon.com
|
registry: ${{ inputs.registry_url }}
|
||||||
username: ${{ inputs.artifactory_username }}
|
username: ${{ inputs.registry_username }}
|
||||||
password: ${{ inputs.artifactory_password }}
|
password: ${{ inputs.registry_password }}
|
||||||
|
|
||||||
- run: docker run -i -e TOKEN=${{ inputs.centreon_pat }} --entrypoint /src/.github/scripts/${{ inputs.script_name }}.sh -v "$PWD:/src" docker.centreon.com/${{ inputs.image_name }}:${{ inputs.image_version }} ${{ inputs.params }}
|
- run: docker run -i -e TOKEN=${{ inputs.centreon_pat }} --entrypoint /src/.github/scripts/${{ inputs.script_name }}.sh -v "$PWD:/src" ${{ inputs.registry_url }}/${{ inputs.image_name }}:${{ inputs.image_version }} ${{ inputs.params }}
|
||||||
shell: bash
|
shell: bash
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
FROM docker-proxy.centreon.com/almalinux:8
|
ARG REGISTRY_URL
|
||||||
|
|
||||||
|
FROM ${REGISTRY_URL}/almalinux:8
|
||||||
|
|
||||||
RUN <<EOF
|
RUN <<EOF
|
||||||
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
FROM docker-proxy.centreon.com/almalinux:9
|
ARG REGISTRY_URL
|
||||||
|
|
||||||
|
FROM ${REGISTRY_URL}/almalinux:9
|
||||||
|
|
||||||
RUN <<EOF
|
RUN <<EOF
|
||||||
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
FROM docker-proxy.centreon.com/debian:bullseye
|
ARG REGISTRY_URL
|
||||||
|
|
||||||
|
FROM ${REGISTRY_URL}/debian:bullseye
|
||||||
|
|
||||||
# fix locale
|
# fix locale
|
||||||
RUN <<EOF
|
RUN <<EOF
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
FROM docker-proxy.centreon.com/centos:7
|
ARG REGISTRY_URL
|
||||||
|
|
||||||
|
FROM ${REGISTRY_URL}/centos:7
|
||||||
|
|
||||||
RUN <<EOF
|
RUN <<EOF
|
||||||
|
|
||||||
|
@ -33,16 +33,16 @@ jobs:
|
|||||||
- name: Login to Registry
|
- name: Login to Registry
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
registry: docker.centreon.com
|
registry: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}
|
||||||
username: ${{ secrets.REPOS_USERNAME }}
|
username: ${{ secrets.DOCKER_REGISTRY_ID }}
|
||||||
password: ${{ secrets.REPOS_PASSWORD }}
|
password: ${{ secrets.DOCKER_REGISTRY_PASSWD }}
|
||||||
|
|
||||||
- name: Login to proxy registry
|
- name: Login to proxy registry
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
registry: docker-proxy.centreon.com
|
registry: ${{ vars.DOCKER_PROXY_REGISTRY_URL }}
|
||||||
username: ${{ secrets.REPOS_USERNAME }}
|
username: ${{ secrets.DOCKER_REGISTRY_ID }}
|
||||||
password: ${{ secrets.REPOS_PASSWORD }}
|
password: ${{ secrets.DOCKER_REGISTRY_PASSWD }}
|
||||||
|
|
||||||
- uses: docker/setup-buildx-action@v2
|
- uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
@ -50,6 +50,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
file: .github/docker/Dockerfile.packaging-${{ matrix.project }}-${{ matrix.distrib }}
|
file: .github/docker/Dockerfile.packaging-${{ matrix.project }}-${{ matrix.distrib }}
|
||||||
context: .
|
context: .
|
||||||
|
build-args: "REGISTRY_URL=${{ vars.DOCKER_PROXY_REGISTRY_URL }}"
|
||||||
pull: true
|
pull: true
|
||||||
push: true
|
push: true
|
||||||
tags: docker.centreon.com/packaging-${{ matrix.project }}-${{ matrix.distrib }}:latest
|
tags: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/packaging-${{ matrix.project }}-${{ matrix.distrib }}:latest
|
||||||
|
9
.github/workflows/plugin-package.yml
vendored
9
.github/workflows/plugin-package.yml
vendored
@ -11,9 +11,9 @@ on:
|
|||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
secrets:
|
secrets:
|
||||||
artifactory_username:
|
registry_username:
|
||||||
required: true
|
required: true
|
||||||
artifactory_password:
|
registry_password:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@ -87,5 +87,6 @@ jobs:
|
|||||||
release: ${{ inputs.release }}
|
release: ${{ inputs.release }}
|
||||||
cache_key: ${{ github.sha }}-${{ github.run_id }}-${{ matrix.package_extension }}-${{ matrix.distrib }}
|
cache_key: ${{ github.sha }}-${{ github.run_id }}-${{ matrix.package_extension }}-${{ matrix.distrib }}
|
||||||
sign: true
|
sign: true
|
||||||
artifactory_username: ${{ secrets.artifactory_username }}
|
registry_url: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}
|
||||||
artifactory_password: ${{ secrets.artifactory_password }}
|
registry_username: ${{ secrets.registry_username }}
|
||||||
|
registry_password: ${{ secrets.registry_password }}
|
||||||
|
4
.github/workflows/plugins.yml
vendored
4
.github/workflows/plugins.yml
vendored
@ -95,8 +95,8 @@ jobs:
|
|||||||
version: ${{ needs.get-environment.outputs.version }}
|
version: ${{ needs.get-environment.outputs.version }}
|
||||||
release: ${{ needs.get-environment.outputs.release }}
|
release: ${{ needs.get-environment.outputs.release }}
|
||||||
secrets:
|
secrets:
|
||||||
artifactory_username: ${{ secrets.REPOS_USERNAME }}
|
registry_username: ${{ secrets.DOCKER_REGISTRY_ID }}
|
||||||
artifactory_password: ${{ secrets.REPOS_PASSWORD }}
|
registry_password: ${{ secrets.DOCKER_REGISTRY_PASSWD }}
|
||||||
|
|
||||||
deliver:
|
deliver:
|
||||||
needs: [get-environment, package]
|
needs: [get-environment, package]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user