Skip to content

Commit

Permalink
Update package.json commands to take version
Browse files Browse the repository at this point in the history
The npm commands to build a new image now
accept the "--mytag" argument to tag the image created.
To prevent code duplication, the commands are also re-used in the composited
"openshift_import_and_restart" and
"docker_build_and_push" commands.
  • Loading branch information
nothingface0 committed Oct 1, 2024
1 parent 4137ea0 commit 3794426
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions runregistry_backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
"migrate": "./node_modules/.bin/sequelize db:migrate",
"start_pinging_gui": "node --inspect=0.0.0.0:9229 cron_datasets/2.ping_dqm_gui.js",
"start_processing_jsons": "",
"openshift_import_and_restart": "oc import-image runregistry-backend --from=registry.cern.ch/cms-dqmdc/runregistry-backend --confirm && oc rollout restart deployment/runregistry-backend",
"openshift_import_and_restart": "npm run openshift_import && npm run openshift_restart",
"openshift_import": "oc import-image runregistry-backend --from=registry.cern.ch/cms-dqmdc/runregistry-backend --confirm",
"openshift_restart": "oc rollout restart deployment/runregistry-backend",
"docker_build_and_push": "docker build . -t registry.cern.ch/cms-dqmdc/runregistry-backend && docker push registry.cern.ch/cms-dqmdc/runregistry-backend",
"docker_build": "docker build . -f Dockerfile -t registry.cern.ch/cms-dqmdc/runregistry-backend",
"docker_push": "docker push registry.cern.ch/cms-dqmdc/runregistry-backend"
"docker_build_and_push": "npm run docker_build ${npm_config_mytag:+--mytag=$npm_config_mytag} && npm run docker_push ${npm_config_mytag:+--mytag=$npm_config_mytag}",
"docker_build": "docker build . -f Dockerfile -t registry.cern.ch/cms-dqmdc/runregistry-backend${npm_config_mytag:+:$npm_config_mytag}",
"docker_push": "docker push registry.cern.ch/cms-dqmdc/runregistry-backend${npm_config_mytag:+:$npm_config_mytag}"
},
"keywords": [],
"author": "",
Expand Down
10 changes: 5 additions & 5 deletions runregistry_frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
"build": "next build",
"start": "node server",
"test": "echo \"Error: no test specified\" && exit 1",
"openshift_import_and_restart": "oc import-image runregistry-frontend --from=registry.cern.ch/cms-dqmdc/runregistry-frontend --confirm && oc rollout restart deployment/runregistry-frontend",
"openshift_import": "oc import-image runregistry-frontend --from=registry.cern.ch/cms-dqmdc/runregistry-frontend --confirm",
"openshift_import_and_restart": "npm run openshift_import ${npm_config_mytag:+--mytag=$npm_config_mytag} && npm run openshift_restart",
"openshift_import": "oc import-image runregistry-frontend${npm_config_mytag:+:$npm_config_mytag} --from=registry.cern.ch/cms-dqmdc/runregistry-frontend --confirm",
"openshift_restart": "oc rollout restart deployment/runregistry-frontend",
"docker_build_and_push": "docker build . -f Dockerfile -t registry.cern.ch/cms-dqmdc/runregistry-frontend && docker push registry.cern.ch/cms-dqmdc/runregistry-frontend",
"docker_build": "docker build . -f Dockerfile -t registry.cern.ch/cms-dqmdc/runregistry-frontend",
"docker_push": "docker push registry.cern.ch/cms-dqmdc/runregistry-frontend"
"docker_build_and_push": "npm run docker_build ${npm_config_mytag:+--mytag=$npm_config_mytag} && npm run docker_push ${npm_config_mytag:+--mytag=$npm_config_mytag}",
"docker_build": "docker build . -f Dockerfile -t registry.cern.ch/cms-dqmdc/runregistry-frontend${npm_config_mytag:+:$npm_config_mytag}",
"docker_push": "docker push registry.cern.ch/cms-dqmdc/runregistry-frontend${npm_config_mytag:+:$npm_config_mytag}"
},
"keywords": [],
"author": "",
Expand Down

0 comments on commit 3794426

Please sign in to comment.