fluentmigrator / documentation

This is the source of fluentmigrator.github.io
https://fluentmigrator.github.io
Creative Commons Attribution Share Alike 4.0 International
6 stars 18 forks source link

Release pipeline is broken #41

Closed eloekset closed 3 years ago

eloekset commented 3 years ago

Related to #24 Travis was replaced by Azure Pipelines, and now the release script is broken.

Investigation so far seems that something has changed regarding the delete task that is used to clear all files from the local git repo, except the .git folder itself. Release is done by extracting the content of a new zip file over the working directory of the local git repo, and then do git add ., git commit and git push. The result is:

2020-12-31T22:01:25.6106269Z On branch master
2020-12-31T22:01:25.6107321Z Your branch is up to date with 'origin/master'.
2020-12-31T22:01:25.6107956Z 
2020-12-31T22:01:25.6108416Z nothing to commit, working tree clean
2020-12-31T22:01:26.9335783Z Everything up-to-date
2020-12-31T22:01:26.9398350Z ##[section]Finishing: Commit to git repo and push to origin

Even though we know the latest build artifacts have changes compared to the latest git release, those changes are not discovered by git, so there must be something wrong happening when the content of the zip file is copied into the working directory of the local git repo.

So far I've tried to replace the delete task with a bash script to delete everything except the .git folder:

cd gitrepo/docs
rm -rf !.git

This bash script doesn't give any output, so I'm not sure if the commands actually delete anything:

2020-12-31T22:01:24.2871184Z ========================== Starting Command Output ===========================
2020-12-31T22:01:24.2887260Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/677770a6-301f-435c-8242-c31754614b24.sh
2020-12-31T22:01:24.3039796Z ##[section]Finishing: Delete all repo files except .git folder

However a separate bash script lists the files of the working directory after the delete script has executed, and it shows that the files and folders are still there:

