Learnings from latest automated git publish. Small tweaks (#23440)
This commit is contained in:
@@ -6,3 +6,5 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- ../scripts:/home/circleci/scripts
|
- ../scripts:/home/circleci/scripts
|
||||||
- ../install:/home/circleci/install
|
- ../install:/home/circleci/install
|
||||||
|
- ${HOME}/.ssh:/root/.ssh
|
||||||
|
- ../../..:/home/circleci/grafana-toolkit
|
||||||
|
|||||||
@@ -1,4 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
function finish {
|
||||||
|
echo "Exiting and cleaning up docker image"
|
||||||
|
docker-compose down
|
||||||
|
}
|
||||||
|
trap finish EXIT
|
||||||
|
|
||||||
# Enter the docker container
|
# Enter the docker container
|
||||||
docker-compose run citest bash -c "cd /home/circleci; exec bash --login -i"
|
docker-compose run citest bash -c "cd /home/circleci; exec bash --login -i"
|
||||||
|
|||||||
@@ -69,10 +69,11 @@ const prepareRelease = useSpinner<any>('Preparing release', async ({ dryrun, ver
|
|||||||
['git', ['config', 'user.email', DEFAULT_EMAIL_ADDRESS]],
|
['git', ['config', 'user.email', DEFAULT_EMAIL_ADDRESS]],
|
||||||
['git', ['config', 'user.name', DEFAULT_USERNAME]],
|
['git', ['config', 'user.name', DEFAULT_USERNAME]],
|
||||||
await checkoutBranch(`release-${pluginJson.info.version}`),
|
await checkoutBranch(`release-${pluginJson.info.version}`),
|
||||||
['cp', ['-rf', distContentDir, 'dist']],
|
['/bin/rm', ['-rf', 'dist'], { dryrun }],
|
||||||
['git', ['add', '--force', distDir], { dryrun }],
|
['mv', ['-v', distContentDir, 'dist']],
|
||||||
['git', ['add', '--force', 'dist'], { dryrun }],
|
['git', ['add', '--force', 'dist'], { dryrun }],
|
||||||
['/bin/rm', ['-rf', 'src'], { enterprise: true }],
|
['/bin/rm', ['-rf', 'src'], { enterprise: true }],
|
||||||
|
['git', ['rm', '-rf', 'src'], { enterprise: true }],
|
||||||
[
|
[
|
||||||
'git',
|
'git',
|
||||||
['commit', '-m', `automated release ${pluginJson.info.version} [skip ci]`],
|
['commit', '-m', `automated release ${pluginJson.info.version} [skip ci]`],
|
||||||
@@ -81,8 +82,9 @@ const prepareRelease = useSpinner<any>('Preparing release', async ({ dryrun, ver
|
|||||||
okOnError: [/nothing to commit/g, /nothing added to commit/g, /no changes added to commit/g],
|
okOnError: [/nothing to commit/g, /nothing added to commit/g, /no changes added to commit/g],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
['git', ['tag', '-f', pluginJson.info.version]],
|
|
||||||
['git', ['push', '-f', 'origin', `release-${pluginJson.info.version}`], { dryrun }],
|
['git', ['push', '-f', 'origin', `release-${pluginJson.info.version}`], { dryrun }],
|
||||||
|
['git', ['tag', '-f', `v${pluginJson.info.version}`]],
|
||||||
|
['git', ['push', '-f', 'origin', `v${pluginJson.info.version}`]],
|
||||||
];
|
];
|
||||||
|
|
||||||
for (let line of githubPublishScript) {
|
for (let line of githubPublishScript) {
|
||||||
|
|||||||
Reference in New Issue
Block a user