Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

Commit

Permalink
Fix release pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
lrgar committed Mar 23, 2020
1 parent 73270bc commit dea5ce7
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 17 deletions.
67 changes: 52 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,40 @@ jobs:
- dockerconfig

- <<: *deploy
name: Deploy release AMD
name: Deploy release AMD (DockerHub)
arch: amd64
if: tag =~ /^v.*/
env:
- IMAGE=$OAO_IMAGE_DOCKER_HUB
- IMAGE=$OAO_IMAGE_RHCC
- GCR=true GCP_PROJECT=dynatrace-marketplace-dev GCLOUD_SERVICE_KEY=DEV GCP_SERVICE_ACCOUNT=$GCP_SERVICE_ACCOUNT_DEV IMAGE=$OAO_IMAGE_GCR_DEV
- GCR=true GCP_PROJECT=dynatrace-marketplace-prod GCLOUD_SERVICE_KEY=$GCLOUD_SERVICE_KEY_PROD GCP_SERVICE_ACCOUNT=$GCP_SERVICE_ACCOUNT_PROD IMAGE=$OAO_IMAGE_GCR_PROD
env: IMAGE=$OAO_IMAGE_DOCKER_HUB
workspaces:
use:
- ws_amd
- dockerconfig

- <<: *deploy
name: Deploy release AMD (RHCC)
arch: amd64
if: tag =~ /^v.*/
env: IMAGE=$OAO_IMAGE_RHCC_SCAN
workspaces:
use:
- ws_amd
- dockerconfig

- <<: *deploy
name: Deploy release AMD (GCR-dev)
arch: amd64
if: tag =~ /^v.*/
env: GCR=true GCP_PROJECT=dynatrace-marketplace-dev GCLOUD_SERVICE_KEY=$GCLOUD_SERVICE_KEY_DEV GCP_SERVICE_ACCOUNT=$GCP_SERVICE_ACCOUNT_DEV IMAGE=$OAO_IMAGE_GCR_DEV
workspaces:
use:
- ws_amd
- dockerconfig

- <<: *deploy
name: Deploy release AMD (GCR-prod)
arch: amd64
if: tag =~ /^v.*/
env: GCR=true GCP_PROJECT=dynatrace-marketplace-prod GCLOUD_SERVICE_KEY=$GCLOUD_SERVICE_KEY_PROD GCP_SERVICE_ACCOUNT=$GCP_SERVICE_ACCOUNT_PROD IMAGE=$OAO_IMAGE_GCR_PROD
workspaces:
use:
- ws_amd
Expand Down Expand Up @@ -172,12 +198,20 @@ jobs:
- dockerconfig

- <<: *deploy
name: Deploy release ARM
name: Deploy release ARM (DockerHub)
arch: arm64
if: tag =~ /^v.*/
env: IMAGE=$OAO_IMAGE_DOCKER_HUB
workspaces:
use:
- ws_arm
- dockerconfig

- <<: *deploy
name: Deploy release ARM (RHCC)
arch: arm64
if: tag =~ /^v.*/
env:
- IMAGE=$OAO_IMAGE_DOCKER_HUB
- IMAGE=$OAO_IMAGE_RHCC
env: IMAGE=$OAO_IMAGE_RHCC_SCAN
workspaces:
use:
- ws_arm
Expand All @@ -193,11 +227,15 @@ jobs:

- <<: *create_manifest
stage: manifest
name: Create manifest for release
name: Create manifest for release (DockerHub)
if: tag =~ /^v.*/
env:
- IMAGE=$OAO_IMAGE_DOCKER_HUB
- IMAGE=$OAO_IMAGE_RHCC
env: IMAGE=$OAO_IMAGE_DOCKER_HUB

- <<: *create_manifest
stage: manifest
name: Create manifest for release (RHCC)
if: tag =~ /^v.*/
env: IMAGE=$OAO_IMAGE_RHCC

######################### Prepare CSV #########################

Expand All @@ -221,4 +259,3 @@ jobs:
deploy:
provider: releases
file: artefacts/*

4 changes: 2 additions & 2 deletions build/deploy.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

if [[ "$GCR" == "true" ]]; then
echo $GCLOUD_SERVICE_KEY | gcloud auth activate-service-account --key-file=-
gcloud --quiet config set project $GCP_PROJECT
echo "$GCLOUD_SERVICE_KEY" | base64 -d | gcloud auth activate-service-account --key-file=-
gcloud --quiet config set project "$GCP_PROJECT"
gcloud auth configure-docker
else
TAG=$TAG-$TRAVIS_CPU_ARCH
Expand Down

0 comments on commit dea5ce7

Please sign in to comment.