Giter VIP home page Giter VIP logo

build-images's People

Contributors

alenahrynkevich avatar chmely avatar craftwar avatar ewouth avatar feodorfitsner avatar hoffstadt avatar hymccord avatar kasperk81 avatar liryna avatar luncliff avatar mikee47 avatar owenmcdonnell avatar silvenga avatar techknowlogick avatar wasapl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

build-images's Issues

Missing nuget.org package source on BYOC AWS Linux

It seems that when I build our own AWS build image based on Linux the standard nuget.org package source is not present in ~/.nuget/NuGet/NuGet.Config when build starts

Tested scenarios:

1. BYOC Windows: (works as expected)

nuget:
  disable_publish_on_pr: true
  account_feed: true
  project_feed: true
  
install:
- cmd: |
    nuget
    nuget sources
    type %appdata%\NuGet\NuGet.Config

output:

NuGet Version: 5.11.0.10

Registered Sources:
  1.  nuget.org [Enabled]
      https://api.nuget.org/v3/index.json
  2.  AppveyorAccountFeed [Enabled]
      https://ci.appveyor.com/nuget/abcde-323ubderfg349
  3.  AppveyorProjectFeed [Enabled]
      https://ci.appveyor.com/nuget/abcde-m5sdafsdfslmw
  4.  Microsoft Visual Studio Offline Packages [Enabled]
      C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
    <add key="AppveyorAccountFeed" value="https://ci.appveyor.com/nuget/abcde-22348sdg8wh3" />
    <add key="AppveyorProjectFeed" value="https://ci.appveyor.com/nuget/abcde-m5sdafsdfslmw" />
  </packageSources>
  <packageSourceCredentials>
    <AppveyorAccountFeed>
      <add key="Username" value="nuget" />
      <add key="ClearTextPassword" value="6feac921a39" />
    </AppveyorAccountFeed>
    <AppveyorProjectFeed>
      <add key="Username" value="nuget" />
      <add key="ClearTextPassword" value="6feac921a39" />
    </AppveyorProjectFeed>
  </packageSourceCredentials>
</configuration>

2. Standard Linux Ubuntu image: (works as expected)

nuget:
  disable_publish_on_pr: true
  account_feed: true
  project_feed: true

install:
- sh: >-

    nuget

    cat ~/.nuget/NuGet/NuGet.Config

output:

NuGet Version: 6.4.0.123

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
    <add key="AppveyorAccountFeed" value="https://ci.appveyor.com/nuget/abcde-2dfdf5435sdfg" />
    <add key="AppveyorProjectFeed" value="https://ci.appveyor.com/nuget/abcde-m5sdafsdfslmw" />
  </packageSources>
  <packageSourceCredentials>
    <AppveyorAccountFeed>
      <add key="Username" value="nuget" />
      <add key="ClearTextPassword" value="291e42dd2" />
    </AppveyorAccountFeed>
    <AppveyorProjectFeed>
      <add key="Username" value="nuget" />
      <add key="ClearTextPassword" value="291e42dd66cd" />
    </AppveyorProjectFeed>
  </packageSourceCredentials>
</configuration>

3. BYOC Linux: (nuget.org feed missing)

nuget:
  disable_publish_on_pr: true
  account_feed: true
  project_feed: true

install:
- sh: >-

    dotnet nuget

    dotnet nuget list source

    cat ~/.nuget/NuGet/NuGet.Config

output:

NuGet Command Line 6.3.2.9

Registered Sources:
  1.  AppveyorAccountFeed [Enabled]
      https://ci.appveyor.com/nuget/abcde-2qsadsasdasda
  2.  AppveyorProjectFeed [Enabled]
      https://ci.appveyor.com/nuget/abcde-m5sdafsdfslmw


<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="AppveyorAccountFeed" value="https://ci.appveyor.com/nuget/abcde-2qsadsasdasda" />
    <add key="AppveyorProjectFeed" value="https://ci.appveyor.com/nuget/abcde-m5sdafsdfslmw" />
  </packageSources>
  <packageSourceCredentials>
    <AppveyorAccountFeed>
      <add key="Username" value="nuget" />
      <add key="ClearTextPassword" value="eb3b2sfd" />
    </AppveyorAccountFeed>
    <AppveyorProjectFeed>
      <add key="Username" value="nuget" />
      <add key="ClearTextPassword" value="eb3b2659" />
    </AppveyorProjectFeed>
  </packageSourceCredentials>
