Skip to content
Snippets Groups Projects
Commit e1c30618 authored by Cloud User's avatar Cloud User
Browse files

BIOMASS-2998 enable a secure build for the registry DEV and MAAP_ENV_TYPE

parent 57a0fdec
No related branches found
Tags 1.10.1
No related merge requests found
Pipeline #1977 failed with stage
in 2 minutes and 49 seconds
#!/bin/bash
# Script to build the devfile registry for a dev environnment
# the parameter allow to change the version of the devfile in the development orange registry cloud-biomass-maap-dev
# You have to check before what is the latest version
# Temporary changes the reference of the stacks to avoid conflict with the existing
find devfiles/*/devfile.yaml | xargs sed -i 's#/cloud-biomass-maap/#/cloud-biomass-maap-dev/#g'
#Show the modified files
echo "The files below are temporary modified for the development registry"
grep cloud-biomass-maap-dev devfiles/*/devfile.yaml
#Build and push the registry
docker build -t che-devfile-registry -f build/dockerfiles/Dockerfile .
docker tag che-devfile-registry registry.eu-west-0.prod-cloud-ocb.orange-business.com/cloud-biomass-maap-dev/che-devfile-registry:$1
docker push registry.eu-west-0.prod-cloud-ocb.orange-business.com/cloud-biomass-maap-dev/che-devfile-registry:$1
# Restore the reference of the stacks
find devfiles/*/devfile.yaml | xargs sed -i 's#/cloud-biomass-maap-dev/#/cloud-biomass-maap/#g'
#Show the modified files
echo "Restored files , you should not see any files below"
grep cloud-biomass-maap-dev devfiles/*/devfile.yaml
#!/bin/bash
# Script to build the devfile registry for a MAAP environnment (INT, MAINT)
# the parameter allows to change the version of the devfile in the orange registry cloud-biomass-maap
# You have to check before what is the latest version
# Temporary changes the reference of the container for the s3 storage
sed -i "s/che-s3-storage:master/che-s3-storage:master-${MAAP_ENV_TYPE,,}/g" devfiles/*/devfile.yaml
#Show the modified files
echo "The files below are temporary modified for the s3 storage"
grep "che-s3-storage:master" devfiles/*/devfile.yaml
#Build and push the registry
## The version in production is related to a tag without '-'
REGISTRY_VERSION=$1-${MAAP_ENV_TYPE,,}
docker build -t che-devfile-registry -f build/dockerfiles/Dockerfile .
docker tag che-devfile-registry registry.eu-west-0.prod-cloud-ocb.orange-business.com/cloud-biomass-maap/che-devfile-registry:$REGISTRY_VERSION
docker push registry.eu-west-0.prod-cloud-ocb.orange-business.com/cloud-biomass-maap/che-devfile-registry:$REGISTRY_VERSION
# Restore the reference of the container for the s3 storage
sed -i "s/che-s3-storage:master-${MAAP_ENV_TYPE,,}/che-s3-storage:master/g" devfiles/*/devfile.yaml
#Check the default configuration files
echo "Restored files , you should not see any files below"
grep "che-s3-storage:master-${MAAP_ENV_TYPE,,}" devfiles/*/devfile.yaml
......@@ -51,7 +51,7 @@ components:
mountPath: /projects/.conda
- name: s3fs
image: 'registry.eu-west-0.prod-cloud-ocb.orange-business.com/cloud-biomass-maap/che-s3-storage:master'
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
envFrom:
- configMapRef:
name: maap-configmap
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment