diff --git a/.one-pipeline.yaml b/.one-pipeline.yaml index 21608d3106234..57bc286e31e02 100644 --- a/.one-pipeline.yaml +++ b/.one-pipeline.yaml @@ -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 @@ -26,7 +26,7 @@ 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 @@ -34,33 +34,15 @@ static-scan: 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 @@ -68,14 +50,14 @@ deploy: 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 diff --git a/Makefile b/Makefile index 8a18c80c8613b..b7a6dc33ba2a7 100644 --- a/Makefile +++ b/Makefile @@ -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} \ No newline at end of file