Skip to content

Commit

Permalink
feat: Argo CD CI pipeline changes (argoproj#4)
Browse files Browse the repository at this point in the history
* updated cicd image

* upadted registry region

* updated one.pipeline.yaml to use the latest scripts

* updated makefile to add required targets
  • Loading branch information
rahul-mourya authored and sujeilyfonseca committed May 13, 2022
1 parent e5595b4 commit c4182f7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 25 deletions.
32 changes: 7 additions & 25 deletions .one-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: '1'
test:
dind: true
abort_on_failure: false
image: us.icr.io/cloudrock_dev/onepipeline-task-image:v1.3.3
image: us.icr.io/cloudrock_dev/onepipeline-task-image:v1.3.5
script: |
#!/usr/bin/env bash
source /cicd-scripts/before_each.sh
Expand All @@ -26,56 +26,38 @@ test:
static-scan:
abort_on_failure: false
image: us.icr.io/cloudrock_dev/onepipeline-task-image:v1.3.3
image: us.icr.io/cloudrock_dev/onepipeline-task-image:v1.3.5
script: |
#!/usr/bin/env bash
source /cicd-scripts/before_each.sh
source /cicd-scripts/static_scan.sh
containerize:
dind: true
image: us.icr.io/cloudrock_dev/onepipeline-task-image:v1.3.3
image: us.icr.io/cloudrock_dev/onepipeline-task-image:v1.3.5
script: |
#!/usr/bin/env bash
source /cicd-scripts/before_each.sh
source /cicd-scripts/build_setup.sh
source /cicd-scripts/build.sh
get_env api-key | docker login -u iamapikey --password-stdin "$ICR_REGISTRY_REGION.icr.io"
echo "Checking registry namespace: ${ICR_REGISTRY_NAMESPACE}"
IBM_LOGIN_REGISTRY_REGION=$(get_env registry-region | awk -F: '{print $3}')
ibmcloud login --apikey $(get_env api-key) -r "$IBM_LOGIN_REGISTRY_REGION"
NS=$( ibmcloud cr namespaces | sed 's/ *$//' | grep -x "${ICR_REGISTRY_NAMESPACE}" ||: )
if [ -z "${NS}" ]; then
echo "Registry namespace ${ICR_REGISTRY_NAMESPACE} not found!"
return 1
else
echo "Registry namespace ${ICR_REGISTRY_NAMESPACE} found."
fi
docker build -t $IMAGE .
docker push $IMAGE
save_artifact image "digest=$(docker inspect --format='{{index .RepoDigests 0}}' $IMAGE | awk -F@ '{print $2}')"
deploy:
image: us.icr.io/cloudrock_dev/onepipeline-task-image:v1.3.3
image: us.icr.io/cloudrock_dev/onepipeline-task-image:v1.3.5
script: |
#!/usr/bin/env bash
source /cicd-scripts/before_each.sh
echo 'TODO: Connect to CD'
acceptance-test:
abort_on_failure: false
image: us.icr.io/cloudrock_dev/onepipeline-task-image:v1.3.3
image: us.icr.io/cloudrock_dev/onepipeline-task-image:v1.3.5
script: |
#!/usr/bin/env bash
source /cicd-scripts/before_each.sh
echo 'TODO: Run acceptance tests'
release:
image: us.icr.io/cloudrock_dev/onepipeline-automation-image:v1.3.3
image: us.icr.io/cloudrock_dev/onepipeline-automation-image:v1.3.5
script: |
#!/usr/bin/env bash
source /cicd-scripts/before_each.sh
Expand Down
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -558,3 +558,13 @@ start-test-k8s:
.PHONY: list
list:
@LC_ALL=C $(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$'

# Build the docker image
.PHONY: docker-build
docker-build:
docker build -t ${IMG} .

# Push the docker image
.PHONY: docker-push
docker-push:
docker push ${IMG}

0 comments on commit c4182f7

Please sign in to comment.