Граф коммитов

91 Коммитов

Автор SHA1 Сообщение Дата
Alexander Holstrup 6f8c7f379a
Fix all issues found by pre-commit and add a pre-commit check to PRs (#1112)
This PR should go in after https://github.com/microsoft/AL-Go/pull/955

This PR:
* Fixes all the issues found by the pre-commit hooks (by running
`pre-commit run --all-files`)
* Adds a check on future AL-Go PRs to ensure the pre-commit hooks have
been run.

---------

Co-authored-by: Freddy Kristiansen <freddy.kristiansen@microsoft.com>
2024-06-24 11:33:51 +02:00
Freddy Kristiansen 6a9ef0c91e
Deploybug (#1076)
2 bugs when deploying to preview

- use of unknown variable (reserveReleaseNotes)
- use of wrong name of end 2 end tests workflow when searching for
workflow results

Also, when testing that end 2 end tests have run - check that no jobs
were skipped (running only partial tests)
autodeploy to preview after successful end 2 end tests.

---------

Co-authored-by: freddydk <freddydk@users.noreply.github.com>
2024-05-16 07:41:24 +02:00
Freddy Kristiansen 92365fbce2
Automate release process (#1064)
Automate:
- The generation of modifying release notes with the version number (and
revert)
- Creation of a release in AL-Go repo

Adds:
- Check that a successful end 2 end test was run on the same commit you
are releasing

---------

Co-authored-by: freddydk <freddydk@users.noreply.github.com>
Co-authored-by: Alexander Holstrup <117829001+aholstrup1@users.noreply.github.com>
2024-05-02 14:17:52 +02:00
Freddy Kristiansen 28a355fac1
Fix containerhelperversion in deploy (#748)
After finding out that v3.3 was shipped with containerHelper preview as
the selected version, I investigated and found that:
If a defaultContainerHelperVersion wasn't specified when running deploy,
the default containerHelperVersion used was taken from AL-Go-Helper.ps1
(which normally is "preview")
This PR defaults defaultContainerHelperVersion to preview for preview
branches and latest for other branches.
Also it makes sure that the line in AL-Go-Helper.ps1 can be found and
patched - else it will throw an error.

---------

Co-authored-by: freddydk <freddydk@users.noreply.github.com>
2023-10-02 13:51:40 +02:00
Freddy Kristiansen 3c466ebe8b
Removal of 450 Script Analyzer problems (#686)
### The only real code change is in ReadSecrets
- If you precede a secret name with an asterisk in ReadSecrets/get, it
will be encrypted (as well as base64 encoded)
- Secrets used as SecureString in code will be requested as encrypted
(codeSignCertificatePassword and KeyVaultCertificatePassword) - allows
us to use ConvertTo-SecureString (without the -plaintext clause)
- Refactor connection to Azure KeyVault to only get credentials once and
keep clientSecret as secureString

This part also contains a bug fix that was introduced in
GetKeyVaultSecret during secrets refactoring (identified by secretName
parameter was never used)

### Whitespace only changes:
- Missing BOM on .ps1 files (all now have BOM - half didn't)
- Whitespace trailing lines (fixed everywhere)

### Suppressions:
- Suppress Analyzer on parameter blocks on test runners
- Suppress ConvertTo-SecureString (with plain text) in ReadSecretsHelper
- since we get GitHub secrets in clear text in code.
- Variables initialized in BeforeAll in tests
- Assigning isWindows, isMacOS and isLinux when running PS5

### Renaming functions to not use dash in names (must then follow
cmdlets)

### Removing actor+token from ReadSettings action as this is no longer
needed
- Functionality needing these have been moved to seperate actions

---------

Co-authored-by: freddydk <freddydk@users.noreply.github.com>
Co-authored-by: Maria Zhelezova <43066499+mazhelez@users.noreply.github.com>
2023-09-05 10:40:42 +02:00
Alexander Holstrup f3d69d507d
Updates to AL-Go deployment process (#659)
This PR changes the deployment process to
* Create pull requests when deploying Al-Go rather than force pushing 
* Fetch the OrgPat from a GitHub environment to ensure that the secret
can only be accessed from workflows running on the main branch of AL-Go
* (Update the OrgPat to be from a service account rather than a PAT from
a Microsoft engineer)

New deployment process:
1. Run the Deploy workflow in microsoft/Al-Go
2. Request approval from another team member 
3. The deploy action will by default create PRs in Al-Go-PTE /
Al-Go-AppSource / Al-Go-Actions. Go to those repositories, validate that
the PR looks as expected and merge the new changes.

---------

Co-authored-by: Maria Zhelezova <43066499+mazhelez@users.noreply.github.com>
2023-08-16 13:29:46 +02:00
Freddy Kristiansen dbd045c40f
Do not deploy to AL-Go-Actions@preview (#663)
When deploying to v3.2 and checked the CopyToMain checkbox, the
deployment overrode the AL-Go-Actions@preview - this should never
happen.

---------

Co-authored-by: freddydk <freddydk@users.noreply.github.com>
2023-08-16 07:17:18 +02:00
Freddy Kristiansen 240db23a62
Add Api Version to all GitHub API calls (#658)
Ensure that all calls to GitHub API have an API Version set in the call
to ensure they don't break by an update to the API
Also, remove prior pre-release mediatypes and always use the recommended
by GitHub

Co-authored-by: freddydk <freddydk@users.noreply.github.com>
2023-08-16 05:59:21 +02:00
Freddy Kristiansen 2fe6957474
Substitution pattern problem (#655)
When using regex and the substitution pattern has replacements starting
with a number (branch, repo, SHA, ...) regex will fail.
This lead to wrong deployment to preview ealier.

---------

Co-authored-by: freddydk <freddydk@users.noreply.github.com>
2023-08-11 10:56:08 +02:00
Freddy Kristiansen 20b165ff5c
Deploy to preview changes (#646)
This PR changes the way we deploy to preview.

`microsoft/AL-Go-PTE@preview` (and AppSource template) will no longer
point to `microsoft/AL-Go-Actions@preview`, it will instead point to
`microsoft/AL-Go@SHA` of the commit you are deploying from.

This means that we will no longer make in-place updates of
microsoft/AL-Go-Actions@preview with the risk of breaking people.

The PR also removes the ability to run internal/deploy.ps1 and
internal/collect.ps1 from PowerShell and deprecates collect.ps1. Deploy
and Collect will still work, but collect is subject for removal in a
near future.

Contribution documentation has also been modified.

TODO:
- [x] the default template description in the Update AL-Go System Files
Yaml file is not updated.

---------

Co-authored-by: freddydk <freddydk@users.noreply.github.com>
Co-authored-by: Maria Zhelezova <43066499+mazhelez@users.noreply.github.com>
2023-08-07 14:35:19 +02:00
Freddy Kristiansen 15058fc98e
Give better error message when uploading to storage (+ set progresspreference to silently continue) (issue528) (#616)
Fix for issue #528
Set ProgressPereference to SilentlyContinue and strict-mode v2.0 in all
PowerShell scripts.
and give better error messages when uploading to storage accounts

---------

Co-authored-by: freddydk <freddydk@users.noreply.github.com>
2023-07-25 06:03:45 +02:00
Freddy Kristiansen 5fff997726
test deploy failure (#606)
Co-authored-by: freddydk <freddydk@users.noreply.github.com>
2023-07-18 08:18:47 +02:00
Freddy Kristiansen 71b2e7f8ad
BuildBy (#597)
Fill out 4 new parameters on Run-AlPipeline (and the Compile functions),
to specify the origin of the app inside the app manifest.

- SourceRepositoryUrl specifies the repository URL
- SourceCommit specifies the SHA used for the build
- BuildBy specifies the product used to perform the build
- BuildUrl is the URL to the workflow run

Parameters dumped in the RunPipeline Action are:

![image](https://github.com/microsoft/AL-Go/assets/10775043/829a1216-0c1a-427e-94e3-392814dc1baf)

NavxManifest.xml in the app package will contain properties like this:
```
<Source RepositoryUrl="https://github.com/BusinessCentralApps/buildorder" Commit="5523f3678064a9f425e1825ef94583d6f3136ebc" />
<Build By="AL-Go for GitHub,v3.1" Url="https://github.com/BusinessCentralApps/buildorder/actions/runs/5435941342" Timestamp="2023-07-07T10:01:13.8159082Z" CompilerVersion="12.0.12.44111" />
```

---------

Co-authored-by: freddydk <freddydk@users.noreply.github.com>
2023-07-11 06:22:44 +01:00
Freddy Kristiansen 4baca4f3ea better temp branch names 2023-06-26 08:03:13 +02:00
freddydk 9ff9e26f77 review comments 2023-01-06 14:06:19 +01:00
freddydk 7899039899 resolve path and set autocrlf to false 2023-01-02 07:50:00 +01:00
freddydk 77bc85c15b use LF 2023-01-02 07:21:22 +01:00
freddydk e53e158a89 format json. import module 2023-01-02 07:03:24 +01:00
freddydk b31ada891c dont use githubtoken 2022-12-29 07:46:38 +01:00
freddydk 3fb279c372 add newline 2022-12-29 07:21:55 +01:00
freddydk cc99529ba9 use gh 2022-12-29 07:12:59 +01:00
freddydk ecaa81b50c remove project sources 2022-12-29 07:09:54 +01:00
freddydk 73f5d17dc2 rename tests and check artifacts 2022-12-28 07:23:22 +01:00
freddydk 8010322a5b use crlf 2022-12-27 06:38:48 +01:00
freddydk fe1fa82418 dstfile 2022-12-26 22:18:45 +01:00
freddydk 7d872b6cd6 remove unnecessary files 2022-12-26 16:39:10 +01:00
freddydk 3566834fa4 Test restructure 2022-12-26 07:10:05 +01:00
freddydk 95007aaeca remove dumps from deploy 2022-12-22 18:45:09 +01:00
freddydk 710d608884 casing 2022-12-21 23:42:01 +01:00
freddydk 777f0045ad syntax err 2022-12-21 23:33:28 +01:00
freddydk 6da39d14bc dump 2022-12-21 23:28:30 +01:00
freddydk 51e8aafcb8 fullname 2022-12-21 23:25:02 +01:00
freddydk f69ce58ec5 remove syntax err 2022-12-21 23:17:49 +01:00
freddydk bc75ae740c support collectíng from specific branch 2022-12-21 17:59:40 +01:00
freddydk 47f828fe62 include hidden 2022-12-20 11:22:13 +01:00
freddydk 674be4888c syntax 2022-12-20 11:11:40 +01:00
freddydk d57e769d22 linux 2022-12-20 11:08:16 +01:00
freddydk 098d096f8a dumps 2022-12-20 10:57:23 +01:00
freddydk eb77a43977 use Join-Path 2022-12-20 10:47:32 +01:00
freddydk d3ce41e3b2 remove containerhelperversion on collect 2022-12-19 16:25:09 +01:00
freddydk fa2fbf8b4c no backslash 2022-12-19 16:12:16 +01:00
freddydk e2695bb0f8 containerhelper in deplot 2022-12-19 16:09:08 +01:00
freddydk e4807ad0c3 add branch 2022-12-04 21:12:11 +01:00
freddydk d707ccd7ac fix branch in update AL-Go System files 2022-10-23 00:40:01 +02:00
freddydk 58c4ee89fa test empty 2022-06-01 15:22:16 +02:00
freddydk d1ea6e714f use invoke-gh and git from githubhelper 2022-06-01 15:12:21 +02:00
freddydk 8a9cfa828e dot 2022-05-25 15:16:49 +02:00
freddydk 2d3ffb4bb4 deploy copy of releasenotes 2022-05-25 14:59:19 +02:00
freddydk 421df20da2 preview support - update preview with main 2022-04-30 17:26:29 +02:00
Freddy Kristiansen 7488cfa4ca keep AL-Go Settings branch at main 2022-03-26 07:14:14 +01:00