Skip to content

Commit

Permalink
ci: Add docker credentials (#110)
Browse files Browse the repository at this point in the history
* ci: Add docker credentials

Signed-off-by: Mikołaj Baranowski <[email protected]>

* chore: Use nexus credentials

Signed-off-by: Mikołaj Baranowski <[email protected]>

* ci: GITHUB_REPOSITORY is a variable provided by GHAs

Signed-off-by: Mikołaj Baranowski <[email protected]>

---------

Signed-off-by: Mikołaj Baranowski <[email protected]>
  • Loading branch information
mikolajb authored Sep 20, 2023
1 parent 23d4612 commit 0c7f57f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/release-airgap-artifacts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
runs-on:
- self-hosted
- medium

steps:
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -30,6 +31,12 @@ jobs:
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/dkp-catalog-applications
aws-region: us-west-2

- name: Login to Docker Hub and Nexus
uses: mesosphere/workflow-db/actions/docker/login@main
with:
username: ${{ secrets.NEXUS_USERNAME }}
password: ${{ secrets.NEXUS_PASSWORD }}

- name: make release.chart-bundle
run: make ci.docker.run GOOS=linux GOARCH=amd64 RUN_WHAT="make release.chart-bundle"

Expand Down
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ REPO_ROOT := $(CURDIR)
INTERACTIVE := $(shell [ -t 0 ] && echo 1)

export GOPRIVATE ?= github.com/mesosphere
export GITHUB_ORG ?= mesosphere
export GITHUB_REPOSITORY ?= dkp-catalog-applications
export GITHUB_REPOSITORY ?= mesosphere/dkp-catalog-applications
export GOBIN := $(REPO_ROOT)/bin/$(GOOS)/$(GOARCH)
export PATH := $(GOBIN):$(PATH)
GOARCH ?= $(shell go env GOARCH)
Expand Down
8 changes: 4 additions & 4 deletions make/ci.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ CI_DOCKERFILE ?= $(REPO_ROOT)/Dockerfile.ci

ifneq ($(wildcard $(CI_DOCKERFILE)),)
CI_DOCKER_TAG ?= $(shell (cat $(CI_DOCKERFILE) $(CI_DOCKER_EXTRA_FILES) \
$(if $(CI_DOCKER_BUILD_ARGS),&& echo $(CI_DOCKER_BUILD_ARGS))) \
| shasum | awk '{ print $$1 }')
CI_DOCKER_IMG ?= $(GITHUB_ORG)/$(GITHUB_REPOSITORY)-ci:$(CI_DOCKER_TAG)
$(if $(CI_DOCKER_BUILD_ARGS),&& echo $(CI_DOCKER_BUILD_ARGS))) \
| shasum | awk '{ print $$1 }')
CI_DOCKER_IMG ?= $(GITHUB_REPOSITORY)-ci:$(CI_DOCKER_TAG)

export GOLANG_VERSION ?= 1.19.1
DOCKER_VERSION ?= 20.10.7
Expand Down Expand Up @@ -46,7 +46,7 @@ ci.docker.run: RUN_WHAT ?=
ci.docker.run: ci.docker.ensure ; $(info $(M) Runs the build in the CI Docker image)
docker run --rm -i$(if $(RUN_WHAT),,$(if $(INTERACTIVE),t)) \
-v $(REPO_ROOT):$(REPO_ROOT) \
-w $(REPO_ROOT) \
-w $(REPO_ROOT) \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /etc/docker/certs.d:/etc/docker/certs.d \
$(if $(AWS_REGION),-e AWS_REGION=$(AWS_REGION)) \
Expand Down

0 comments on commit 0c7f57f

Please sign in to comment.