From 4f514d263d0bb29111c568a9ba5fd0b505481cb9 Mon Sep 17 00:00:00 2001 From: praneethsandra <69899890+praneethsandra@users.noreply.github.com> Date: Mon, 3 May 2021 11:11:22 +0530 Subject: [PATCH 01/11] Update Makefile --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 717e36c0..aa9bc043 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ GOLANGCILINT ?= golangci-lint BINARY := oauth2-proxy VERSION ?= $(shell git describe --always --dirty --tags 2>/dev/null || echo "undefined") # Allow to override image registry. -REGISTRY ?= quay.io/oauth2-proxy +REGISTRY ?= docker.na1.hsdp.io/covid .NOTPARALLEL: GO_MAJOR_VERSION = $(shell $(GO) version | cut -c 14- | cut -d' ' -f1 | cut -d'.' -f1) From f3f865f191380d4bd83677fb483fd38d7e394f7c Mon Sep 17 00:00:00 2001 From: praneethsandra <69899890+praneethsandra@users.noreply.github.com> Date: Mon, 3 May 2021 11:22:06 +0530 Subject: [PATCH 02/11] Create pr.yaml --- .github/workflows/pr.yaml | 64 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 .github/workflows/pr.yaml diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml new file mode 100644 index 00000000..33779832 --- /dev/null +++ b/.github/workflows/pr.yaml @@ -0,0 +1,64 @@ +name: PR + +on: + pull_request: + branches: + - '**' + # - $default-branch + +jobs: + build: + env: + COVER: true + runs-on: ubuntu-20.04 + steps: + + - name: Check out code + uses: actions/checkout@v2 + + - name: Set up Go 1.16 + uses: actions/setup-go@v2 + with: + go-version: 1.16.x + id: go + + - name: Get dependencies + run: | + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.36.0 + curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter + chmod +x ./cc-test-reporter + - name: Verify Code Generation + run: | + make verify-generate + - name: Lint + run: | + make lint + - name: Build + run: | + make build + - name: Test + env: + CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} + run: | + ./.github/workflows/test.sh + docker: + runs-on: ubuntu-20.04 + steps: + + - name: Check out code + uses: actions/checkout@v2 + + - name: Docker Build + run: | + make docker + + - name: Docker login + run: | + docker login --username '${{ secrets.DOCKER_USER }}' --password '${{ secrets.DOCKER_PSWD }}' '${{ secrets.DOCKER_REPO }}' + + - name: Docker tag & Push + run: | + docker tag '${{ secrets.DOCKER_REPO }}'/oauth2-proxy:latest '${{ secrets.DOCKER_REPO }}'/edi-foundation-oauth2-proxy:prlatest + docker push '${{ secrets.DOCKER_REPO }}'/edi-foundation-oauth2-proxy:prlatest + + From d25d5b4a8c8c06f0c0c3ec8e5dc54171f41613f1 Mon Sep 17 00:00:00 2001 From: praneethsandra <69899890+praneethsandra@users.noreply.github.com> Date: Mon, 3 May 2021 11:30:57 +0530 Subject: [PATCH 03/11] Update ci.yaml --- .github/workflows/ci.yaml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4b76366c..a87ae08f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -5,10 +5,6 @@ on: branches: - '**' # - $default-branch - pull_request: - branches: - - '**' - # - $default-branch jobs: build: @@ -60,3 +56,12 @@ jobs: - name: Docker Build run: | make docker + + - name: Docker login + run: | + docker login --username '${{ secrets.DOCKER_USER }}' --password '${{ secrets.DOCKER_PSWD }}' '${{ secrets.DOCKER_REPO }}' + + - name: Docker tag & Push + run: | + docker tag '${{ secrets.DOCKER_REPO }}'/oauth2-proxy:latest '${{ secrets.DOCKER_REPO }}'/edi-foundation-oauth2-proxy:${{ github.sha }} + docker push '${{ secrets.DOCKER_REPO }}'/edi-foundation-oauth2-proxy:${{ github.sha }} From 2f81c9102a24f34f8f3b361e225b0b9bc9629169 Mon Sep 17 00:00:00 2001 From: praneethsandra <69899890+praneethsandra@users.noreply.github.com> Date: Mon, 3 May 2021 11:33:28 +0530 Subject: [PATCH 04/11] Update pr.yaml --- .github/workflows/pr.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 33779832..1d8d2bf8 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -53,11 +53,11 @@ jobs: make docker - name: Docker login - run: | + run: | docker login --username '${{ secrets.DOCKER_USER }}' --password '${{ secrets.DOCKER_PSWD }}' '${{ secrets.DOCKER_REPO }}' - name: Docker tag & Push - run: | + run: | docker tag '${{ secrets.DOCKER_REPO }}'/oauth2-proxy:latest '${{ secrets.DOCKER_REPO }}'/edi-foundation-oauth2-proxy:prlatest docker push '${{ secrets.DOCKER_REPO }}'/edi-foundation-oauth2-proxy:prlatest From cbd4fc1da5a08ceefc9eba8d068bab68ab97af68 Mon Sep 17 00:00:00 2001 From: praneethsandra <69899890+praneethsandra@users.noreply.github.com> Date: Mon, 3 May 2021 11:33:57 +0530 Subject: [PATCH 05/11] Update ci.yaml --- .github/workflows/ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a87ae08f..6f3cc6bc 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -58,10 +58,10 @@ jobs: make docker - name: Docker login - run: | + run: | docker login --username '${{ secrets.DOCKER_USER }}' --password '${{ secrets.DOCKER_PSWD }}' '${{ secrets.DOCKER_REPO }}' - name: Docker tag & Push - run: | + run: | docker tag '${{ secrets.DOCKER_REPO }}'/oauth2-proxy:latest '${{ secrets.DOCKER_REPO }}'/edi-foundation-oauth2-proxy:${{ github.sha }} docker push '${{ secrets.DOCKER_REPO }}'/edi-foundation-oauth2-proxy:${{ github.sha }} From ed55dbfe0edb9daf6c4e9a7bcc2ade18bfa97f99 Mon Sep 17 00:00:00 2001 From: praneethsandra <69899890+praneethsandra@users.noreply.github.com> Date: Mon, 3 May 2021 11:52:29 +0530 Subject: [PATCH 06/11] Update pr.yaml --- .github/workflows/pr.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 1d8d2bf8..6f4b3cf0 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -3,7 +3,7 @@ name: PR on: pull_request: branches: - - '**' + - 'edi-foundation-integration' # - $default-branch jobs: From 5cab2271136cea381fc3ea5bf7ab665d3e701055 Mon Sep 17 00:00:00 2001 From: praneethsandra <69899890+praneethsandra@users.noreply.github.com> Date: Mon, 3 May 2021 12:10:48 +0530 Subject: [PATCH 07/11] Update Makefile --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index aa9bc043..90b34976 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ GOLANGCILINT ?= golangci-lint BINARY := oauth2-proxy VERSION ?= $(shell git describe --always --dirty --tags 2>/dev/null || echo "undefined") # Allow to override image registry. -REGISTRY ?= docker.na1.hsdp.io/covid +REGISTRY ?= docker.na1.hsdp.io/edi .NOTPARALLEL: GO_MAJOR_VERSION = $(shell $(GO) version | cut -c 14- | cut -d' ' -f1 | cut -d'.' -f1) From e2bfb84a9a51ec006a42511baad521bfebb4e199 Mon Sep 17 00:00:00 2001 From: praneethsandra <69899890+praneethsandra@users.noreply.github.com> Date: Mon, 3 May 2021 12:15:46 +0530 Subject: [PATCH 08/11] Update ci.yaml --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6f3cc6bc..5ac27fb2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -3,7 +3,7 @@ name: Continuous Integration on: push: branches: - - '**' + - 'edi-foundation-integration' # - $default-branch jobs: From 17a4b2078c9dea9298a7c3fe22c91a84bef3203a Mon Sep 17 00:00:00 2001 From: praneethsandra <69899890+praneethsandra@users.noreply.github.com> Date: Mon, 3 May 2021 12:20:08 +0530 Subject: [PATCH 09/11] Update ci.yaml --- .github/workflows/ci.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5ac27fb2..87a08363 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -64,4 +64,6 @@ jobs: - name: Docker tag & Push run: | docker tag '${{ secrets.DOCKER_REPO }}'/oauth2-proxy:latest '${{ secrets.DOCKER_REPO }}'/edi-foundation-oauth2-proxy:${{ github.sha }} - docker push '${{ secrets.DOCKER_REPO }}'/edi-foundation-oauth2-proxy:${{ github.sha }} + docker tag '${{ secrets.DOCKER_REPO }}'/oauth2-proxy:latest '${{ secrets.DOCKER_REPO }}'/edi-foundation-oauth2-proxy:latest + docker push '${{ secrets.DOCKER_REPO }}'/edi-foundation-oauth2-proxy:${{ github.sha }} + docker push '${{ secrets.DOCKER_REPO }}'/edi-foundation-oauth2-proxy:latest From e3328281b9f84bd1f111755b840762f26a17916b Mon Sep 17 00:00:00 2001 From: praneethsandra <69899890+praneethsandra@users.noreply.github.com> Date: Mon, 3 May 2021 14:52:57 +0530 Subject: [PATCH 10/11] Update pr.yaml --- .github/workflows/pr.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 6f4b3cf0..0af457b1 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -58,7 +58,7 @@ jobs: - name: Docker tag & Push run: | - docker tag '${{ secrets.DOCKER_REPO }}'/oauth2-proxy:latest '${{ secrets.DOCKER_REPO }}'/edi-foundation-oauth2-proxy:prlatest + docker tag '${{ secrets.DOCKER_REPO }}'/oauth2-proxy:latest '${{ secrets.DOCKER_REPO }}'/edi-foundation-oauth2-proxy:prlatest . docker push '${{ secrets.DOCKER_REPO }}'/edi-foundation-oauth2-proxy:prlatest From 7029dfd0b67be53d4422753d9e4aff377339079f Mon Sep 17 00:00:00 2001 From: praneethsandra <69899890+praneethsandra@users.noreply.github.com> Date: Mon, 3 May 2021 15:29:27 +0530 Subject: [PATCH 11/11] Update pr.yaml --- .github/workflows/pr.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 0af457b1..6f4b3cf0 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -58,7 +58,7 @@ jobs: - name: Docker tag & Push run: | - docker tag '${{ secrets.DOCKER_REPO }}'/oauth2-proxy:latest '${{ secrets.DOCKER_REPO }}'/edi-foundation-oauth2-proxy:prlatest . + docker tag '${{ secrets.DOCKER_REPO }}'/oauth2-proxy:latest '${{ secrets.DOCKER_REPO }}'/edi-foundation-oauth2-proxy:prlatest docker push '${{ secrets.DOCKER_REPO }}'/edi-foundation-oauth2-proxy:prlatest