Skip to content
This repository has been archived by the owner on Aug 19, 2022. It is now read-only.

Refresh repository to be used in 2022 #5

Merged
merged 5 commits into from
Jan 20, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
_extends: .github

name-template: 'next'
tag-template: 'next'
17 changes: 17 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Release Drafter

on:
push:
branches:
- main

jobs:
update_release_draft:
runs-on: ubuntu-20.04
steps:
- uses: release-drafter/release-drafter@v5
env:
# This token is generated automatically by default in GitHub Actions: no need to create it manually
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
...
7 changes: 1 addition & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
FROM nginx:1.13

LABEL \
Description="Deploy nginx proxy in front of repo.jenkins-ci.org" \
Project="https://github.com/jenkins-infra/repo-proxy" \
Maintainer="infra@lists.jenkins-ci.org"
FROM nginx:1.20.2

COPY conf.d/default.conf /etc/nginx/conf.d/default.conf

Expand Down
31 changes: 0 additions & 31 deletions Jenkinsfile

This file was deleted.

1 change: 1 addition & 0 deletions Jenkinsfile_k8s
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
parallelDockerUpdatecli([imageName: 'repo-proxy', rebuildImageOnPeriodicJob: false])
16 changes: 0 additions & 16 deletions Makefile

This file was deleted.

51 changes: 51 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
= docker-packaging

image:https://img.shields.io/docker/pulls/jenkinsciinfra/repo-proxy?label=jenkinsciinfra%repo-proxy&logo=docker&logoColor=white[link="https://hub.docker.com/r/jenkinsciinfra/repo-proxy"]

This repository contains everything needed to build a docker image for caching artefacts from repo.jenkins-ci.org repository to accelerate builds.

== Running the service

Start a local Docker container (in background) based on this image with:
dduportal marked this conversation as resolved.
Show resolved Hide resolved

[source,bash]
----
docker run --rm --name local-artifact-cacher -p 80:80 --detach jenkinssciinfra/repo-proxy # should add a tag in production
----

Cached object should return 200 with HEADER 'X-Cache-Status' set to 'HIT' or 'MISS'
dduportal marked this conversation as resolved.
Show resolved Hide resolved

[source,bash]
----
curl -I http://localhost/releases/cf/pgmann/plugins/url-auth-sso/1.0/url-auth-sso-1.0-javadoc.jar
----

Snapshot artifacts shouldn't be cached and so return 200 without HEADER 'X-Cache-Status'
dduportal marked this conversation as resolved.
Show resolved Hide resolved

[source,bash]
----
curl -I http://localhost/snapshots/jenkins/repository/1.1-SNAPSHOT/repository-1.1-20140112.102452-1-javadoc.jar
----

maven-metadata.xml object should return 200 without HEADER 'X-Cache-Status'
dduportal marked this conversation as resolved.
Show resolved Hide resolved

[source,bash]
--
curl -I http://localhost/snapshots/com/deveo/plugins/deveo/maven-metadata.xml
--


[IMPORTANT]
All requests should return 200 OK
dduportal marked this conversation as resolved.
Show resolved Hide resolved

[IMPORTANT]
--
Cached requests contain HEADER 'X-Cache-Status':

* Set to HIT if response get from cache
* Set to MISS if response didn't get from cache
dduportal marked this conversation as resolved.
Show resolved Hide resolved
--

== Contribute

If you want to contribute, or build/test the Docker Image, please refer to the following documentation about Docker images for the Jenkins Infra project: link:https://github.com/jenkins-infra/pipeline-library/blob/master/resources/io/jenkins/infra/docker/README.adoc[README]
38 changes: 0 additions & 38 deletions README.md

This file was deleted.

63 changes: 63 additions & 0 deletions updatecli/updatecli.d/nginx.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
title: Bump nginx:stable docker image version

scms:
default:
kind: github
spec:
user: "{{ .github.user }}"
email: "{{ .github.email }}"
owner: "{{ .github.owner }}"
repository: "{{ .github.repository }}"
token: "{{ requiredEnv .github.token }}"
username: "{{ .github.username }}"
branch: "{{ .github.branch }}"
nginxGithubMirror:
kind: git
spec:
url: "https://github.com/nginx/nginx"
branch: "master"

sources:
latestRelease:
name: Get latest stable version of nginx
kind: gitTag
scmID: nginxGithubMirror
spec:
versionFilter:
kind: regex
## Nginx stable version have the minor digit as an even number
pattern: 'release-(\d+)\.(\d*[0|2|4|6|8])\.(\d+)'
transformers:
- trimPrefix: "release-"

conditions:
checkDockerImagePublished:
name: "Test nginx:<latest_version> docker image tag"
kind: dockerImage
sourceID: latestRelease
spec:
image: "nginx"
architecture: amd64
# tag comes from the source input value

targets:
updateDockerfile:
name: "Update nginx stable docker image version for reports chart"
kind: dockerfile
spec:
file: Dockerfile
instruction:
keyword: FROM
matcher: nginx
scmID: default

pullrequests:
default:
kind: github
scmID: default
targets:
- updateDockerfile
spec:
labels:
- dependencies
- nginx
8 changes: 8 additions & 0 deletions updatecli/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
github:
user: "updatebot"
email: "updatebot@olblak.com"
dduportal marked this conversation as resolved.
Show resolved Hide resolved
username: "jenkins-infra-bot"
token: "UPDATECLI_GITHUB_TOKEN"
branch: "main"
owner: "jenkins-infra"
repository: "docker-repo-proxy"