From 88dbcb8a300c30fae4a13b4e6ff8b01822221bdb Mon Sep 17 00:00:00 2001 From: Jason Fox Date: Thu, 22 Jun 2023 16:44:30 +0200 Subject: [PATCH 1/8] Switch from Docker to Quay --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 08706d89..9a00a5e4 100755 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![FIWARE Security](https://nexus.lab.fiware.org/repository/raw/public/badges/chapters/security.svg)](https://www.fiware.org/developers/catalogue/) [![License: MIT](https://img.shields.io/github/license/ging/fiware-idm.svg)](https://opensource.org/licenses/MIT) -[![Docker badge](https://img.shields.io/docker/pulls/fiware/idm.svg)](https://hub.docker.com/r/fiware/idm/) +[![Docker badge](https://img.shields.io/badge/quay.io-fiware%2Fidm-grey?logo=red%20hat&labelColor=EE0000)](https://quay.io/repository/fiware/idm) [![Support badge](https://img.shields.io/badge/tag-fiware-orange.svg?logo=stackoverflow)](https://stackoverflow.com/questions/tagged/fiware-keyrock)
[![Documentation](https://img.shields.io/readthedocs/fiware-idm.svg)](https://fiware-idm.readthedocs.io/en/latest/) @@ -23,7 +23,7 @@ This project is part of [FIWARE](https://www.fiware.org/). For more information check the FIWARE Catalogue entry for [Security](https://github.com/Fiware/catalogue/tree/master/security). -| :books: [Documentation](https://fiware-idm.readthedocs.io/en/latest/) | :page_facing_up: [Site](https://keyrock-fiware.github.io/) | :mortar_board: [Academy](https://fiware-academy.readthedocs.io/en/latest/security/keyrock.html) | :whale: [Docker Hub](https://hub.docker.com/r/fiware/idm/) | :dart: [Roadmap](https://github.com/ging/fiware-idm/blob/master/roadmap.md) | +| :books: [Documentation](https://fiware-idm.readthedocs.io/en/latest/) | :page_facing_up: [Site](https://keyrock-fiware.github.io/) | :mortar_board: [Academy](https://fiware-academy.readthedocs.io/en/latest/security/keyrock.html) | [quay.io](https://quay.io/repository/fiware/idm) | :dart: [Roadmap](https://github.com/ging/fiware-idm/blob/master/roadmap.md) | | --------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | ---------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | @@ -239,4 +239,4 @@ follows: Keyrock is licensed under the [MIT](LICENSE) License. -© 2018 Universidad Politécnica de Madrid. +© 2018-2023 Universidad Politécnica de Madrid. From 54271633b28b7af7e9f64d4688499251e5f5d8f8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 4 Jul 2023 08:45:40 +0000 Subject: [PATCH 2/8] @Jxlle has signed the CLA from Pull Request #335 --- signatures/version1/cla.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/signatures/version1/cla.json b/signatures/version1/cla.json index 6b28d9ad..23bca708 100644 --- a/signatures/version1/cla.json +++ b/signatures/version1/cla.json @@ -95,6 +95,14 @@ "created_at": "2023-06-05T21:19:05Z", "repoId": 102724150, "pullRequestNo": 330 + }, + { + "name": "Jxlle", + "id": 29973052, + "comment_id": 1619812444, + "created_at": "2023-07-04T08:45:29Z", + "repoId": 102724150, + "pullRequestNo": 335 } ] } \ No newline at end of file From 66b07f845aae204d82fe76d8aa735772d87494b7 Mon Sep 17 00:00:00 2001 From: Jason Fox Date: Thu, 3 Aug 2023 16:13:40 +0200 Subject: [PATCH 3/8] Add webhook bash script --- .github/fiware/image-clone.sh | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 .github/fiware/image-clone.sh diff --git a/.github/fiware/image-clone.sh b/.github/fiware/image-clone.sh new file mode 100755 index 00000000..32237b5c --- /dev/null +++ b/.github/fiware/image-clone.sh @@ -0,0 +1,35 @@ +set -e + +SOURCE="ging/fiware-idm" +DOCKER_TARGET="fiware/idm" +QUAY_TARGET="quay.io/fiware/idm" + +# DOCKER_TARGET="fiware/$(basename $(git rev-parse --show-toplevel))" +# QUAY_TARGET="quay.io/fiware/$(basename $(git rev-parse --show-toplevel))" + +VERSION=$(git describe --tags $(git rev-list --tags --max-count=1)) + +function clone { + echo 'cloning from '"$1 $2"' to '"$3" + docker pull -q "$1":"$2" + docker tag "$1":"$2" "$3":"$2" + + if ! [ -z "$4" ]; then + echo 'pushing '"$1 $2"' to latest' + docker tag "$1":"$2" "$3":latest + docker push -q "$3":latest + fi +} + +for i in "$@" ; do + if [[ $i == "docker" ]]; then + + clone "$SOURCE" "$VERSION" "$DOCKER_TARGET" true + clone "$SOURCE" "$VERSION"-distroless "$DOCKER_TARGET" + fi + if [[ $i == "quay" ]]; then + clone "$SOURCE" "$VERSION" "$QUAY_TARGET" true + clone "$SOURCE" "$VERSION"-distroless "$QUAY_TARGET" + fi + echo "" +done From fa0ea36f83e6acb0a2a792e56bdb9f2d2c6dbcfb Mon Sep 17 00:00:00 2001 From: Jason Fox Date: Thu, 3 Aug 2023 16:22:27 +0200 Subject: [PATCH 4/8] Ignore FIWARE tag --- .github/fiware/image-clone.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/fiware/image-clone.sh b/.github/fiware/image-clone.sh index 32237b5c..18516cc7 100755 --- a/.github/fiware/image-clone.sh +++ b/.github/fiware/image-clone.sh @@ -7,7 +7,7 @@ QUAY_TARGET="quay.io/fiware/idm" # DOCKER_TARGET="fiware/$(basename $(git rev-parse --show-toplevel))" # QUAY_TARGET="quay.io/fiware/$(basename $(git rev-parse --show-toplevel))" -VERSION=$(git describe --tags $(git rev-list --tags --max-count=1)) +VERSION=$(git describe --exclude 'FIWARE*' --tags $(git rev-list --tags --max-count=1)) function clone { echo 'cloning from '"$1 $2"' to '"$3" From 86093229c04a1f7e1d38eaccac830f77c2226b13 Mon Sep 17 00:00:00 2001 From: Jason Fox Date: Thu, 3 Aug 2023 20:05:37 +0200 Subject: [PATCH 5/8] Add push --- .github/fiware/image-clone.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/fiware/image-clone.sh b/.github/fiware/image-clone.sh index 18516cc7..b5af716c 100755 --- a/.github/fiware/image-clone.sh +++ b/.github/fiware/image-clone.sh @@ -13,6 +13,7 @@ function clone { echo 'cloning from '"$1 $2"' to '"$3" docker pull -q "$1":"$2" docker tag "$1":"$2" "$3":"$2" + docker push -q "$3":"$2" if ! [ -z "$4" ]; then echo 'pushing '"$1 $2"' to latest' From b050f53da5c8a068f98d14e3d6fc55f0199ecbc8 Mon Sep 17 00:00:00 2001 From: Jason Fox Date: Fri, 4 Aug 2023 13:54:24 +0200 Subject: [PATCH 6/8] Add clean --- .github/fiware/image-clone.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/fiware/image-clone.sh b/.github/fiware/image-clone.sh index b5af716c..df3b5b9e 100755 --- a/.github/fiware/image-clone.sh +++ b/.github/fiware/image-clone.sh @@ -34,3 +34,9 @@ for i in "$@" ; do fi echo "" done + +for i in "$@" ; do + if [[ $i == "clean" ]]; then + docker rmi -f $(docker images -a -q) | true + fi +done From cf6821480ff7583f3ae2203969335fee84d089ba Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 29 Aug 2023 15:28:48 +0000 Subject: [PATCH 7/8] @fdelavega has signed the CLA from Pull Request #344 --- signatures/version1/cla.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/signatures/version1/cla.json b/signatures/version1/cla.json index 23bca708..40024e37 100644 --- a/signatures/version1/cla.json +++ b/signatures/version1/cla.json @@ -103,6 +103,14 @@ "created_at": "2023-07-04T08:45:29Z", "repoId": 102724150, "pullRequestNo": 335 + }, + { + "name": "fdelavega", + "id": 2911173, + "comment_id": 1697671224, + "created_at": "2023-08-29T15:28:36Z", + "repoId": 102724150, + "pullRequestNo": 344 } ] } \ No newline at end of file From 242202707f3a0f3acf24af30652f24d7879681db Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 29 Aug 2023 16:33:05 +0000 Subject: [PATCH 8/8] @aafrecct has signed the CLA from Pull Request #344 --- signatures/version1/cla.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/signatures/version1/cla.json b/signatures/version1/cla.json index 40024e37..7bc7ab0f 100644 --- a/signatures/version1/cla.json +++ b/signatures/version1/cla.json @@ -111,6 +111,14 @@ "created_at": "2023-08-29T15:28:36Z", "repoId": 102724150, "pullRequestNo": 344 + }, + { + "name": "aafrecct", + "id": 44411898, + "comment_id": 1697787391, + "created_at": "2023-08-29T16:32:51Z", + "repoId": 102724150, + "pullRequestNo": 344 } ] } \ No newline at end of file