Repositório de artefatos Nexus Repository Manager 3.
A instalação é feita utilizando a imagem docker oficial do nexus. Guias e documentações:
| #!/bin/sh | |
| docker system prune --force | |
| OUT=$? | |
| WEBHOOK_URL="url webhook discord" | |
| if [ $OUT = 0 ] | |
| then | |
| STATUS="Ok" |
| // https://javadoc.jenkins-ci.org/hudson/model/Result.html | |
| /* | |
| ABORTED - The build was manually aborted. | |
| FAILURE - The build had a fatal error. | |
| NOT_BUILT - The module was not built. | |
| SUCCESS - The build had no errors. | |
| UNSTABLE - The build had some errors but they were not fatal. | |
| */ | |
| pipeline { |
| #!/bin/bash | |
| # WARNING! This script deletes data! | |
| # Purge untagged (orphaned) images | |
| REGISTRY=your_registry | |
| REPOSITORY=your_repository | |
| az acr repository show-manifests --name $REGISTRY --repository $REPOSITORY --query "[?tags[0]==null].digest" -o tsv \ | |
| | xargs --replace=digest --verbose az acr repository delete -n $REGISTRY --image $REPOSITORY@digest --yes |
| #!/bin/bash | |
| # WARNING! This script deletes data! | |
| # Purge old images retaining configured amount of tags. Tag latest will be always preserved. | |
| REGISTRY=your_registry | |
| REPOSITORY=your_repository | |
| HISTORY_SIZE=amount_of_tags_to_be_remain | |
| az acr repository show-tags -n $REGISTRY --repository $REPOSITORY --orderby time_desc --query "[?@ != 'latest'] | [$HISTORY_SIZE:]" -o tsv \ |
Repositório de artefatos Nexus Repository Manager 3.
A instalação é feita utilizando a imagem docker oficial do nexus. Guias e documentações:
| server { | |
| listen *:80; | |
| server_name my.nexus.url; | |
| # and redirect to the non-www host (declared below) | |
| return 301 https://my.nexus.url$request_uri; | |
| } | |
| server { | |
| listen 443 ssl; | |
| server_name my.nexus.url; |
| - hosts: host-list | |
| sudo: yes | |
| tasks: | |
| - name: "Install pip" | |
| easy_install: | |
| name: pip | |
| - name: "Install docker-py" | |
| pip: | |
| name: docker-py | |
| - name: "Create nexus-data dir and make it writable by the Nexus process, which runs as UID 200" |
| - hosts: host-list | |
| sudo: yes | |
| tasks: | |
| - name: "Add epel-release repo" | |
| yum: | |
| name: epel-release | |
| state: present | |
| - name: "Install nginx" | |
| yum: | |
| name: nginx |
| - hosts: host-list | |
| sudo: yes | |
| tasks: | |
| - name: "Installing Docker Prerequisite packages" | |
| yum: | |
| name: "{{ item }}" | |
| state: latest | |
| with_items: | |
| - yum-utils | |
| - device-mapper-persistent-data |