</configuration>

as you can see both the standard Linux and the Windows BYOC images do add the nuget.org source as expected. However when running our build on Linux BYOC that source is missing and only AppveyorAccountFeed and AppveyorProjectFeed are added automatically

minimal-ubuntu.json needs updating.

When attempting to setup my own cloud with the build-cloud wizard and select Ubuntu 18.04 minimal it does not work at all. Firstly the specified ISO is no longer available (2 versions out of date?) but manually updating that still leaves me with an error once it gets to

"type": "file",
"direction": "download",
"source": "versions-{{ user `datemark` }}.log",
"destination": "./"
},

Where it returns something like:

==> hyperv-iso: Downloading versions-20200926223335.log => ./
==> hyperv-iso: Download failed: scp: versions-20200926223335.log: No such file or directory

Hyper-V BYOC build failing in `New-IsoFile`

Attempting to build for hyper-v fails due to conflict in New-IsoFile function.

PS C:\Users\Mike> Connect-AppVeyorToHyperV -AppVeyorUrl https://ci.appveyor.com -ApiToken XXXXXXXXX -CpuCores 16 -RamMb 2048 -ImageName "windows-hv" -ImageOs "Windows" -ImageTemplate "minimal-windows-server.json" -ImageFeatures "" -ImageCustomScript "Z2l0IGNsb25lIGh0dHBzOi8vZ2l0aHViLmNvbS9TbWluZ0h1Yi9TbWluZyAtLWJyYW5jaCBkZXZlbG9wIC0tZGVwdGggMSAvdG1wL3NtaW5nCi90bXAvc21pbmcvVG9vbHMvRG9ja2VyL2FwcHZleW9yL3NldHVwLnBzMQ==" -ImageCustomScriptAfterReboot ""

Checking AppVeyor API access...

Checking if Hyper-V tools are installed...
WARNING:
This command will create Hyper-V resources such as virtual switch and related subnet and NAT. For Linux VMs it will also create a new firewall rule. Also, it will run Hashicorp Packer which will create its own temporary Hyper-V resources and leave VHD for future use by AppVeyor build VMs.

If this server contains production resources you might consider using separate one.

Press Enter to continue or Ctrl-C to exit the command. Use '-SkipDisclaimer' switch parameter to skip this message next time.

New-IsoFile: M:\Users\Mike\Documents\PowerShell\Modules\AppVeyorBYOC\1.0.178\Connect-AppVeyorToHyperV.ps1:312
Line |
 312 |          New-IsoFile -Path $FileName -Source $Files -Force -Media "CDR …
     |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | A parameter cannot be found that matches parameter name 'CompilerParameters'.

I've managed to get past this as follows:

  1. Add Add current New-ISOFile.ps1 from https://github.com/TheDotSource/New-ISOFile
  2. Revise code:
diff --git a/Connect-AppVeyorToHyperV.ps1 b/Connect-AppVeyorToHyperV.ps1
index db3adb6..6c7d8fb 100644
--- a/Connect-AppVeyorToHyperV.ps1
+++ b/Connect-AppVeyorToHyperV.ps1
@@ -309,7 +309,13 @@ Function Connect-AppVeyorToHyperV {
             "$ParentFolder/hyper-v/Windows/scripts/shutdown_vm.bat",
             "$ParentFolder/hyper-v/Windows/scripts/win-updates.ps1"
         )