2020-12-31T22:01:24.3064601Z ##[section]Starting: Debug: List files after delete
2020-12-31T22:01:24.3069416Z ==============================================================================
2020-12-31T22:01:24.3069712Z Task         : Bash
2020-12-31T22:01:24.3069953Z Description  : Run a Bash script on macOS, Linux, or Windows
2020-12-31T22:01:24.3070216Z Version      : 3.179.0
2020-12-31T22:01:24.3070424Z Author       : Microsoft Corporation
2020-12-31T22:01:24.3070740Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/bash
2020-12-31T22:01:24.3071086Z ==============================================================================
2020-12-31T22:01:24.4420757Z Generating script.
2020-12-31T22:01:24.4520475Z ========================== Starting Command Output ===========================
2020-12-31T22:01:24.4523139Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/a3d98498-fbe7-4c5e-aa95-74feefc03c6e.sh
2020-12-31T22:01:24.4638725Z .:
2020-12-31T22:01:24.4639469Z total 8.4M
2020-12-31T22:01:24.4640248Z drwxr-xr-x 8 vsts docker 4.0K Dec 31 22:01 .git
2020-12-31T22:01:24.4641520Z -rw-r--r-- 1 vsts docker 5.7K Dec 31 22:01 README.html
2020-12-31T22:01:24.4642515Z drwxr-xr-x 4 vsts docker 4.0K Dec 31 22:01 api
2020-12-31T22:01:24.4643317Z drwxr-xr-x 8 vsts docker 4.0K Dec 31 22:01 articles
2020-12-31T22:01:24.4644085Z -rw-r--r-- 1 vsts docker  98K Dec 31 22:01 favicon.ico
2020-12-31T22:01:24.4645042Z drwxr-xr-x 2 vsts docker 4.0K Dec 31 22:01 fonts
2020-12-31T22:01:24.4646224Z drwxr-xr-x 2 vsts docker 4.0K Dec 31 22:01 images
2020-12-31T22:01:24.4646980Z -rw-r--r-- 1 vsts docker 9.5K Dec 31 22:01 index.html
2020-12-31T22:01:24.4647793Z -rw-r--r-- 1 vsts docker 2.4M Dec 31 22:01 index.json
2020-12-31T22:01:24.4648732Z -rw-r--r-- 1 vsts docker 1.3K Dec 31 22:01 logo.svg
2020-12-31T22:01:24.4649817Z -rw-r--r-- 1 vsts docker 483K Dec 31 22:01 manifest.json
2020-12-31T22:01:24.4656096Z -rw-r--r-- 1 vsts docker 1.3K Dec 31 22:01 search-stopwords.json
2020-12-31T22:01:24.4656949Z drwxr-xr-x 2 vsts docker 4.0K Dec 31 22:01 styles
2020-12-31T22:01:24.4657760Z -rw-r--r-- 1 vsts docker  814 Dec 31 22:01 toc.html
2020-12-31T22:01:24.4658749Z -rw-r--r-- 1 vsts docker 2.4M Dec 31 22:01 v2.x.xrefmap.yml
2020-12-31T22:01:24.4659705Z -rw-r--r-- 1 vsts docker 3.0M Dec 31 22:01 xrefmap.yml
2020-12-31T22:01:24.4660125Z 
2020-12-31T22:01:24.4660499Z ./.git:
2020-12-31T22:01:24.4660823Z total 204K
2020-12-31T22:01:24.4661611Z -rw-r--r-- 1 vsts docker   23 Dec 31 22:01 HEAD
2020-12-31T22:01:24.4662379Z drwxr-xr-x 2 vsts docker 4.0K Dec 31 22:01 branches
2020-12-31T22:01:24.4663934Z -rw-r--r-- 1 vsts docker  355 Dec 31 22:01 config
2020-12-31T22:01:24.4664708Z -rwxr-xr-x 1 vsts docker   73 Dec 31 22:01 description
2020-12-31T22:01:24.4665375Z drwxr-xr-x 2 vsts docker 4.0K Dec 31 22:01 hooks
2020-12-31T22:01:24.4666155Z -rw-r--r-- 1 vsts docker 161K Dec 31 22:01 index
2020-12-31T22:01:24.4666731Z drwxr-xr-x 2 vsts docker 4.0K Dec 31 22:01 info
2020-12-31T22:01:24.4667547Z drwxr-xr-x 3 vsts docker 4.0K Dec 31 22:01 logs
2020-12-31T22:01:24.4668167Z drwxr-xr-x 4 vsts docker 4.0K Dec 31 22:01 objects
2020-12-31T22:01:24.4668815Z -rw-r--r-- 1 vsts docker  114 Dec 31 22:01 packed-refs
2020-12-31T22:01:24.4669446Z drwxr-xr-x 5 vsts docker 4.0K Dec 31 22:01 refs
2020-12-31T22:01:24.4669780Z 
2020-12-31T22:01:24.4670028Z ./.git/branches:
2020-12-31T22:01:24.4670322Z total 0
2020-12-31T22:01:24.4670546Z 
2020-12-31T22:01:24.4670777Z ./.git/hooks:
2020-12-31T22:01:24.4677746Z total 56K
2020-12-31T22:01:24.4678488Z -rwxr-xr-x 1 vsts docker  478 Dec 31 22:01 applypatch-msg.sample
(...)
2020-12-31T22:01:24.4710876Z ./api:
2020-12-31T22:01:24.4711000Z total 476K
2020-12-31T22:01:24.4711358Z -rw-r--r-- 1 vsts docker 5.6K Dec 31 22:01 index.html
2020-12-31T22:01:24.4711768Z -rw-r--r-- 1 vsts docker 337K Dec 31 22:01 toc.html
2020-12-31T22:01:24.4712186Z drwxr-xr-x 2 vsts docker  60K Dec 31 22:01 v2.x
2020-12-31T22:01:24.4712580Z drwxr-xr-x 2 vsts docker  68K Dec 31 22:01 v3.x
2020-12-31T22:01:24.4713036Z 
2020-12-31T22:01:24.4713181Z ./api/v2.x:
2020-12-31T22:01:24.4713671Z total 8.6M
2020-12-31T22:01:24.4714151Z -rw-r--r-- 1 vsts docker 6.2K Dec 31 22:01 FluentMigrator.AutoNameContext.html
2020-12-31T22:01:24.4714935Z -rw-r--r-- 1 vsts docker  11K Dec 31 22:01 FluentMigrator.AutoReversingMigration.html
2020-12-31T22:01:24.4715546Z -rw-r--r-- 1 vsts docker 9.7K Dec 31 22:01 FluentMigrator.AutoScriptMigration.html
2020-12-31T22:01:24.4716267Z -rw-r--r-- 1 vsts docker  16K Dec 31 22:01 FluentMigrator.Builders.Alter.Column.IAlterColumnAsTypeOrInSchemaSyntax.html
2020-12-31T22:01:24.4717519Z -rw-r--r-- 1 vsts docker  14K Dec 31 22:01 FluentMigrator.Builders.Alter.Column.IAlterColumnAsTypeSyntax.html
2020-12-31T22:01:24.4719171Z -rw-r--r-- 1 vsts docker 7.6K Dec 31 22:01 FluentMigrator.Builders.Alter.Column.IAlterColumnOnTableSyntax.html
(...)

The ./api folder and its sub folders should not be there.

eloekset commented 3 years ago

I gave up on using the Azure Pipeline tasks for extracting archives and copy files and replaced them with bash scripts instead.

Referring to the latest commit https://github.com/fluentmigrator/fluentmigrator.github.io/commit/d32f47005cd85ade667006f00bb32f9a5a256414 it looks like it's doing things correctly again now.

Straight forward bash scripts should make the pipeline more stable, since it won't be affected by breaking changes to Azure Pipeline tasks.

jzabroski commented 3 years ago

Thank you. Makes sense to me. I personally think Azure Pipelines tasks is job security for whoever works on it at Microsoft :)