I am trying to find a place to upload a binary that has to be executed in all the workflows that we run.
The problem that I am having is finding such a place.
I tried uploading the binary as a release. I am able to download this binary via the REST API but I have to pass in a personal access token to do so.
Is there a way to download a release artifact without passing in a personal access token on an internal repository that is visible to all the users in the organization?
-----------
| |
| bin.exe |
| |
-----------
/ | \
/ | \
----------- ------------ ------------
| | | | | |
| Repo 1 | | Repo 2 | | Repo 3 |
| | | | | |
----------- ------------ ------------
We have hundreds of repos and we want to pull the release artifact that is hosted in a different repo without passing in a personal access token because adding a personal access token is not feasible on hundreds of repos. We also do not want to host the binary publicly.
If you have been in a similar situation, please let me know on how you resolved it.
because adding a personal access token is not feasible on hundreds of repos
That means using one key (a deploy key, associated to the unique repository with the binary, instead of a PAT associated to a user) in order to access said binary.
Using gh secret set, you can add that key to hundred of repository through a script.
Then a common GitHub action can reference that secret when executed in each repository.
Related
I'm trying to learn fastlane and I'm currently blocked at fastlane match: https://docs.fastlane.tools/actions/match/#fastlane
Following the docs, I installed fastlane.
I created a private repository for the profiles and certificates.
I created an SSH key using a passphrase, example sfsfsdf
I added the SSH key to the ssh-agent and uploaded it to GitHub.
I ran then bundle exec fastlane match init and adjusted the Matchfile
Matchfile
git_url("git#github.com:my-repository/certificates.git")
git_branch("main")
type "development" # The default type, can be: appstore, adhoc, enterprise or development
app_identifier("com.mydomain.ios.project.v1")
username("my-appstore-account#domain.co")
Then I ran bundle exec fastlane match development to generate and install the Development certificates and profiles, which generates the following output:
fastlane could not check for updates error: 776: unexpected token at '<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>NoSuchBucket</Code><Message>The specified bucket does not exist</Message><BucketName>kits-crashlytics-com</BucketName><RequestId>VX3SA</RequestId><HostId>hnZRvv3hulf/q50pxV5S1co0jPLJq0KgI6/1EB0jQEI+dWlLedQA=</HostId></Error>'
[15:53:38]: Successfully loaded '/Users/my-user/my-project/fastlane/Matchfile' 📄
+----------------+--------------------------------------+
| Detected Values from './fastlane/Matchfile' |
+----------------+--------------------------------------+
| git_url | git#github.com:my-repository/
certificates.git |
| git_branch | main |
| type | development |
| app_identifier | com.mydomain.ios.project.v1. |
| username | my-appstore-account#domain.com |
+----------------+--------------------------------------+
+-----------------------+--------------------------------------+
| Summary for match 2.28.3 |
+-----------------------+--------------------------------------+
| git_url | git#github.com:my-repository/
certificates.git |
| git_branch | main |
| type | development |
| app_identifier | com.mydomain.ios.project.v1. |
| username | my-appstore-account#domain.com |
| keychain_name | login.keychain |
| readonly | false |
| team_id | TEAM_ID_NUMBER |
| verbose | false |
| force | false |
| skip_confirmation | false |
| shallow_clone | false |
| force_for_new_devices | false |
| skip_docs | false |
| platform | ios |
+-----------------------+--------------------------------------+
[15:53:38]: Cloning remote git repo...
[15:53:40]: Checking out branch main...
[15:53:40]: Enter the passphrase that should be used to encrypt/decrypt your certificates
[15:53:40]: This passphrase is specific per repository and will be stored in your local keychain
[15:53:40]: Make sure to remember the password, as you'll need it when you run match on a different machine
[15:53:40]: Passphrase for Git Repo:
I entered the passphrase I used for my SSH key (sfsfsdf) and I saw the following error:
[15:59:09]: Couldn't decrypt the repo, please make sure you enter the right password!
keychain: "/Users/my-user/Library/Keychains/login.keychain-db"
version: 512
class: "inet"
attributes:
0x00000007 <blob>="match_git#github.com:my-repository/certificates.git"
0x00000008 <blob>=<NULL>
"acct"<blob>=<NULL>
"atyp"<blob>="dflt"
"cdat"<timedate>=0x32303232303531303232353930395A00 "20220510225909Z\000"
"crtr"<uint32>=<NULL>
"cusi"<sint32>=<NULL>
"desc"<blob>=<NULL>
"icmt"<blob>=<NULL>
"invi"<sint32>=<NULL>
"mdat"<timedate>=0x32303232303531303232353930395A00 "20220510225909Z\000"
"nega"<sint32>=<NULL>
"path"<blob>=<NULL>
"port"<uint32>=0x00000000
"prot"<blob>=<NULL>
"ptcl"<uint32>=0x00000000
"scrp"<sint32>=<NULL>
"sdmn"<blob>=<NULL>
"srvr"<blob>="match_git#github.com:my-repository/certificates.git"
"type"<uint32>=<NULL>
password has been deleted.
[15:59:09]: Enter the passphrase that should be used to encrypt/decrypt your certificates
[15:59:09]: This passphrase is specific per repository and will be stored in your local keychain
[15:59:09]: Make sure to remember the password, as you'll need it when you run match on a different machine
[15:59:09]: Passphrase for Git Repo:
What am I doing wrong or not doing?
Thanks!
I'm facing a similar issue. So far the only solution I've seen is to add the password for the repo to the Matchfile as ENV["MATCH_PASSWORD"] = "[PASSWORD]".
This did not work for me, but it's the best I've found and it at least makes the error more obvious on the command line. My next attempt is going to be running fastlane match nuke and starting the process fresh.
This issue has more specifics about their reproducible steps and solution: https://github.com/fastlane/fastlane/issues/14879.
I have a pipeline that is executing scripts and some of them are 3third party scripts.
in this case is Fastlane script.
Now in some rare cases, the Fastlane script is expecting the user to input value to stdin my question is how can I detect when a script is stoped and waiting to input. in this case, I like to throw an error and fail the task.
this is the pipeline task :
- script: |
fastlane release --verbose projectName:${{parameters.projectName}}
echo 'Done invoking Fastfile'
#failOnStderr: false
workingDirectory: '$(System.ArtifactsDirectory)/ios_artifacts'
displayName: 'run fastlane'
And it stack in this idle state :
2020-10-12T06:46:27.5309820Z INFO [2020-10-12 06:46:27.52]: [32m------------------[0m
2020-10-12T06:46:27.5310570Z INFO [2020-10-12 06:46:27.53]: [32m--- Step: sigh ---[0m
2020-10-12T06:46:27.5311280Z INFO [2020-10-12 06:46:27.53]: [32m------------------[0m
2020-10-12T06:46:27.5362760Z
2020-10-12T06:46:27.5386680Z +-------------------------------------+------------------------------+
2020-10-12T06:46:27.5387580Z | [32mSummary for sigh 2.162.0[0m |
2020-10-12T06:46:27.5388330Z +-------------------------------------+------------------------------+
2020-10-12T06:46:27.5389160Z | username | xxxx#xxxx.com |
2020-10-12T06:46:27.5389530Z | app_identifier | com.xxxx.xxxx |
2020-10-12T06:46:27.5389950Z | team_id | xxxx |
2020-10-12T06:46:27.5390320Z | adhoc | false |
2020-10-12T06:46:27.5390730Z | developer_id | false |
2020-10-12T06:46:27.5391490Z | development | false |
2020-10-12T06:46:27.5391860Z | skip_install | false |
2020-10-12T06:46:27.5392280Z | force | false |
2020-10-12T06:46:27.5392650Z | ignore_profiles_with_different_name | false |
2020-10-12T06:46:27.5393070Z | skip_fetch_profiles | false |
2020-10-12T06:46:27.5393450Z | skip_certificate_verification | false |
2020-10-12T06:46:27.5393860Z | platform | ios |
2020-10-12T06:46:27.5394230Z | readonly | false |
2020-10-12T06:46:27.5394630Z | fail_on_name_taken | false |
2020-10-12T06:46:27.5395400Z +-------------------------------------+------------------------------+
2020-10-12T06:46:27.5395640Z
2020-10-12T06:46:27.5396350Z INFO [2020-10-12 06:46:27.53]: Starting login with user 'xxxx#xxxx.com'
2020-10-12T06:46:27.5559840Z Reading keychain entry, because either user or password were empty
2020-10-12T06:46:27.5560420Z Loading session from environment variable
2020-10-12T06:46:27.7305500Z Session loaded from environment variable is not valid. Continuing with normal login.
2020-10-12T06:46:28.7278420Z Two-factor Authentication (6 digits code) is enabled for account 'xxxx#xxxx.com'
2020-10-12T06:46:28.7279570Z More information about Two-factor Authentication: https://support.apple.com/en-us/HT204915
2020-10-12T06:46:28.7279880Z
2020-10-12T06:46:28.7280520Z If you're running this in a non-interactive session (e.g. server or CI)
2020-10-12T06:46:28.7281300Z check out https://github.com/fastlane/fastlane/tree/master/spaceship#2-step-verification
How can i monitor this state ? and fail the pipeline ?
How can i monitor this state ? and fail the pipeline ?
As far as I know, this could not be possible. Currently, the azure devops pipeline does not provide such a built-in feature that can detect the script waiting for input and fail the pipeline. It should be an easy way to set the timeout you want for the task timeoutInMinutes: number # how long to wait before timing out the task to make it fail based on timeout, but it seems you don't want this.
You could add your request for this feature on our UserVoice site, which is our main forum for product suggestions. After suggest raised, you can vote and add your comments for this feedback. The product team would provide the updates if they view it.
I need to create a data factory pipeline to move data from sftp to blob storage. At this point, I'm only doing a POC, and I'd like know how I would read configuration settings and kick off my pipeline based on those configuration settings.
Example of config settings would be (note that there would be around 1000 of these):
+--------------------+-----------+-----------+------------------------+----------------+
| sftp server | sftp user | sftp pass | blob dest | interval |
+--------------------+-----------+-----------+------------------------+----------------+
| sftp.microsoft.com | alex | myPass | /myContainer/destroot1 | every 12 hours |
+--------------------+-----------+-----------+------------------------+----------------+
How do you kick off a pipeline using some external configuration file/store?
Take a look at Lookup activity and linked service Parameterize
the server that a magento install was on crashed for (currently reason unknown) and now the backend is inaccessible. I either get no error or I get access denied. I am able to preform the password reset.
I have tried:
clearing the browser cookies and cache
clearing the session, tmp and cache folders in magento
using the magento database repair tool - no errors were found
creating a new user manually in the admin_users table (this gets access denied)
rebooting the server again (last resort but still no)
The main admin user gets a redirect loop.
Any ideas are welcome, I am now stumped.
EDIT:I am really after any way to recover a magento admin login? or failing this any way to export the data (without exporting the bugged section)
I have employed a hack in one of the core magento files detailed here: http://blog.chapagain.com.np/magento-admin-login-problem/
I have had to comment out lines in "app/code/core/Mage/Core/Model/Session/Abstract/Varien.php":
(please note this is for 1.6 - check link posted for advice on 1.4)
$cookieParams = array(
'lifetime' => $cookie->getLifetime(),
'path' => $cookie->getPath()//,
//'domain' => $cookie->getConfigDomain(),
//'secure' => $cookie->isSecure(),
//'httponly' => $cookie->getHttponly()
);
also line 104 comment out :
//call_user_func_array('session_set_cookie_params', $cookieParams);
It seems to be when the server went down something happened to the session, as the new install also failed.
You can get your data by performing a database backup via cPanel or mysqldump via SSH access. Your hosting provider should be able to help you. Additionally, you can unzip the admin files from your Magento installed version. Download it to your computer and unzip the installation... then re-zip the folder for app/design/adminhtml ... upload and unpack this on your website in the proper place, and this will reinstall the PHP pages.
Double check the file app/etc/local.xml this usually has the database login stored in it.
Inside the mysql database for your magento installation, there is the table core_config_data and in it, some path values might interfere with using admin if intentionally set incorrectly:
mysql> select config_id, path, left(value,30) from core_config_data WHERE path LIKE '%admin%';
+-----------+-------------------------------------------+--------------------------------+
| config_id | path | left(value,30) |
+-----------+-------------------------------------------+--------------------------------+
| 50 | dev/translate_inline/active_admin | 0 |
| 220 | web/secure/use_in_adminhtml | 0 |
| 687 | admin/startup/page | catalog/products |
| 690 | admin/security/use_form_key | 0 |
| 691 | admin/security/use_case_sensitive_login | 1 |
| 692 | admin/security/session_cookie_lifetime | 36000 |
| 745 | admin/url/use_custom | 0 |
| 746 | admin/url/custom | |
+-----------+-------------------------------------------+--------------------------------+
I have a couple of ANT projects for several different clients; the directory structure I have for my projects looks like this:
L___standard_workspace
L___.hg
L___validation_commons-sub-proj <- JS Library/Module
| L___java
| | L___jar
| L___old_stuff
| L___src
| | L___css
| | L___js
| | L___validation_commons
| L___src-test
| L___js
L___v_file_attachment-sub-proj <- JS Library/Module
| L___java
| | L___jar
| L___src
| | L___css
| | L___js
| L___src-test
| L___js
L___z_business_logic-sub-proj <- JS Library/Module
| L___java
| | L___jar
| L___src
| L___css
| L___js
L____master-proj <- Master web-deployment module where js libraries are compiled to.
L___docs
L___java
| L___jar
| L___src
| L___AntTasks
| L___build
| | L___classes
| | L___com
| | L___company
| L___dist
| L___nbproject
| | L___private
| L___src
| L___com
| L___company
L___remoteConfig
L___src
| L___css
| | L___blueprint
| | | L___plugins
| | | | L___buttons
| | | | | L___icons
| | | | L___fancy-type
| | | | L___link-icons
| | | | | L___icons
| | | | L___rtl
| | | L___src
| | L___jsmvc
| L___img
| | L___background-shadows
| | L___banners
| | L___menu
| L___js
| | L___approve
| | L___cart
| | L___confirm
| | L___history
| | L___jsmvc
| | L___mixed
| | L___office
| L___stylesheets
| L___swf
L___src-standard
Within the working copy the modules compile the sub-project into a single Javascript file that is placed in the Javascript directory of the master project.
For example, the directories:
validation_commons-sub-proj
v_file_attachment-sub-proj
z_business_logic-sub-proj
...all are combined and minified (sort of like compiled) into a different Javascript filename in the _master-proj/js directory; and in the final step the _master-proj is compiled to be deployed to the server.
Now in regards to the way I'd like to set this up with hg, what I'd like to be able to do is clone the master project and its sub-projects from their own base-line repositories into a client's working-copy, so that modules can be added (using hg) to a particular customer's working copy.
Additionally however, when I do make some changes to/fix bugs in one customer's working copy, I would like to be able to optionally push the changes/bug fixes back to the master project/sub-project's base-line repository, for purposes of eventually pulling the changes/fixes into other customer's working copies that might contain the same bugs that need to be fixed.
In this way I will be able to utilize the same bug fixes across different clients.
However...I am uncertain of the best way to do this using hg and Eclipse.
I read here that you can use hg's Convert Extension to split a sub-directory into a separate project using the --filemap option.
However, I'm still a little bit confused as to if it would be better to use the Convert Extension or if it would be better to just house each of the modules in their own repository and check them out into a single workspace for each client.
Yep, it looks like subrepos are what you are looking for, but I think maybe that is the right answer for the wrong question and I strongly suspect that you'll run into similar issues that occur when using svn:externals
Instead I would recommend that you "publish" your combined and minified JS files to an artefact repository and use a dependency manager such as Ivy to pull specific versions of your artefacts into your master project. This approach give you far greater control over the sub-project versions your master project uses.
If you need to make bug fixes to a sub-project for a particular client, you can just make the fixes on the mainline for that sub-project, publish a new version (ideally via an automated build pipeline) and update their master project to use the new version. Oh, you wanted to test the new version with the their master project before publishing? In that case, before you push your fix, combine and minify your sub-project locally, publish it to a local repository and have the client's master project pick up that version for your testing.