-        New-IsoFile -Path $FileName -Source $Files -Force -Media "CDR"
+        $StagingFolder="$ParentFolder/iso-source"
+        mkdir -f "$StagingFolder"
+        foreach ($f in $Files)
+        {
+            Copy-Item -Force "$f" "$StagingFolder"
+        }
+        New-IsoFile -destinationIso "$FileName" -source "$StagingFolder" -Force -Media "CDR"
     }
     elseif ($imageOs -eq "Linux")
     {

However the resulting image isn't bootable so clearly isn't a full fix. Am I missing something simple?

NB. Work in progress at https://github.com/mikee47/appveyor-build-images/tree/fix/hyperv-build

VS2015+2017 - heavily outdated vcpkg

While it is possible to run git pull && ./bootstrap-vcpkg && vcpkg update && vcpkg update XXXX --no-dry-run on each build it is obviously not a good idea.

Can you please update the two images (ideally the newer ones, too) to a reasonable set with the following commands?

pushd c:\tools\vcpkg
git pull
bootstrap-vcpkg
vcpkg update
vcpkg install vcpkg-cmake vcpkg-cmake-config
vcpkg update vcpkg-cmake vcpkg-cmake-config --no-dry-run

The 2015 worker image currently has a vcpkg older than 11/2019.

Seen when updating it manually:

A suitable version of git was not found (required v2.32.0). Downloading portable git v2.32.0...
Downloading git...
  https://github.com/git-for-windows/git/releases/download/v2.32.0.windows.2/PortableGit-2.32.0.2-32-bit.7z.exe -> C:\Tools\vcpkg\downloads\PortableGit-2.32.0.2-32-bit.7z.exe
Extracting git...
A suitable version of powershell-core was not found (required v7.1.4). Downloading portable powershell-core v7.1.4...
Downloading powershell-core...
  https://github.com/PowerShell/PowerShell/releases/download/v7.1.4/PowerShell-7.1.4-win-x86.zip -> C:\Tools\vcpkg\downloads\PowerShell-7.1.4-win-x86.zip

So please try to update those, too.

Warning with remote host

Getting the next warning since this morning with Visual Studio 2022 image. Any ideas? CC: @OwenMcDonnell.

image

We have not changed anything in appveyor.yml or our code.

VS 2019 - add Address Sanitizer

The VS 2019 compiler supports Address Sanitizer, which requires an extra library. At the moment, compiling with -fsanitize=address results in a linker error:

  • LINK : fatal error LNK1104: cannot open file 'clang_rt.asan_dbg-x86_64.lib'

Please add the Address Sanitizer component to the VS 2019 install. The MS docs list it as:

  • Microsoft.VisualStudio.Component.VC.ASAN

[Feature Request] Use newer mingw-get from OSDN to install MinGW.org toolchain

MinGW.org has been moving to being hosted on OSDN.net, with newer releases of their packages (and updated catalogue files) being hosted exclusively on the new site, including the newer mingw-get version 0.6.3-pre-20170905-1 (instead of the 0.6.2-beta-20131004-1 on SourceForge).

Whereas mingw-get version 0.6.2-beta-20131004-1 installs (for me):

  • GCC 6.3.0-1
  • binutils 2.28-1
  • libz 1.2.8-1
  • w32api & mingwrt 5.0.2

version 0.6.3-pre-20170905-1 currently installs:

  • GCC 9.2.0-1
  • binutils 2.32-1
  • libz 1.2.11-1
  • w32api & mingwrt 5.3

(and will probably install newer versions of these and other packages, as they get updated).

Updating to the newer version of mingw-get should be as simple as replacing scripts/Windows/install_mingw.ps1 lines 11-14:

$zipPath = "$($env:TEMP)\mingw-get-0.6.2-mingw32-beta-20131004-1-bin.tar.xz"
$tarPath = "$($env:TEMP)\mingw-get-0.6.2-mingw32-beta-20131004-1-bin.tar"
Write-Host "Downloading..."
(New-Object Net.WebClient).DownloadFile('http://sourceforge.net/projects/mingw/files/Installer/mingw-get/mingw-get-0.6.2-beta-20131004-1/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.tar.xz/download', $zipPath)

with:

$zipPath = "$($env:TEMP)\mingw-get-0.6.3-mingw32-pre-20170905-1-bin.tar.xz"
$tarPath = "$($env:TEMP)\mingw-get-0.6.3-mingw32-pre-20170905-1-bin.tar"
Write-Host "Downloading..."
(New-Object Net.WebClient).DownloadFile('https://osdn.net/dl/mingw/mingw-get-0.6.3-mingw32-pre-20170905-1-bin.tar.xz', $zipPath)

I emphasize that it "should" work because, though I have succeeded manually downloading and installing from the link, and have been doing something similar with the AppVeyor build for one of my GitHub projects with success, I haven't tried running the updated PowerShell script I suggest (especially not in the context of creating an appveyor image).

Support newer Windows Versions

It would be great to have more recent Windows Versions up to at least 20H2. The point is that when building Windows Docker image, with Windows Server 2019 you are extremely limited so you cannot build images for 1903, 1909, 2004, 20H2 (see https://docs.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/version-compatibility?tabs=windows-server-2019%2Cwindows-10-1909).
But building those images is necessary in order to provide the ability to run the images in-process mode.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.